Jump to content
GMS, SMS, and WMS User Forum
Matt_Bilskie

Sizing Function

Recommended Posts

Does anyone know of a way to build a size function and in turn build a mesh that paves with the criterion of adjacent element ratios rather than just element size?

For example, I want my mesh to not exceed element transitions in which elements do not grow faster than 1.33x or decrease smaller than (1/1.33)x from their neighbors.

Edited by Matt_Bilskie

Share this post


Link to post
Share on other sites

Hi Matt,

We have a tool built to do exactly this. It is the "Smooth data sets" functionality in the dataset toolbox.

To use this tool:

1. Create a dataset with the starting sizes (in the scatter module). I would use the dataset calculator and make them all the same large value. Then I would select the nodes that you want the closest spacing on, and change them to this value. When you are done, you should have a size function that is large everywhere except where you want your smallest elements.

2. Bring up the dataset toolbox and choose the "Smooth data sets" tool. You want to select your seed dataset in the tree control in the middle section of the dialog. Use the element area change option and use the value 1/1.33 (0.75) to control growth at the rate you suggest. Leave the anchor to the minimum value. Click Compute.

3. Use the dataset with scalar density paving.

Even if you generate size functions with values everywhere, I think it is a good idea to smooth the size function. It helps generate meshes with smooth transitions and therefore better element quality.

Does anyone know of a way to build a size function and in turn build a mesh that paves with the criterion of adjacent element ratios rather than just element size?

For example, I want my mesh to not exceed element transitions in which elements do not grow faster than 1.33x or decrease smaller than (1/1.33)x from their neighbors.

Share this post


Link to post
Share on other sites

Rusty, thanks for the reply! I am a little confused on the first step. What do you mean by create a dataset with the starting sizes (in the scatter module)?

Currently I have a mesh that is bounded with a 2 feature arcs (an inside and outside arc) creating a polygon. Both arcs include the spacing and exact locations of feature vertexes (this will be appended to an existing mesh later and those are the locations of the nodes). I have given enough room between the 2 arcs to have proper element transition for my criteria of (1/1.33). I want to pave in between them using the "smooth dataset" tool you mentioned. If this is confusing I can send you my map file.

Hi Matt,

We have a tool built to do exactly this. It is the "Smooth data sets" functionality in the dataset toolbox.

To use this tool:

1. Create a dataset with the starting sizes (in the scatter module). I would use the dataset calculator and make them all the same large value. Then I would select the nodes that you want the closest spacing on, and change them to this value. When you are done, you should have a size function that is large everywhere except where you want your smallest elements.

2. Bring up the dataset toolbox and choose the "Smooth data sets" tool. You want to select your seed dataset in the tree control in the middle section of the dialog. Use the element area change option and use the value 1/1.33 (0.75) to control growth at the rate you suggest. Leave the anchor to the minimum value. Click Compute.

3. Use the dataset with scalar density paving.

Even if you generate size functions with values everywhere, I think it is a good idea to smooth the size function. It helps generate meshes with smooth transitions and therefore better element quality.

Share this post


Link to post
Share on other sites

Hi Matt,

When scalar density paving is used, SMS generates elements based upon the specified dataset which has to be in a scatterset. Ideally, this means that if the contour value at a location is 10.0 that an element created at the location would have edges a length of 10.0. Since the scatterset can vary greatly, it isn't always possible to achieve this.

If you use scalar density paving, the spacing on the original arcs isn't used in determining the sizes of the mesh. Doing this would overconstrain the problem and make some pretty ugly meshes.

So in the end, we want a scatterset that is the same size or slightly larger then the mesh we will generate with a dataset representing the target spacing everywhere. If it is essentially the same size, I would use IDW extrapolation to make sure values just outside the scatterset will get valid values.

If you know the size you want at a specific location or multiple locations but want to constrain the rest of the domain based upon a growth rate, you can do this with scalar density paving following the steps I outlined before. I'll try to be a bit more specific in how to create the scatterset and size function. There are a couple options.

One way to create this scatterset would be to create a mesh using standard paving that is slightly larger than your domain. The elevation source can be constant and you don't need to worry about filling holes in the domain. Then using the data calculator, you can create a dataset with the largest size you would consider practical for your problem or slightly larger. Then you change the scatter vertices in the area that you want to force a specific size to the appropriate size. If there are multiple places you want to constrain you can do this. At this point, you use the dataset toolbox smooth size function option and you will end up with a size function that SMS can use to generate a mesh that meets your size specifications and allowable growth rates.

If you have the spacing well defined as you say, you might could get away with just using the standard paving option. If this doesn't quite work, you could generate an initial mesh this way and use it to generate a size function as follows:

1. Setup the meshing problem using standard paving.

2. Do map->2d Mesh to create a mesh.

