3.2.1. Mesh Controls for Automatic Meshing

Automatic meshing in Ansys Forte uses on-the-fly Cartesian volume mesh generation combined with immersed boundary method. Mesh update intervals are controlled by a combination of the following input parameters and constraints:

Time Interval: Mesh will be updated if the elapsed time since the previous mesh update is exceeding this user-specified time interval.

Rotation/Crank Angle Interval: The mesh update interval is controlled to be approximately equivalent to this angle interval. This angle is with respect to the rotation motion of the highest RPM in the simulation system, including both slider-crank motion (piston motion in IC engine cases), simple rotation, and planetary motion (including both primary rotation and secondary rotation).

Flow Travel Distance: This distance threshold is used to limit the mesh update interval to be sufficiently small such that the distance the flow with the largest velocity magnitude can travel between two consecutive mesh updates will not exceed this threshold.

Spray Particle Travel Distance: This distance threshold is used to limit the mesh update interval to be sufficiently small such that the distance the fastest-traveling spray particle can travel between two consecutive mesh updates will not exceed this threshold.

Flame Propagation Distance: This distance threshold is used to limit the mesh update interval to be sufficiently small such that the distance the fastest-traveling flame can propagate between two consecutive mesh updates will not exceed this threshold.

When Automatic Meshing is indicated, the Mesh Controls tree contains two sub-nodes for required input: Material Point and Global Mesh Size.

Material Point: This is a point that is inside the cylinder throughout the cycle and that enables the automatic mesh generation to stay within the boundaries. You must set this point appropriately before the automatic meshing can work properly.


Note:  The Material Point must be located in a position that is always inside the geometry during the entire cycle and is at least one unit cell length away from any boundaries.


Global Mesh Size: Affects meshing and refinement throughout the system.

  • Mesh Size: A specified dimension of a cell side throughout the system to use as a standard for specifying other mesh cell sizes, usually as a fraction of this value. Specifying a value too small will lengthen solution time. Units are user-selectable.

In addition to the controls described above, the Mesh Controls icon bar (as well as right-clicking the Mesh Controls node on the Workflow tree) provides icons that can be used to create additional mesh-size constraints.

Each of the mesh-size controls can be specified as static (Always active) or dynamic (active only During specified time or crank-angle intervals) with a reference to a relative time frame (see Time Frames). For example, refinement in the squish region near a moving piston boundary may only be necessary when the piston is near top-dead-center (TDC) position. For simulation of a full cycle, this may mean setting two controls for the two intervals (for example, 350 to 370 CA, 710 to 730 CA) during the cycle of a 4-stroke engine while the squish region is most active. However, near the valve seat, mesh refinement must Always be set to 1/4 or finer.

