Jump to content
GMS, SMS, and WMS User Forum

mesh grid creation question


M O K
 Share

Recommended Posts

Hi,

I am trying to create a triangular mesh grid with rules like:

Minimum interior angle: 30.0

Maximum interior angle: 130.0

Maximum slope: 0.1

Element area change: 0.5

Connecting elements: 8 or less

I can create the mesh grid but I cannot apply any of the rules above while creating it. When I turn on mesh quality I see all these problems in my mesh but is there a way to prevent it from happening (I got 150k elements and I cannot correct all the issues manually) ? I am guessing the element options dialog can help me do that but

Also, what is the option to limit an element's side length ? Is it truncating ?

thanks

Mo

Link to comment
Share on other sites

While SMS contains a large variety of useful tools for generating meshes, we don't have it automated to the point that you can define simple variables like below and have them all enforced.

I have two points I would like to make and some advice:

1. I think the mesh quality measures have a downside. At times users put more weight into them then is warranted. The importance of the measures depends upon the numeric engine you are using. One way to find out if a specific area is causing problems is to check calibration parameters. RMA2 and FESWMS will report the mesh nodes that are having trouble to calibrate (max change between iterations). ADCIRC will report the max node velocity which can be high when instabilities are encountered.

2. Many of the items below are related to having smooth transitions and having smooth boundaries and there are tools in SMS to help with this. I would recommend using scalar density paving. If you do this, you can smooth your size function using the dataset toolbox on the scatter set. Choose "Spatial | Smooth data sets" in the dataset toolbox. You can control the growth of elements so the area change limit is 0.5. You will want to use the anchor type to a minimum value.

The element options dialog can help you remove exterior triangles that are long and skinny or have bad aspect ratios. These tools are intended to help improve meshes that are generated from simple triangulation and I don't believe they will be helpful for you.

Again I recommend encouraging smooth transitions using scalar density paving and the smoothing function. I think you will find that if you do this, angle and connectivity problems will improve.

Hi,

I am trying to create a triangular mesh grid with rules like:

Minimum interior angle: 30.0

Maximum interior angle: 130.0

Maximum slope: 0.1

Element area change: 0.5

Connecting elements: 8 or less

I can create the mesh grid but I cannot apply any of the rules above while creating it. When I turn on mesh quality I see all these problems in my mesh but is there a way to prevent it from happening (I got 150k elements and I cannot correct all the issues manually) ? I am guessing the element options dialog can help me do that but

Also, what is the option to limit an element's side length ? Is it truncating ?

thanks

Mo

Link to comment
Share on other sites

While SMS contains a large variety of useful tools for generating meshes, we don't have it automated to the point that you can define simple variables like below and have them all enforced.

I have two points I would like to make and some advice:

1. I think the mesh quality measures have a downside. At times users put more weight into them then is warranted. The importance of the measures depends upon the numeric engine you are using. One way to find out if a specific area is causing problems is to check calibration parameters. RMA2 and FESWMS will report the mesh nodes that are having trouble to calibrate (max change between iterations). ADCIRC will report the max node velocity which can be high when instabilities are encountered.

2. Many of the items below are related to having smooth transitions and having smooth boundaries and there are tools in SMS to help with this. I would recommend using scalar density paving. If you do this, you can smooth your size function using the dataset toolbox on the scatter set. Choose "Spatial | Smooth data sets" in the dataset toolbox. You can control the growth of elements so the area change limit is 0.5. You will want to use the anchor type to a minimum value.

The element options dialog can help you remove exterior triangles that are long and skinny or have bad aspect ratios. These tools are intended to help improve meshes that are generated from simple triangulation and I don't believe they will be helpful for you.

Again I recommend encouraging smooth transitions using scalar density paving and the smoothing function. I think you will find that if you do this, angle and connectivity problems will improve.

Thank you Rusty,

this is exactly what I do right now:

1-load my *.map file which contains the boundaries that I created around the extent of my bathymetry scatter data - boundary type: unassigned. Closed boundary on the outside and some islands in it (I tried to attach it but apparently I am not permitted to upload this kind of file.)

2-I load my X Y Z bathymetry scatter data

