NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
Refinement

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. Required
    • Type: One of "Constant", "Variation", "Derivative", "Given", "Implied", or "Curvature" Required; see below for further explanation
    • Knob: Scales the size field by multiplying the metric by the inverse square of "Knob". Required
    • Tag Name: . Required for "Variation", "Derivative", and "Given" types, ignored for other types
    • Isotropy: 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: Optional
  • Should 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". Optional
  • Max Length: Sets the maximum edge length in metric space if "Should Limit Lengths" is true. Optional
  • Min Length: Sets the minimum edge length in metric space if "Should Limit Lengths" is true. Optional
  • Should Limit Gradation: If true, adjusts the metric size field to limit its gradation. Optional
  • Max Gradation Rate: Sets the maximum gradation if "Max Gradation Rate" is true. Optional
  • Gradation Convergence Tolerance: Sets the gradation convergence tolerance if "Max Gradation Rate" is true. Optional
  • Should 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". Optional
  • Max ElementCount: Sets the maximum element count if "Should Limit Element Count" is true. Optional
  • Min Element Count: Sets the minimum element count if "Should Limit Element Count" is true. Optional
  • Element Count Over Relaxation: Describes how aggressively the metric should be scaled. Optional
  • N smoothing Steps: Specifies the number of times the metric smoothing algorithm should be applied. Optional
  • Min 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 meshes
  • Min 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 meshes
  • N sliver Layers: Optional
  • Verbosity: Optional
  • Length Histogram Min: Optional
  • Length Histogram Max: Optional
  • N length Histogram Bins: Optional
  • N quality Histogram Bins: Optional
  • Should Refine: Optional
  • Should Coarsen: Optional
  • Should Swap: Optional
  • Should Coarsen Slivers: Optional
  • Should Prevent Coarsen Flip: Optional
  • Transfer Options: Optional
    • Name: Specifies the name of a data array/tag. Required
    • Method: One of "Inherit", "Linear Interp", "Metric", "Pointwise", "Density", or "Conserve". Required. Only "Linear Interp", "Inherit", and "Pointwise" are meaningful for quad/hex meshes
    • Integral Name: Required if transfer method is "Conserve"
  • Transfer Integral Options: Required if transfer method is "Conserve"
    • Integral Name: Required
    • Type: Required
    • Tolerance: Optional
    • Floor: Optional

Metric Sources

  • Type:
    • Constant: specifies a uniform size field
    • Variation: specifies a size field based on the derivative of "Tag Name", which must be the name of a tag on the elements of the vertices
    • Derivative: specifies a size field based on the Hessian of "Tag Name", which must be the name of a tag on the elements of the vertices
    • Given: specifies a size field given by "Tag Name", which must be the name of a tag on the vertices
    • Implied: specifies the size field implied by the current mesh
    • Curvature: specifies a size field based on the curvature of the surface of the mesh
  • Isotropy:
    • Anisotropic: does not alter the metric source
    • Length: turns an anisotropic metric into an isotropic one by choosing the maximum metric in any direction
    • Size: 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 count
    • Scales: allows scaling of the metric source to compensate for a specific targeted element count

Transfer 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 dimensions
    • Linear Interp: linearly interpolates "Name", assumed to be defined on points, to the new mesh
    • Metric: interpolates "Name", defined on the vertices, by treating it as a metric tensor
    • Pointwise: copies value from the nearest cell on the original mesh
    • Density: conserves some quantity when transferring
    • Conserve: 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: Required
  • StdDev Multiplier: Required
  • Max Is Min for Scaling: Required
  • Transfer Data: Required
  • Size Factor: Optional; default is 1.
  • Edge Scaling:
  • Transfer Data:
  • Refinement Interval: default is 1
  • Maximum Refinement: Sets the maximum number of times a cell can be refined. default is 1
  • Buffer Layers: default is 1
  • Max Cells: default is 500000
  • Write 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: Required
  • Transfer Data: Required
  • Array Name: Required
  • Order: Required