If the mesh-size controls are active During Crank Angle Interval, you can select the Crank Angle Option as Cyclic or Global. The Cyclic option is helpful in specifying controls that are repetitive in a multi-engine-cycle simulation. In this case, the user-supplied crank angle values will be converted to fit in the range of [0, 720) °CA (for 4-stroke engines) or [0, 360) °CA (for 2-stroke engines). The activation interval will then be treated as cyclic and repeated on a 720-degree schedule (4-stroke) or 360-degree schedule (2-stroke). You may choose to Use Global Crank Angle Limits to impose a global crank angle range for the cyclic repetition, beyond which mesh-size controls are not active. If the Crank Angle Option is Global, no cyclic conversion is applied to the user-supplied crank angle values.

  • Point Refinement Depth   : A Point Refinement is a sphere of mesh-size influence, where you specify the minimum size for a cell edge within that sphere, relative to the Global Mesh Size, the location of the point at the center of the sphere, and the radius of the sphere in absolute physical units. These parameters are entered in the Point Refinement Editor panel after a new control is created. Since you can have multiple points of refinement, you can name each control for reference purposes and it will appear with that name in the Mesh Controls list.

  • Surface Refinement Depth   : Surface refinement allows you to specify a mesh-size constraint at any surface defined in the geometry, such as an inlet or valve surface. The Editor panel includes specification of the minimum size relative to the Global Mesh Size, as well as selection of one or more boundaries at which the size constraint will apply.

  • Feature Refinement Depth   : Feature refinement allows you to specify a mesh-size constraint to be applied along edges whose feature angle is greater than a specified feature-angle threshold value. The Editor panel includes specification of the feature angle and a distance away from the feature angle to apply the refinement. Feature angle (φ) is defined as the angle between the two adjacent faces along an edge (see Figure 3.12: Feature Refinement Depth diagram illustrating phi).

    Figure 3.12: Feature Refinement Depth diagram illustrating phi

    Feature Refinement Depth diagram illustrating phi

  • Line Refinement Depth   : Line refinement allows you to specify a mesh-size constraint along any line in the geometry. The Editor panel includes specification of the minimum size relative to the Global Mesh Size, as well as selection of one or more boundaries at which the size constraint will apply.

  • Gap Feature Refinement Control and Gap Resistance Model   : Gap feature refinement allows you to specify a mesh-size constraint along a small gap formed by two surfaces. Each gap definition must select exactly two surfaces as its Location. Fluid cells residing in the gap region will be marked as gap cells based on gap detection criteria. Each gap cell will be assigned a gap size value based on the closest gap distance measured in the geometry.

    The Surface Proximity is a distance criterion for identifying the gap zone, where a fluid region will be identified as a gap if the distance between the two nearby surfaces is smaller than the Surface Proximity value. The guideline on setting the Surface Proximity value is that it should be equal to or slightly larger than the local volume mesh size near the surfaces that form the gap, after considering the surface depth mesh refinement applied to the surfaces and before considering the gap feature mesh refinement. Following this guideline, the Surface Proximity value can be either manually specified or automatically determined. In the automatic determination option, the value is set to be equal to the local surface depth refinement at the gap times a 1.1 factor.

    The Surface Alignment Threshold controls the angular deviation allowed between the faces defining the gap in the gap cell detection. A value of zero indicates the faces bounding a gap must be parallel, a higher value is more permissive and will detect more cells.

    If the gap sizes in the geometry are larger than the physical values, you can turn on the Enable Gap Model to model the higher resistance caused by the smaller physical gap sizes. The gap resistance model is formulated based on the analytical solution of a shear flow between two parallel plates. The gap resistance factor is defined as the ratio of decelerated velocity and the original velocity:

    (3–1)

    where is the gap size, is the kinematic viscosity, and is the CFD time step. Gap sizes are measured based on the surface proximity in the geometry. In some special cases where the geometric gap size is not the same as the real gap size, the Gap Size Scale Factor can be used to scale the measured gap sizes to match their "real" physical values. The scaled gap size, computed as , is then used as the input of the gap resistance model.

    The Block Flow Across Gap option in the gap model allows the flow leakage across the gap zone to be minimized. If the gap is associated with a built-in FSI or System Coupling FSI, the blockage will be applied only when the moving body of the FSI is inactive, that is, when its displacement is below the activation threshold. It is recommended that the blockage be turned on for gaps associated with FSI. For gaps not associated with FSI, it is typically unnecessary to turn on this blockage option. Note that this flow blockage option cannot completely block the flow. It can only mitigate the leakage through the gap as much as possible.

  • Secondary Volume   : Creates a Secondary-Volume-based mesh control in the Workflow tree for specifying a multiplier to the mesh size to a selected sub-volume. For more information about sub-volume and how to specify it, refer to Sub-Volumes. This mesh control allows you to use a mesh size different from the global mesh size in the sub-volume. You may set the mesh size smaller than the global mesh size to get finer mesh resolution in the sub-volume. Alternatively, you can set a mesh size larger than the global mesh size, which may be useful in allowing certain regions of the domain to remain coarse when refinement is not needed. For example, in an engine simulation, it allows keeping the port region coarse when valves are closed.

  • Solution Adaptive Meshing   : Solution adaptive meshing allows refining the mesh based on a solution field (or gradient) at the current time step. Both a solution field and selection criteria must be specified. Cells meeting the selected criteria will be refined one level per mesh update, up to the maximum depth specified in the control. Previously refined cells that no longer meet the criteria will be coarsened one level per mesh update, up to the default cell depth, unless influenced by another control. Three types of criteria are available:

    1. Statistical

      This will target cells whose field value lies beyond a user-specified statistical significance of the bulk fluid value, given as a multiple of the standard deviation (sigma) of the field or gradient average:

      low_threshold = field_average + sigma_threshold * sigma

      high_threshold = infinity

      Cells whose field or gradient value is greater than low_threshold and less than high_threshold will be targeted for refinement. This approach is especially useful when applied to gradients. A sigma threshold value between 0.5 and 1.0 is recommended. A lower value lowers the threshold used to target cells and therefore leads to more refinement, while a higher value raises the threshold and results in less refinement.

    2. Percentage of current solution bounds

      This will target cells whose field value lies within the user-specified range, where the range is defined as described in this table:

      criterion

      user-specified range

      field_min

      minimum value of the selected field or gradient at the current time step

      field_max

      maximum value of the selected field or gradient at the current time-step

      lower_bound

      user input (as percentage, for example, 50.0 for 50%)

      upper_bound

      user input (as percentage, for example, 50.0 for 50%)

      low_threshold

      field_min + (lower_bound / 100.0) * (field_max - field_min)

      high_threshold

      field_min + (upper_bound / 100.0) * (field_max - field_min)

      Cells whose field or gradient value is greater than low_threshold and less than high_threshold will be targeted for refinement. Note this criterion is currently unavailable when a species field or gradient is selected.

    3. Absolute value

      This allows expressing the range of values used to target cells directly. Cells whose field or gradient value is greater than the given lower bound and less than the given upper bound will be targeted for refinement.