**yams_ghs3d#

Description#

This command can be used for remeshing an input Zebulon mesh by means of the DISTENE remeshing tools. There are basically 3 different pieces of software that may be used to build the new mesh:

    1. Yams is used for remeshing a surface mesh (that may be built from the skin of a 3D mesh or directly from a shell mesh) according to various criterions,

    1. Ghs3d is a general purpose 3D mesher that takes as input a surface mesh and fills the volume with tetrahedra,

    1. given a metric map, Meshadapt performs either surface, volume, or surface+volume adaptation at the same time. The metric map is made of the desired sizes of vertices (edges) connected to each vertex (node) of the mesh. Since this map is given on the initial mesh, several iterations may be needed in the adaptation process.

Those tools are fully interfaced for Zebulon and the yams_ghs3d command automatically writes out DISTENE input and reads in DISTENE output files to build the Zebulon mesh. DISTENE binaries are included in the standard Zebulon distribution (in the $Z7PATH/PUBLIC/lib-$Z7MACHINE/Zmesh/ folder), but an optional license key is needed to run those software. Yams, Ghs3d, and Meshadapt manuals are also available in the Zmesh/ folder, and the user may have a look at those if a fine tuning of the remeshing process is needed.

Note that only linear elements are handled by yams_ghs3d. A combination of the quad_to_lin (before yams_ghs3d) and lin_to_quad commands (after) may then be used to allow the use of quadratic meshes. Warning: if a computation result is available, the mesh will be deformed before remeshing.

Syntax#

The command has the following syntax:

**yams_ghs3d \(~\,\) [ *yams_only ] \(~\,\) [ *ghs_only ] \(~\,\) [ *nb_iter_surf niter-surf ] \(~\,\) [ *nb_iter_vol niter-vol ] \(~\,\) [ *nb_iter niter ] \(~\,\) [ *force_meshadapt ] \(~\,\) [ *refinement_origin origin-nset ] \(~\,\) [ *refinement func(x,y,z) ; ] \(~\,\) [ *refinement_file fname ] \(~\,\) [ *absolu ] \(~\,\) [ *min_size min ] \(~\,\) [ *max_size max ] \(~\,\) [ *gradation grad ] \(~\,\) [ *tolerance tol ] \(~\,\) [ *optim_style opt ] \(~\,\) [ *preserve_faset bset-name1 bset-name2 … ] \(~\,\) [ *preserve_liset bset-name1 bset-name2 … ] \(~\,\) [ *yams_options yams-options ] \(~\,\) [ *ghs3d_options ghs3d-options ] \(~\,\) [ *meshadapt_options meshadapt-options ]

*yams_only

forces surface remeshing only (ie. performing only step i)).

*ghs_only

forces volume remeshing only (ie. performing only step ii)).

*nb_iter_surf

if a metric map is given, this command allows to specify the number niter-surf of iterations involved in step i) to satisfy a given metric map for the surface mesh (default is niter-surf=3).

*nb_iter_vol

if a metric map is given, this command allows to specify the number niter-vol of iterations involved in step iii) to satisfy a given metric for the volume mesh (default is niter-vol=2),

*nb_iter

this command can be used to define both niter-surf and niter-vol at the same time (niter-surf=niter-vol=niter in this case).

*force_meshadapt

when a metric map is given as input to drive the remeshing process, this option has the effect to force the use of Meshadapt instead of Yams during step i). Note that in this case Meshadapt is run only 1 time during step i) (option -O1 for surface adaptation) and nb_iter times during step ii) (option -O3 for surface+volume adaptation),

*refinement_origin

this command is used to define the name origin-nset of an nset taken as a base to calculate the metric map according to function func(x,y,z) (see next command),

*refinement

this command defines the function func(x,y,z) used to compute the metric map (see explanations in the Metric map calculation paragraph). Note the only variables allowed in this function are x, y or z and that the definition should end with a ";" character.

*refinement_file