3-I did what you told me here, with my scatter selected - "Spatial | Smooth data sets" -> Compute data set (I am confused here, on default Z is selected from my scatter set. I compute anyway and I got a scatter with coordinates and z=s=1.0) from the ADCIRC tutorial, I see that there are many steps to create a size function for meshing - so maybe I need to create another set (wavelength based size function? ) as input to Smooth data sets tool.

4-I select my feature polygon - attributes - mesh type: scalar density paving - scatter options - I leave everything on default and select the output I got in step 3.

5-Bathymetry Type: Scatter Set - Options: Everything default and I select my bathymetry scatter data as the scatter to interp. from

6-Feature Object - Map -> 2D Mesh - I got 229 polygons ( a lot of islands ) - it gets stuck and "not responding" at Meshing polygon 1 of 229. Press [ESC] to abort (0%)

this is all on the Sept. release of SMS 10.1 64bit

I feel like - the extrapolation single value, duplicate node value and min, max truncation will solve my problems. Right now I do not understand how they work with each other as I always get errors before starting the map -> mesh conversion.

All I want is to create the mesh and the resolution of the mesh will be based on my bathymetry scatter because the point clouds are already denser where I need higher numerical resolution, at the same time I want the mesh to be created to obey some rules like the area change, minimum slope etc etc because if I go directly from scatter -> 2D mesh I get ridiculous elements simply because the bathymetry data was not collected to create a specific mesh.

Maybe I want too much :)

I'll keep trying.

MO

Link to comment
Share on other sites

Hi,

Here is my next round of advice.

1. I would create a map file that is pulled in a little bit from your scattered data.

2. It sounds like you are using ADCIRC. Sometimes ADCIRC can be a little bit finicky with wetting/drying. If your scatter set includes very far onto land, you may want to consider trimming your map. Initially you may want to create a mesh that will stay wet the entire simulation. You can extract a contour at 0.5 m below sea level or something to obtain this.

3. The size dataset needs to represent the spacing that you want at each location of the mesh. There are several ways of doing this. For ADCIRC I would recommend giving a try to the LTEA tutorial and see if you can apply it to your project. However, if you would like to try to match your existing spacing you can do this. After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function.

4. Depending upon your size function, SMS may have frozen because it was trying to make an obscene amount of elements. Using the steps above with the grid spacing command should give you a reasonable number.

Good luck. Let me know if this helps.

Thank you Rusty,

this is exactly what I do right now:

1-load my *.map file which contains the boundaries that I created around the extent of my bathymetry scatter data - boundary type: unassigned. Closed boundary on the outside and some islands in it (I tried to attach it but apparently I am not permitted to upload this kind of file.)

2-I load my X Y Z bathymetry scatter data

3-I did what you told me here, with my scatter selected - "Spatial | Smooth data sets" -> Compute data set (I am confused here, on default Z is selected from my scatter set. I compute anyway and I got a scatter with coordinates and z=s=1.0) from the ADCIRC tutorial, I see that there are many steps to create a size function for meshing - so maybe I need to create another set (wavelength based size function? ) as input to Smooth data sets tool.

4-I select my feature polygon - attributes - mesh type: scalar density paving - scatter options - I leave everything on default and select the output I got in step 3.

5-Bathymetry Type: Scatter Set - Options: Everything default and I select my bathymetry scatter data as the scatter to interp. from

6-Feature Object - Map -> 2D Mesh - I got 229 polygons ( a lot of islands ) - it gets stuck and "not responding" at Meshing polygon 1 of 229. Press [ESC] to abort (0%)

this is all on the Sept. release of SMS 10.1 64bit

I feel like - the extrapolation single value, duplicate node value and min, max truncation will solve my problems. Right now I do not understand how they work with each other as I always get errors before starting the map -> mesh conversion.

All I want is to create the mesh and the resolution of the mesh will be based on my bathymetry scatter because the point clouds are already denser where I need higher numerical resolution, at the same time I want the mesh to be created to obey some rules like the area change, minimum slope etc etc because if I go directly from scatter -> 2D mesh I get ridiculous elements simply because the bathymetry data was not collected to create a specific mesh.

Maybe I want too much :)

I'll keep trying.

MO

Link to comment
Share on other sites

Hi,

