Welcome, Guest
Username: Password: Remember me

TOPIC: Island detection in telemac with bluekenue files

Island detection in telemac with bluekenue files 4 years 7 months ago #35805

  • thomas.le
  • thomas.le's Avatar
Hi everyone,

I am currently working on a Python script to make plots of my meshing/contours from my BlueKenue files. Thus I am trying to detect the contour points of the islands in my model. I believe someone must have done such script in the source code of telemac but I can't find it and I have no clue about how to do it on my own...
Does anyone knows where to find the script that I am looking for or have an idea on how to do such script?

Thanks for your help,

Thomas
The administrator has disabled public write access.

Island detection in telemac with bluekenue files 4 years 7 months ago #35806

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi

In the latest version, you could have a look to the notebooks where some plot examples are already available.

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Island detection in telemac with bluekenue files 4 years 7 months ago #35807

  • thomas.le
  • thomas.le's Avatar
Hi,

So I didn't knew that such notebooks exist so it helped a lot and there is there a lot of knowledge that I will use for sure. But unfortunately there is nothing to solve my issue.

Let me be more clear about my situation. The script that I am working on is not new and worked well with files from matisse. But now we decided to use BlueKenue and the outputs from matisse and BlueKenue are slightly different. Particularly in the ipobo object which contains the data about the contour of my model. With this change I have to modify the python script. I have managed to plot the contour of my model from bluekenue but I can't detect which point of the contour is in the contour of an island. I hope I'm clear... And that you have an idea about where to find a script to do what I am looking for.
Cheers,

Thomas
The administrator has disabled public write access.

Island detection in telemac with bluekenue files 4 years 7 months ago #35808

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
I'm not fully sure to well understand your problem...

Matisse and BK produce Selafin file.
As far as I know There is no reason to obtain different files, Ipobo array is also filed by BK
By the way, you could use the CLI file to identify the boundary if the ipobo array is not correct...

Regards
Christophe
The administrator has disabled public write access.

Island detection in telemac with bluekenue files 4 years 7 months ago #35810

  • thomas.le
  • thomas.le's Avatar
The ipobo objects are almost the same. in selafin files created by matisse and BlueKenue the ipobo array contains 0 when the point is not on the border and n when the point is on the border, with n the number of the point. The difference is that in matisse the border points are the first points of the model (if there is 20 000 ponts in the model the first 500 points for example will be border points) and in the ipobo array from matisse is like that : c c .. c c 0 .. 0 i1 .. i1 0 .. 0 i2 ..i2 0 .... where c is the number of points of the border not island i1 is the border points of the first island i2 of the second island... As you can see theese points are separated by one or multiples 0 which is really useful to determine which point is on the border of an island. But in ipobo arrays from BlueKenue the border points are not the first ones of the model (a border point can be for example the last one of the model) and there is no difference between border points from an island and not from an island. I hope you can understand my issue.
I have another script that makes quite the same thing with the cli file, but the goal here is to manage to do it with the selafin file only.
I believe that Telemac has a script that detects the islands from the selafin file because when we run telemac it specifies the number of islands.
The administrator has disabled public write access.

Island detection in telemac with bluekenue files 4 years 6 months ago #35849

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
In Telemac, we use the boundary file...
I'm not sure and don't have time to verify in the source code but it seems to me that the ipobo object is not used by telemac except in parallel simulation and it this case, this array was rebuilt by partel...
Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Island detection in telemac with bluekenue files 4 years 6 months ago #35851

  • thomas.le
  • thomas.le's Avatar
Hi,
Thank you very much for your answers. If I find anything I will post it here then.
Regards,
Thomas
The administrator has disabled public write access.

Island detection in telemac with bluekenue files 4 years 6 months ago #35864

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Thomas,

Without knowing what your ultimate purpose is it's hard for me to comment but I will anyway...

1. If you are using BK to generate the mesh, the first Attribute of the resulting mesh object contains codes for the different node types. (interior, exterior, islands, submesh, etc.)

2. If you are just trying to quickly get the island polygons from an existing mesh, look at:
"Tools->T3 Mesh->Extract Edges (Shorelines)

Hope this helps...Martin
The administrator has disabled public write access.
The following user(s) said Thank You: thomas.le

Island detection in telemac with bluekenue files 4 years 6 months ago #35866

  • thomas.le
  • thomas.le's Avatar
Hi Martin,
Thank you very much, I didn't knew about this first attribute! I think it might be the solution :)

Stay safe,
Thomas
The administrator has disabled public write access.
Moderators: borisb

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