with fname the name of a metric map file (the file syntax is explained in the Metric map calculation paragraph).

*absolu

is a Yams option and is only used during step i). In this case edge sizes (arguments of the *min_size or *max_size commands, and/or values given in the metric map) are absolute values. The default alternative is to use relative values (ie. sizes are scaled by size of the bounding box of the initial mesh, see the Yams user manual).

*gradation grad

is a Yams only option (step i) that may be used to control the element size variation (please refer to the Yams user manual).

*tolerance tol*

is a Yams only option (step i) used to set the value tol of the maximum chordal deviation tolerance (please refer to the Yams user manual).

*optim_style opt

is a Yams only option (step i) and can be used to specify the type of optimization style (coarsening, enrichment etc… please refer to the Yams user manual). Default is opt=2 for geometrical mesh enrichment.

*preserve_XXset

used to preserve set(s) during surface remeshing. This can only be applied to set(s) located on the mesh skin and it does not mean that the exact set(s) topology should be kept (set(s) is/are rebuilt after the remeshing process: position and element type could have changed).

*yams_options, *ghs3d_options, and *meshadapt_options

these commands are meant for advanced DISTENE tools users, and allow to specify manually the DISTENE software command line options (see user manuals in the Zmesh/ folder). Default values are in general appropriate for typical Zebulon applications.

Calculation of the metric map

The metric map is defined by a set \(\mathcal{P}\) of base points with the target element sizes near those points:

(4)#\[\mathcal{P} ~=~\left\{~ P_i(x_i,y_i,z_i)~,~ d_i ~~~;~~~i=1,...,n_b~\right\}\]

where \(n_b\) if the number of base points, \(P_i\) a particular point in \(\mathcal{P}\) with coordinates \((x_i,y_i,z_i)\) and a prescribed size of \(d_i\).

\(\mathcal{P}\) may be defined either by commands *refinement_origin or *refinement_file:

  • *refinement_origin origin-nset fills \(\mathcal{P}\) with points corresponding to nodes in nset origin-nset,

  • *refinement_file fname defines the name of a file containing \(P_i\), \(d_i\). Syntax of this ASCII file is the following one:

    • first line:
      \(n_b\) (number of base points: 1 integer)
    • line \(2\) to \(n_b+1\)
      \(x_i~~y_i~~z_i~~d_i\) (definition of \(P_i\) coordinates and prescribed size: 4 double values)

Then for each node \(N\) in the current mesh, the prescribed size \(d(N)\) of element edges built from node \(N\) is calculated in the following way:

  • first, find closest point \(P^*\) from \(N\) in set \(\mathcal{P}\):
    \(P^*~~~\)such that \(~~distance(P^*,N) ~=~ Min \left\{~ distance(P_i,N)~~,~~i=1,...,n_b ~\right\}\)
  • then, if a function func(x,y,z) is given by means of command *refinement:

    (5)#\[d(N)~=~func(x^*,y^*,z^*)\]

    with \((x^*,y^*,z^*)\) the coordinates of point \(P^*\),

  • else:

    (6)#\[d(N)~=~d^*\]

    with \(d^*\) the prescribed size given for point \(P^*\) in \(\mathcal{P}\).

  • finally, if either commands *min_size min or max_size max are specified:
    if \(~~d(N)<\)min  then \(d(N)=\)min
    if \(~~d(N)>\)max  then \(d(N)=\)max

Note that the option *absolu is advised in this case to insure that \(d(N)\) values calculated do correspond to actual edge sizes in the finite element mesh.

Example#

See tests in folder $Z7PATH/TESTS/Distene_test/INP/.

****mesher
 ***mesh output
  **open input.geof
  **yams_ghs3d
   *force_meshadapt
   *nb_iter 3
   *absolu
   *min_size 0.03
   *max_size 0.2
   *preserve_faset haut-ext bas-ext U1=0 U3=0
   *refinement_origin bas-ext
   *refinement x*x+y*y+z*z;
****return