Adaptive Mesh Refinement is a meshing service designed to apply on-the-fly mesh refinement and coarsening for CFD and finite element modeling simulations based on machine learning and solution field values. This service currently has two modules, one for hexahedral meshes and one for tetrahedral meshes, both of which support user-defined and machine-learning-based refinement and coarsening.
Refinement JSON Template
A mesh generation JSON file contains two sections: "Mesh File Options"
, where the names of the input and output meshes are specified, and "Refinement Options"
, where the refinement method and its associated parameters are specified.
{ "Program Type": "Refinement", "Mesh File Options": { "Input Mesh File": "unrefined_mesh.vtu", "Output Mesh File": "refined_mesh.vtu" }, "Refinement Options": { "Refinement Method": "<REFINEMENT METHOD>", ... } }
"<REFINEMENT METHOD"
can be replaced with one of the refinement methods available within Promesh:
"Omega_h"
"value"
"gradient"
"uniform"
"FV"
"Z2 Error Estimator"
Metric Sources
: Defines the set of metric tensors that Omega_h will intersect to form the size field that the mesh refinement algorithm targets. RequiredType
: One of "Constant"
, "Variation"
, "Derivative"
, "Given"
, "Implied"
, or "Curvature"
Required; see below for further explanationKnob
: Scales the size field by multiplying the metric by the inverse square of "Knob"
. RequiredTag Name
: . Required for "Variation"
, "Derivative"
, and "Given"
types, ignored for other typesIsotropy
: One of "Anisotropic"
, "Length"
, or "Size"
. Required. Default is "Anisotropic"
Scales
: Either "Absolute"
or "Scales"
. Required. Default is "Scales"
Reconstruct Geometry
: Optional; default is false
Verbose
: OptionalShould Limit Lengths
: If true
, allows the size field to be clamped so that the edge lengths in metric space are between "Min Length"
and "Max Length"
. OptionalMax Length
: Sets the maximum edge length in metric space if "Should Limit Lengths"
is true
. OptionalMin Length
: Sets the minimum edge length in metric space if "Should Limit Lengths"
is true
. OptionalShould Limit Gradation
: If true
, adjusts the metric size field to limit its gradation. OptionalMax Gradation Rate
: Sets the maximum gradation if "Max Gradation Rate"
is true
. OptionalGradation Convergence Tolerance
: Sets the gradation convergence tolerance if "Max Gradation Rate"
is true
. OptionalShould Limit Element Count
: If true
, allows the size field to be scaled so that the resulting number of elements falls between "Min Element Count"
and "Max Element Count"
. OptionalMax ElementCount
: Sets the maximum element count if "Should Limit Element Count"
is true
. OptionalMin Element Count
: Sets the minimum element count if "Should Limit Element Count"
is true
. OptionalElement Count Over Relaxation
: Describes how aggressively the metric should be scaled. OptionalN smoothing Steps
: Specifies the number of times the metric smoothing algorithm should be applied. OptionalMin Length Desired
: Minimum length (in metric space) before edge is a candidate for coarsening. Optional; default is \(1/\sqrt{2}\)Max Length Desired
: Maximum length (in metric space) before edge is a candidate for refinement. Optional; default is \(\sqrt{2}\)Max Length Allowed
: Maximum length (in metric space) above which the algorithm will continue to iterate. Optional; default is \(2/\sqrt{2}\)Min Quality Allowed
: Minimum quality below which the algorithm will continue to iterate. Optional; default is 0.3 for 2D meshes and 0.2 for 3D meshesMin Quality Desired
: Specifies the threshold below which elements are marked as slivers for coarsening/edge swapping Optional; default is 0.4 for 2D meshes and 0.3 for 3D meshesN sliver Layers
: OptionalVerbosity
: OptionalLength Histogram Min
: OptionalLength Histogram Max
: OptionalN length Histogram Bins
: OptionalN quality Histogram Bins
: OptionalShould Refine
: OptionalShould Coarsen
: OptionalShould Swap
: OptionalShould Coarsen Slivers
: OptionalShould Prevent Coarsen Flip
: OptionalTransfer Options
: OptionalName
: Specifies the name of a data array/tag. RequiredMethod
: One of "Inherit"
, "Linear Interp"
, "Metric"
, "Pointwise"
, "Density"
, or "Conserve"
. Required. Only "Linear Interp"
, "Inherit"
, and "Pointwise"
are meaningful for quad/hex meshesIntegral Name
: Required if transfer method is "Conserve"
Transfer Integral Options
: Required if transfer method is "Conserve"
Integral Name
: RequiredType
: RequiredTolerance
: OptionalFloor
: OptionalMetric Sources
Type
:Constant
: specifies a uniform size fieldVariation
: specifies a size field based on the derivative of "Tag Name"
, which must be the name of a tag on the elements of the verticesDerivative
: specifies a size field based on the Hessian of "Tag Name"
, which must be the name of a tag on the elements of the verticesGiven
: specifies a size field given by "Tag Name"
, which must be the name of a tag on the verticesImplied
: specifies the size field implied by the current meshCurvature
: specifies a size field based on the curvature of the surface of the meshIsotropy
:Anisotropic
: does not alter the metric sourceLength
: turns an anisotropic metric into an isotropic one by choosing the maximum metric in any directionSize
: turns an anisotropic mesh into an isotropic one by choosing the isotropic mesh that preserves the area/volume of the elements.Scales
:Absolute
: prevents scaling of the metric source to compensate for a specific targeted element countScales
: allows scaling of the metric source to compensate for a specific targeted element countTransfer Options
Method
:Inherit
: copies values from higher dimensional elements to lower dimensional ones. It is assumed that there exists a tag named "Name"
for all dimensionsLinear Interp
: linearly interpolates "Name"
, assumed to be defined on points, to the new meshMetric
: interpolates "Name"
, defined on the vertices, by treating it as a metric tensorPointwise
: copies value from the nearest cell on the original meshDensity
: conserves some quantity when transferringConserve
: conserves some quantity when transferring. Requires specifying "Integal Name"
Transfer Integral Options
Type
:None
:Relative
:Absolute
:This is indicated with:
"Refinement Options": { "Refinement Method": "value", ... }
or
"Refinement Options": { "Refinement Method": "gradient", ... }
but the subsequent parameters are the same.
Array Name
: RequiredStdDev Multiplier
: RequiredMax Is Min for Scaling
: RequiredTransfer Data
: RequiredSize Factor
: Optional; default is 1.Edge Scaling
:Transfer Data
:Refinement Interval
: default is 1Maximum Refinement
: Sets the maximum number of times a cell can be refined. default is 1Buffer Layers
: default is 1Max Cells
: default is 500000Write Field Data?
: default is false
Write Mesh?
: default is false
Write Refinement Data?
: default is false
Time Step
:End Time
:Start Time
:ML Kernel
:ImproveMeshQuality
: RequiredTransfer Data
: RequiredArray Name
: RequiredOrder
: Required