Here is my next round of advice.

1. I would create a map file that is pulled in a little bit from your scattered data.

2. It sounds like you are using ADCIRC. Sometimes ADCIRC can be a little bit finicky with wetting/drying. If your scatter set includes very far onto land, you may want to consider trimming your map. Initially you may want to create a mesh that will stay wet the entire simulation. You can extract a contour at 0.5 m below sea level or something to obtain this.

3. The size dataset needs to represent the spacing that you want at each location of the mesh. There are several ways of doing this. For ADCIRC I would recommend giving a try to the LTEA tutorial and see if you can apply it to your project. However, if you would like to try to match your existing spacing you can do this. After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function.

4. Depending upon your size function, SMS may have frozen because it was trying to make an obscene amount of elements. Using the steps above with the grid spacing command should give you a reasonable number.

Good luck. Let me know if this helps.

thank you for all the help,

1-yeah I already did that to just forget about the extrapolation single value I was putting there.

2-I do use ADCIRC a lot but this mesh will be used in FVCOM

3-I will do the LTEA tutorial, it seems like a very useful tool. thanks.

"After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function."

YES-exactly what I wanted. Thank you !

4-I tried again and it crashes at "Meshing polygon 1 of 141. Press [ESC] to abort (0%)" - I reduced the number of polygons. These are basically islands in the domain. I guess too many or maybe I should assign them as "islands or something"

5-I removed all the island boundaries leaving only 1 closed boundary - and created the mesh using "After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function." - worked fine. I now have a mesh where the resolution resembles my bathymetry scatter data.

I should note that after deleting the island boundaries and setting interpolation options - I had this message: The scatter set has disjointed vertices. Would you like to continue?" - so then I realized that I was not triangulating my scatter data when I was importing it in the first place !! This causes problems.

thank you again Rusty

MO

Link to comment
Share on other sites

If you are using FVCOM instead of ADCIRC, I'm not 100% sure if LTEA is the best thing to use. It is setup to compute the errors in a simple ADCIRC run which wouldn't directly apply to FVCOM since they are using a completely different solution scheme.

It sounds like you are making progress though.

Your step 4 had a crash. If you have the files still and could get them to support@aquaveo.com, we would appreciate it.

thank you for all the help,

1-yeah I already did that to just forget about the extrapolation single value I was putting there.

2-I do use ADCIRC a lot but this mesh will be used in FVCOM

3-I will do the LTEA tutorial, it seems like a very useful tool. thanks.

"After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function."

YES-exactly what I wanted. Thank you !

4-I tried again and it crashes at "Meshing polygon 1 of 141. Press [ESC] to abort (0%)" - I reduced the number of polygons. These are basically islands in the domain. I guess too many or maybe I should assign them as "islands or something"

5-I removed all the island boundaries leaving only 1 closed boundary - and created the mesh using "After reading your scatterset for bathymetry, go to the dataset toolbox and create a dataset from the "Spatial | Grid Spacing" command. Smooth this dataset using the instructions previous and use it for your size function." - worked fine. I now have a mesh where the resolution resembles my bathymetry scatter data.

I should note that after deleting the island boundaries and setting interpolation options - I had this message: The scatter set has disjointed vertices. Would you like to continue?" - so then I realized that I was not triangulating my scatter data when I was importing it in the first place !! This causes problems.

thank you again Rusty

MO

Link to comment
Share on other sites

If you are using FVCOM instead of ADCIRC, I'm not 100% sure if LTEA is the best thing to use. It is setup to compute the errors in a simple ADCIRC run which wouldn't directly apply to FVCOM since they are using a completely different solution scheme.

It sounds like you are making progress though.

Your step 4 had a crash. If you have the files still and could get them to support@aquaveo.com, we would appreciate it.

I normally use ADCIRC, that's why I want to check LTEA - I never used FVCOM. This mesh is for a friend :)

I had deleted the files so I quickly recreated the boundaries.map. Then I tried to reproduce the crash - and it did, then I tried again and it worked with 199 polygons(grid spacing+area change 0.5 for the scatter paving). It is just not stable. Right after that, I tried (grid spacing + slope change 0.1 ) and it crashed again. I am sending the files now, hope it helps.

Mo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...