Welcome, Guest
Username: Password: Remember me

TOPIC: PSed - Multiple Point Source Locations

PSed - Multiple Point Source Locations 3 months 3 weeks ago #47451

Hello,

I am using PSed to study sediment source receptor relationships on an intertidal flat. The vision for my study is to distribute sediment parcels over a 2-dimensional area, and to then track the transport and fate of such particles. The attached image shows my desired sediment release locations as black points. I would like to avoid releasing these parcels 1-by-1 (as I would be forced to manually run ~200 simulations!)

My understanding is that PSed allows for the placement of sediment at a discrete point source or along a 1-dimensional transect, but not over a 2-dimensional area.

I'm wondering if there is some way to bypass the 'off-the-shelf' capability of PSed to release particles distributed over a 2-d area, or at least to release multiple point sources simultaneously?

Thanks for any help on this matter,

Jeremy
Attachments:
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 3 weeks ago #47452

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
I'm no expert, but you could create a line that covers an area, then I believe PSed would be selecting randomly off that line. Exactly how that works internally, I'd have to read the source code. Perhaps give it a try and see what happens?

Kindly... Alan

Something like this image:
2026-06-18_LineCoveringAGrid.png
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 3 weeks ago #47453

Hi Alan,

Thanks for your thoughts. Unfortunately, from what I am seeing, PSed only allows you to specify a beginning and end point along a single 1-segment line, and sediment parcels are released between those two points. It does not appear possible to provide a line set that 'snakes' its way over a 2-d area.

It seems I may need to rethink my approach here, or at least reduce the number of release points to something more manageable.

Thanks,

Jeremy
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 3 weeks ago #47454

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
I could look into modifying the code to allow a multi-segment line segment instead. However, I'm not sure if there would be any other ramifications other than releasing randomly off of such a new type of line.

In other words, if the ONLY use of the line is for the purposes of releasing particles randomly along that line, I could make the change in the next while. However, my timeline would be fluid.

How urgent is this for you? Are you able to wait or not?

Kindly... Alan
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 3 weeks ago #47455

Hi Alan,

This is very kind of you, thanks for your offer.

I am unfortunately working on a rather tight timeline. For the time being, I've developed a work-around within the limitations of PSed by releasing sediment along several evenly-spaced 1-segment transects in separate simulations and then merging and post-processing the results in R. This is working for me currently so there is no immediate need for you to make changes to the source code.

That being said, I do think that this change would be a good addition to PSed for future similar projects or for others who are hoping to simulate 2-dimensional releases. If possible at some point in the future, it would be great to see this functionality.

Thanks,

Jeremy
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 2 weeks ago #47456

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
Ok. Glad you found a way to get your work done!

Since the focus is on AREAs and not really LINEs... and uniformly selecting points inside an arbitrary area is a bit more tricky than selecting randomly on a line segment...

I think it best that if PSed uses a file of 2D point locations as input, then I could add something to Blue Kenue to create such a file.
  • Note that if the file doesn't contain enough points for the simulation then PSed could loop around the file and reuse previous point locations.

Then, you would be able to create those point files with different areas AND you'd be able to see exactly which 2D release points were used by PSed by displaying the points in a 2D View in Blue Kenue.

I'm currently thinking of adding the ability (in Blue Kenue) to right-click on a 2D Line Set's line (i.e. a polygon) and select a menu item to "Generate Random XY Points...". A popup would appear asking you how many points to uniformly generate inside the polygon. Then you'd be able to save the points to a file that PSed could read...

As I haven't done anything (yet)... do you have any further thoughts on this topic? I believe that this approach would give you some experimental freedom and also experimental reproducibility at the same time.

Kindly... Alan
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 3 months 2 weeks ago #47458

Hi Alan,

Your proposal sounds great. The exact kind of feature that would really help with future projects of this type.

Really appreciate your work and all your help on this forum.

Jeremy
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 1 month 1 week ago #47511

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
The next installer, created after 2 September 2026, will have a new popup menu item for a 2D Line Set, namely, the ability to "Generate Points Inside..."

In the following example, I wanted one million (1,000,000) new random points to be created inside a closed line. Being such a small image, it looks black! But it is not completely solid ;)

2026-09-02_1million_random_points.png


Not sure what sort of area you were thinking of creating and using. BK does have all kinds of 2D shapes that are available in the File > New > 2D Shape... menu. Any closed line will (should!) work with this new functionality.

I need to do other things now, however, I believe this is a good first step along the direction you originally requested.

Please feel free to add any example areas you are thinking of using and I can test them on my side in Blue Kenue if you wish.

PSed proper will have to wait for another day.

Kindly, Alan
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 1 month 1 week ago #47516

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
As of 3 September 2026, the next BK installer will have another new feature related to generating random 2D points inside of an object.

Previously, I mentioned that BK will be able to generate random 2D points inside any 2D Line Set. Now, BK will ALSO be able to generate random 2D points inside any T3 2D Scalar Mesh.

For example, starting from the same 2D Line Set I used previously, I covered it with UNIFORM triangles and then generated 1,000 random points inside the resulting covering. Here's the result.

2026-09-03_RandomPointsInAMesh.png


Kindly... Alan
The administrator has disabled public write access.

PSed - Multiple Point Source Locations 1 month 1 week ago #47517

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1245
  • Thank you received: 242
Generating random points in a 2D Line Set will now also give you the constrained triangulation that was used internally.

This has the benefit that you can start with a closed line and generate some random points. Then, using the exact same constrained triangulation you can generate some more points. Depending on the line, it may take a while to create the triangulation, so I thought keeping it (rather than throwing it away) may be helpful for some.

Kindly... Alan

PS Here's a screen snapshot of the above in action. Filled squares are the first set of random points and filled triangles are the second set.

2026-09-03_PointsThenMorePoints.png
The administrator has disabled public write access.
Moderators: Serrer, a.barton

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.