Sizing function

Hi,

Is there a way to define a custom sizing function other that import from an exodus file, using the python interface?
Right now, my workflow is the following:

  1. create geometry
  2. create background mesh
  3. create exodus sizing function, save into exodus file
  4. delete mesh
  5. import exodus sizing function
  6. remesh

It would be really nice to be able to avoid re-importing the sizing function (it takes quite a long time on complex meshes).

Blaise

There currently isn’t a custom sizing function, but maybe the sizing function could be used to do what you want. What specifically would you like to do?

Hi,

An example of what I am trying to do would be meshing a brick with small spherical inclusions, in such a way that a fine mesh size is given in the inclusions and the mesh gradually coarsens away from them up to a coarse size.
I have tried bias + factor sizing function but it is not flexible enough.
If I only specify the fine mesh size and the coarse size, the mesh quality os extremely poor (as in the transition from fine to coarse mesh takes place way too quickly)

Blaise

I hope I understand what you are trying to do correctly. You can use sizing on the inner and outer surfaces to have the transition from fine to coarse

reset
brick x 10
create sphere radius 1
subtract body 2 from body 1

surface 8 size 0.1
surface 1 to 6 size 1

volume 3 scheme Tetmesh
mesh volume 3

draw tet all
graphics clip on
graphics clip man off
rotate -90 about y

Is this helpful?

This is pretty darn close, yes!
Is there a way to control the speed of the transition?

I’m not aware of a growth factor setting, but will ask around.

One way is to play with the sizing. For example,

surface 8 size 0.1
surface 1 to 6 size 2

or

surface 8 size 0.05
surface 1 to 6 size 2

Another way would be to cut the volume and place a curve with a bias that acts as a guide line for the mesh.