FloSewn / TQMesh

A simple two-dimensional mesh generator with triangular and quadrilateral elements in C++
MIT License
57 stars 16 forks source link

[Question] What is the meaning of scale and range parameters? #10

Open OpenFoam-User opened 1 year ago

OpenFoam-User commented 1 year ago

Hello,

In the examples under input directory, one can find the following:

  #                         VERTICES     
  # Arguments:
  #   1) X-coordinate
  #   2) Y-coordinate
  #   3) Scale parameter
  #   4) Range parameter

...
...

Could you please explain the meaning of the last two parameters Scale parameter and Range parameter ?

I appreciate your help

Thank you

FloSewn commented 1 year ago

Hey there,

to determine the size of the elements at any point in the domain we use a mathematical function that is constructed by all boundary vertices. Both scale and range parameters are used for this function, where the scale parameter sets (more or less) the local element size in the vicinity of a boundary vertex. The range parameter controls the range within which the specified element scale around the boundary vertex is to be maintained.

Greetings Flo

OpenFoam-User commented 1 year ago

Thanks for the explanation.

In what units should one expect scale and range parameters to be? are they in the same units of the vertices (e.g meter or whatever) or (some percentage)?

FloSewn commented 1 year ago

The scaling factor is a dimensionless number > 0 - it gets multiplied with the global grid scale (which is set in the input file), in order to estimate the local grid scale (so you could see its unit as percentage).

The unit of the range parameter is an actual length scale.

Greetings Flo

FloSewn commented 1 year ago

Hey there,

the meaning of the scale parameter has been adjusted in the newest release (v1.3), since it seemed to be a bit confusing.

The provided number does now define a local mesh scale that is applied - and not a scaling number by which the global mesh scale is multiplied as before.

Hopefully, this will also simplify the overall meshing process.

Greetings Flo