3. Convert the Mesh to a sctter by right clicking on the mesh and choosing convert to scatter.

4. Use the dataset toolbox "Spatial -> Grid spacing" tool to compute the average element edge size at each node.

5. Use the "smooth datasets" tool as discussed previously to force growth rates and remesh using this size function (use IDW extrap to prevent losing values outside the scatterset).

This last approach will create a mesh with the approximate spacing of the initial mesh created using standard paving but enforces the specified growth rate.

I hope that this clarifies rather than confuses. If not, let me know and I'll take another stab at it.

Rusty, thanks for the reply! I am a little confused on the first step. What do you mean by create a dataset with the starting sizes (in the scatter module)?

Currently I have a mesh that is bounded with a 2 feature arcs (an inside and outside arc) creating a polygon. Both arcs include the spacing and exact locations of feature vertexes (this will be appended to an existing mesh later and those are the locations of the nodes). I have given enough room between the 2 arcs to have proper element transition for my criteria of (1/1.33). I want to pave in between them using the "smooth dataset" tool you mentioned. If this is confusing I can send you my map file.

Share this post


Link to post
Share on other sites

OK, I think I got it. With your steps at the bottom, shouldn't I first compute the grid spacing and then convert the mesh to a scatter and use the grid spacing int he computation during use of the smoothing tool?

Also, is there a way to do this without redistributing the vertices along the arcs (i.e. when using scalar paving density, I do not want my feature vertices to redistribute or change locations)?

Share this post


Link to post
Share on other sites

You can compute grid spacing on the mesh or scatterset and you should get the same answer.

There isn't a way to use scalar density paving and not redistribute vertices. Again, this would overconstrain the problem and lead to poorly formed meshes. If this is an absolute must, you will need to stick with standard paving. However, if your sizes in your size function are very similar to the spacing of your arcs they won't move much.

Good luck.

OK, I think I got it. With your steps at the bottom, shouldn't I first compute the grid spacing and then convert the mesh to a scatter and use the grid spacing int he computation during use of the smoothing tool?

Also, is there a way to do this without redistributing the vertices along the arcs (i.e. when using scalar paving density, I do not want my feature vertices to redistribute or change locations)?

Share this post


Link to post
Share on other sites

You can compute grid spacing on the mesh or scatterset and you should get the same answer.

There isn't a way to use scalar density paving and not redistribute vertices. Again, this would overconstrain the problem and lead to poorly formed meshes. If this is an absolute must, you will need to stick with standard paving. However, if your sizes in your size function are very similar to the spacing of your arcs they won't move much.

Good luck.

Do you think it would be beneficial to maybe look into an option for not having the arcs redistribute vertices, at least along one edge of a polygon? This would be useful for some of our labs work. For example, we build a water only (in-bank) mesh first. Then, we build the floodplain mesh apart from the in-bank mesh using the node placement of the in-bank mesh shoreline as a boundary. Finally we append both meshes together where the shoreline nodes match up exactly so it becomes seamless. Perhaps there is another approach to this, but if interested, we can converse about this another time.

Thank you for the help on this topic, and quick replies!

Share this post


Link to post
Share on other sites

I still think the approach is problematic. What happens if the user locks the spacing but their size function right next to the boundary specifies a size much smaller or larger? You end up with funny shaped elements because you are trying to make elements the spacing of the boundary and the spacing of the size function.

I haven't tried this but I wonder if there is a way to make it work. Let's say you do your in-bank mesh just like you currently do. Then you convert the mesh boundary to arcs to use for your floodplain mesh. Once you have that setup, you create arcs offset from your mesh boundary inside the area you want to mesh and build the polygons. At this point you have something like a funny shaped donut or more likely multiple funny shaped donuts. The outside arcs have the node spacing exactly like your mesh. Then you specify that you want to use scalar density paving on the inner polygon (not adjacent to the original mesh boundary) and standard paving in the outer polygon. Scalar density paving will force the vertices on the inner arc to redistribute to match the size function but the outer arcs won't be redistributed. The only problem with this is that you would probably have to tweak your inner polygon points to get it to look nice with few bad transitions.

Why don't you mesh both parts at the same time in neighboring polygons? It seems all of this would just go away if you did it all together.

Do you think it would be beneficial to maybe look into an option for not having the arcs redistribute vertices, at least along one edge of a polygon? This would be useful for some of our labs work. For example, we build a water only (in-bank) mesh first. Then, we build the floodplain mesh apart from the in-bank mesh using the node placement of the in-bank mesh shoreline as a boundary. Finally we append both meshes together where the shoreline nodes match up exactly so it becomes seamless. Perhaps there is another approach to this, but if interested, we can converse about this another time.

Thank you for the help on this topic, and quick replies!

Share this post


Link to post
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...

×
×
  • Create New...