| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.3.1 Specifying mesh element sizes
There are three ways to specify the size of the mesh elements for a given geometry:
-
First, if
Mesh.CharacteristicLengthFromPointsis set (it is by default), you can simply specify desired mesh element sizes at the geometrical points of the model (with thePointcommand: see Points). The size of the mesh elements will then be computed by linearly interpolating these values on the initial mesh (see Mesh: finite element mesh generation). This might sometimes lead to over-refinement in some areas, so that you may have to add “dummy” geometrical entities in the model in order to get the desired element sizes.This method works with all the algorithms implemented in the mesh module. The final element sizes are of course constrained by the structured algorithms for which the element sizes are explicitly specified (e.g., transfinite and extruded grids: see Structured grids).
-
Second, if
Mesh.CharacteristicLengthFromCurvatureis set (it is not by default), the mesh will be adapted with respect to the curvature of the geometrical entities. -
Finally, you can specify general mesh size “fields”. Various fields
exist:
-
A
PostViewfield specifies an explicit background mesh in the form of a scalar post-processing view (see Post-processing commands, and File formats) in which the nodal values are the target element sizes. This method is very general but it requires a first (usually rough) mesh and a way to compute the target sizes on this mesh (usually through an error estimation procedure, in an iterative process of mesh adaptation). Warning: only parsed (‘.pos’) files can currently be used as background meshes (‘.msh’ files cannot be used, since the mesh used to define the field will be destroyed during the meshing process).(Note that you can also load a background mesh directly from the command line using the
-bgmoption (see section Command-line options), or in the GUI by selecting ‘Apply as background mesh’ in the post-processing view option menu.) -
A
Boxfield specifies the size of the elements inside and outside of a parallelepipedic region. -
A
Thresholdfield specifies the size of the mesh according to the distance to some geometrical entities. These entities can for example be geometry points and lines specified by anAttractorfield. -
A
MathEvalfield specifies the size of the mesh using an explicit mathematical function. -
A
Minfield specifies the size as the minimum of the sizes computed using other fields - …
Fields are supported by all the algorithms except those based on Netgen. The list of available fields with their options is given below.
-
A
The three aforementioned methods can be used simultaneously, in which case the smallest element size is selected at any given point.
All element sizes are further constrained by the
Mesh.CharacteristicLengthMin, Mesh.CharacteristicLengthMax
and Mesh.CharacteristicLengthFactor options (see section Mesh options list)
Here are the mesh commands that are related to the specification of mesh element sizes:
Characteristic Length { expression-list } = expression;Modify the prescribed mesh element size of the points whose identification numbers are listed in expression-list. The new value is given by expression.
Field[expression] = string;Create a new field (with id number expression), of type string.
Field[expression].string = char-expression | expression | expression-list;Set the option string of the expression-th field.
Background Field = expression;Select the expression-th field as the one used to compute element sizes. Only one background field can be given; if you want to combine several field, use the
MinorMaxfield (see below).
Here is the list of all available fields with their associated options:
AttractorCompute the distance from the nearest node in a list. It can also be used to compute the distance from curves, in which case each curve is replaced by NNodesByEdge equidistant nodes and the distance from those nodes is computed.
Options:
EdgesListIndices of curves in the geometric model
type: list
default value:{}FacesListIndices of surfaces in the geometric model (Warning, this feature is still experimental. It might (read: will probably) give wrong results for complex surfaces)
type: list
default value:{}FieldXId of the field to use as x coordinate.
type: integer
default value:-1FieldYId of the field to use as y coordinate.
type: integer
default value:-1FieldZId of the field to use as z coordinate.
type: integer
default value:-1NNodesByEdgeNumber of nodes used to discretized each curve
type: integer
default value:20NodesListIndices of nodes in the geometric model
type: list
default value:{}
AttractorAnisoCurveCompute the distance from the nearest curve in a list. Then the mesh size can be specified independently in the direction normal to the curve and in the direction parallel to the curve (Each curve is replaced by NNodesByEdge equidistant nodes and the distance from those nodes is computed.)
Options:
EdgesListIndices of curves in the geometric model
type: list
default value:{}NNodesByEdgeNumber of nodes used to discretized each curve
type: integer
default value:20dMaxMaxmium distance, above this distance from the curves, prescribe the maximum mesh sizes.
type: float
default value:0.5dMinMinimum distance, bellow this distance from the curves, prescribe the minimum mesh sizes.
type: float
default value:0.1lMaxNormalMaximum mesh size in the direction normal to the closest curve.
type: float
default value:0.5lMaxTangentMaximum mesh size in the direction tangeant to the closest curve.
type: float
default value:0.5lMinNormalMinimum mesh size in the direction normal to the closest curve.
type: float
default value:0.05lMinTangentMinimum mesh size in the direction tangeant to the closest curve.
type: float
default value:0.5
BoundaryLayerhwall * ratio^(dist/hwall)
Options:
AnisoMaxThreshold angle for creating a mesh fan in the boundary layer
type: float
default value:10000000000EdgesListIndices of curves in the geometric model for which a boundary layer is needed
type: list
default value:{}FacesListIndices of faces in the geometric model for which a boundary layer is needed
type: list
default value:{}FanNodesListIndices of vertices in the geometric model for which a fan is created
type: list
default value:{}FansListIndices of edges in the geometric model for which a fan is created
type: list
default value:{}IntersectMetricsIntersect metrics of all faces
type: integer
default value:0NodesListIndices of nodes in the geometric model
type: list
default value:{}QuadsGenerate recombined elements in the boundary layer
type: integer
default value:0hfarElement size far from the wall
type: float
default value:1hwall_nMesh Size Normal to the The Wall
type: float
default value:0.1hwall_tMesh Size Tangent to the Wall
type: float
default value:0.5ratioSize Ratio Between Two Successive Layers
type: float
default value:1.1thicknessMaximal thickness of the boundary layer
type: float
default value:0.01
BoxThe value of this field is VIn inside the box, VOut outside the box. The box is given by
Xmin <= x <= XMax &&
YMin <= y <= YMax &&
ZMin <= z <= ZMax
Options:
VInValue inside the box
type: float
default value:0VOutValue outside the box
type: float
default value:0XMaxMaximum X coordinate of the box
type: float
default value:0XMinMinimum X coordinate of the box
type: float
default value:0YMaxMaximum Y coordinate of the box
type: float
default value:0YMinMinimum Y coordinate of the box
type: float
default value:0ZMaxMaximum Z coordinate of the box
type: float
default value:0ZMinMinimum Z coordinate of the box
type: float
default value:0
CenterlineThe value of this field is the distance to the centerline.
You should specify a fileName that contains the centerline. The centerline of a surface can be obtained with the open source software vmtk (http://www.vmtk.org/) using the following script:
vmtk vmtkcenterlines -seedselector openprofiles -ifile mysurface.stl -ofile centerlines.vtp –pipe vmtksurfacewriter -ifile centerlines.vtp -ofile centerlines.vtk
Options:
FileNameFile name for the centerlines
type: string
default value:"centerlines.vtk"closeVolumeAction: Create In/Outlet planar faces
type: integer
default value:0extrudeWallAction: Extrude wall
type: integer
default value:0hLayerThickness (% of radius) of the extruded layer
type: float
default value:0.3hSecondLayerThickness (% of radius) of the second extruded layer
type: float
default value:0.3nbElemLayerNumber of mesh elements the extruded layer
type: integer
default value:3nbElemSecondLayerNumber of mesh elements the second extruded layer
type: integer
default value:0nbPointsNumber of mesh elements in a circle
type: integer
default value:25reMeshAction: Cut the initial mesh in different mesh partitions using the centerlines
type: integer
default value:0
Actions:
runRun actions (closeVolume, extrudeWall, cutMesh)
CurvatureCompute the curvature of Field[IField]:
F = div(norm(grad(Field[IField])))
Options:
DeltaStep of the finite differences
type: float
default value:0IFieldField index
type: integer
default value:1
CylinderThe value of this field is VIn inside a frustrated cylinder, VOut outside. The cylinder is given by
||dX||^2 < R^2 &&
(X-X0).A < ||A||^2
dX = (X - X0) - ((X - X0).A)/(||A||^2) . A
Options:
RadiusRadius
type: float
default value:0VInValue inside the cylinder
type: float
default value:0VOutValue outside the cylinder
type: float
default value:0XAxisX component of the cylinder axis
type: float
default value:0XCenterX coordinate of the cylinder center
type: float
default value:0YAxisY component of the cylinder axis
type: float
default value:0YCenterY coordinate of the cylinder center
type: float
default value:0ZAxisZ component of the cylinder axis
type: float
default value:1ZCenterZ coordinate of the cylinder center
type: float
default value:0
FrustumThis field is an extended cylinder with inner (i) and outer (o) radiuseson both endpoints (1 and 2). Length scale is bilinearly interpolated betweenthese locations (inner and outer radiuses, endpoints 1 and 2)The field values for a point P are given by : u = P1P.P1P2/||P1P2|| r = || P1P - u*P1P2 || Ri = (1-u)*R1i + u*R2i Ro = (1-u)*R1o + u*R2o v = (r-Ri)/(Ro-Ri) lc = (1-v)*( (1-u)*v1i + u*v2i ) + v*( (1-u)*v1o + u*v2o ) where (u,v) in [0,1]x[0,1]
Options:
R1_innerInner radius of Frustum at endpoint 1
type: float
default value:0R1_outerOuter radius of Frustum at endpoint 1
type: float
default value:1R2_innerInner radius of Frustum at endpoint 2
type: float
default value:0R2_outerOuter radius of Frustum at endpoint 2
type: float
default value:1V1_innerElement size at point 1, inner radius
type: float
default value:0.1V1_outerElement size at point 1, outer radius
type: float
default value:1V2_innerElement size at point 2, inner radius
type: float
default value:0.1V2_outerElement size at point 2, outer radius
type: float
default value:1X1X coordinate of endpoint 1
type: float
default value:0X2X coordinate of endpoint 2
type: float
default value:0Y1Y coordinate of endpoint 1
type: float
default value:0Y2Y coordinate of endpoint 2
type: float
default value:0Z1Z coordinate of endpoint 1
type: float
default value:1Z2Z coordinate of endpoint 2
type: float
default value:2.26338226046034e+146
GradientCompute the finite difference gradient of Field[IField]:
F = (Field[IField](X + Delta/2) - Field[IField](X - Delta/2)) / Delta
Options:
DeltaFinite difference step
type: float
default value:0IFieldField index
type: integer
default value:1KindComponent of the gradient to evaluate: 0 for X, 1 for Y, 2 for Z, 3 for the norm
type: integer
default value:0
LaplacianCompute finite difference the Laplacian of Field[IField]:
F = G(x+d,y,z) + G(x-d,y,z) +
G(x,y+d,z) + G(x,y-d,z) +
G(x,y,z+d) + G(x,y,z-d) - 6 * G(x,y,z),
where G=Field[IField] and d=Delta
Options:
DeltaFinite difference step
type: float
default value:0.1IFieldField index
type: integer
default value:1
LonLatEvaluate Field[IField] in geographic coordinates (longitude, latitude):
F = Field[IField](atan(y/x), asin(z/sqrt(x^2+y^2+z^2))
Options:
FromStereoif = 1, the mesh is in stereographic coordinates. xi = 2Rx/(R+z), eta = 2Ry/(R+z)
type: integer
default value:0IFieldIndex of the field to evaluate.
type: integer
default value:1RadiusStereoradius of the sphere of the stereograpic coordinates
type: float
default value:6371000
MathEvalEvaluate a mathematical expression. The expression can contain x, y, z for spatial coordinates, F0, F1, ... for field values, and and mathematical functions.
Options:
FMathematical function to evaluate.
type: string
default value:"F2 + Sin(z)"
Actions:
testdescription blabla
MathEvalAnisoEvaluate a metric expression. The expressions can contain x, y, z for spatial coordinates, F0, F1, ... for field values, and and mathematical functions.
Options:
m11element 11 of the metric tensor.
type: string
default value:"F2 + Sin(z)"m12element 12 of the metric tensor.
type: string
default value:"F2 + Sin(z)"m13element 13 of the metric tensor.
type: string
default value:"F2 + Sin(z)"m22element 22 of the metric tensor.
type: string
default value:"F2 + Sin(z)"m23element 23 of the metric tensor.
type: string
default value:"F2 + Sin(z)"m33element 33 of the metric tensor.
type: string
default value:"F2 + Sin(z)"
MaxTake the maximum value of a list of fields.
Options:
FieldsListField indices
type: list
default value:{}
MaxEigenHessianCompute the maximum eigenvalue of the Hessian matrix of Field[IField], with the gradients evaluated by finite differences:
F = max(eig(grad(grad(Field[IField]))))
Options:
DeltaStep used for the finite differences
type: float
default value:0IFieldField index
type: integer
default value:1
MeanSimple smoother:
F = (G(x+delta,y,z) + G(x-delta,y,z) +
G(x,y+delta,z) + G(x,y-delta,z) +
G(x,y,z+delta) + G(x,y,z-delta) +
G(x,y,z)) / 7,
where G=Field[IField]
Options:
DeltaDistance used to compute the mean value
type: float
default value:0.0001IFieldField index
type: integer
default value:0
MinTake the minimum value of a list of fields.
Options:
FieldsListField indices
type: list
default value:{}
MinAnisoTake the intersection of a list of possibly anisotropic fields.
Options:
FieldsListField indices
type: list
default value:{}
ParamEvaluate Field IField in parametric coordinates:
F = Field[IField](FX,FY,FZ)
See the MathEval Field help to get a description of valid FX, FY and FZ expressions.
Options:
FXX component of parametric function
type: string
default value:""FYY component of parametric function
type: string
default value:""FZZ component of parametric function
type: string
default value:""IFieldField index
type: integer
default value:1
PostViewEvaluate the post processing view IView.
Options:
CropNegativeValuesreturn LC_MAX instead of a negative value (this option is needed for backward compatibility with the BackgroundMesh option
type: boolean
default value:1IViewPost-processing view index
type: integer
default value:0
RestrictRestrict the application of a field to a given list of geometrical curves, surfaces or volumes.
Options:
EdgesListCurve indices
type: list
default value:{}FacesListSurface indices
type: list
default value:{}IFieldField index
type: integer
default value:1RegionsListVolume indices
type: list
default value:{}
StructuredLinearly interpolate between data provided on a 3D rectangular structured grid.
The format of the input file is:
Ox Oy Oz
Dx Dy Dz
nx ny nz
v(0,0,0) v(0,0,1) v(0,0,2) ...
v(0,1,0) v(0,1,1) v(0,1,2) ...
v(0,2,0) v(0,2,1) v(0,2,2) ...
... ... ...
v(1,0,0) ... ...
where O are the coordinates of the first node, D are the distances between nodes in each direction, n are the numbers of nodes in each direction, and v are the values on each node.
Options:
FileNameName of the input file
type: path
default value:""OutsideValueValue of the field outside the grid (only used if the "SetOutsideValue" option is true).
type: float
default value:0SetOutsideValueTrue to use the "OutsideValue" option. If False, the last values of the grid are used.
type: boolean
default value:0TextFormatTrue for ASCII input files, false for binary files (4 bite signed integers for n, double precision floating points for v, D and O)
type: boolean
default value:0
ThresholdF = LCMin if Field[IField] <= DistMin,
F = LCMax if Field[IField] >= DistMax,
F = interpolation between LcMin and LcMax if DistMin < Field[IField] < DistMax
Options:
DistMaxDistance from entity after which element size will be LcMax
type: float
default value:10DistMinDistance from entity up to which element size will be LcMin
type: float
default value:1IFieldIndex of the field to evaluate
type: integer
default value:0LcMaxElement size outside DistMax
type: float
default value:1LcMinElement size inside DistMin
type: float
default value:0.1SigmoidTrue to interpolate between LcMin and LcMax using a sigmoid, false to interpolate linearly
type: boolean
default value:0StopAtDistMaxTrue to not impose element size outside DistMax (i.e., F = a very big value if Field[IField] > DistMax)
type: boolean
default value:0
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on February 9, 2014 using texi2html 5.0.
