Seventh-Fluent-Dynamic Mesh User Guide

Embed Size (px)

Citation preview

  • Computational Fluid DynamicsFluent Modeling CourseSeventh-Fluent 6.2 Dynamic Mesh

    Lecturer: Ehsan SaadatiSharif University of TechnologyFirst Edition -Fall 2008- Not Completed [email protected]

    1

  • Fluent Moving BoundaryDynamic Mesh

    2

  • Introduction FLUENT can model flow involving moving reference frames and

    moving cell zones, using several different approaches, and flow in moving and deforming domains (dynamic meshes).

    Depending on the level of complexity of the motion, and on the flow physics involved, one of FLUENT's moving cell zone models may be the most suited to your application. The most general model for flow in moving and deforming cell zones in FLUENT is the dynamic mesh model.

    3

  • Introduction To use the dynamic mesh model, you need to provide a starting

    volume mesh and the description of the motion of any moving zones in the model. FLUENT allows you to describe the motion using either boundary profiles, user-defined functions (UDFs), or the Six Degree of Freedom solver (6DOF).

    The update of the volume mesh is handled automatically by FLUENT at each time step based on the new positions of the boundaries.

    4

  • Introduction FLUENT expects the description of the motion to be specified on

    either face or cell zones. If the model contains moving and non moving regions, you need to identify these regions by grouping them into their respective face or cell zones in the starting volume mesh that you generate. Furthermore, regions that are deforming due to motion on their adjacent regions must also be grouped into separate zones in the starting volume mesh. The boundary between the various regions need not be conformal. You can use the nonconformal or sliding interface capability in FLUENT to connect the various zones in the final model.

    5

  • Dynamic MeshUpdate Methods Three groups of mesh motion methods are available in FLUENT to

    update the volume mesh in the deforming regions subject to the motion defined at the boundaries:

    Smoothing methods Dynamic layering Local remeshing methods

    6

  • Spring-Based Smoothing Method In the spring-based smoothing method, the edges between any two mesh

    nodes are idealized as a network of interconnected springs. The initial spacing of the edges before any boundary motion constitute the equilibrium state of the mesh. A displacement at a given boundary node will generate a force proportional to the displacement along all the springs connected to the node.

    At equilibrium, the net force on a node due to all the springs connected to the node must be zero. Since displacements are known at the boundaries (after boundary node positions have been updated), Equation 10.6-8 is solved using a Jacobi sweep on all interior nodes. At convergence, the positions are updated

    7

  • Applicability of the Spring-Based Smoothing MethodsFor non-tetrahedral cell zones (non-triangular in 2D), the spring-based

    method is recommended when the following conditions are met:

    1. The boundary of the cell zone moves predominantly in one direction (i.e., no excessive anisotropic stretching or compression of the cell zone).

    2. The motion is predominantly normal to the boundary zone.

    ! If these conditions are not met, the resulting cells may have high skewness values, since not all possible combinations of node pairs in non-tetrahedral cells (or non-triangular in 2D) are idealized as springs.

    8

  • Laplacian Smoothing Method Laplacian smoothing is the most commonly used and the simplest

    mesh smoothing method. This method adjusts the location of each mesh vertex to the geometric center of its neighboring vertices. This method is computationally inexpensive but it does not guarantee an improvement on mesh quality, since repositioning a vertex by Laplacian smoothing can result in poor quality elements. To overcome this problem, FLUENT only relocates the vertex to the geometric center of its neighboring vertices if and only if there is an improvement in the mesh quality (i.e., the skewness has been improved).

    9

  • Dynamic Layering Method In prismatic (hexahedral and/or wedge) mesh zones, you can use

    dynamic layering to add or remove layers of cells adjacent to a moving boundary, based on the height of the layer adjacent to the moving surface. The dynamic mesh model in FLUENT allows you to specify an ideal layer height on each moving boundary.

    If the cells in layer j are expanding, they cell heights are allowed to increase until:

    where hmin is the minimum cell height of cell layer j, hideal is the ideal cell height, and s is the layer split factor. When this condition is met, the cells are split based on the specified layering option: constant height or constant ratio.

    10

  • Dynamic Layering Method If the cells in layer j are being compressed, they can be compressed

    until

    where c is the layer collapse factor. When this condition is met, the compressed layer of cells is merged into the layer of cells above the compressed layer;

    11

  • Applicability of the Dynamic Layering Method

    You can use the dynamic layering method to split or merge cells adjacent to any moving boundary provided the following conditions are met:

    All cells adjacent to the moving face zone are either wedges or hexahedra (quadrilaterals in 2D)

    The cell layers must be completely bounded by one-sided face zones, except when sliding interfaces are used

    If the bounding face zones are two-sided walls, you must split the wall and wallshadow pair and use the coupled sliding interface option to couple the two adjacent cell zones.

    Note that you cannot use the dynamic layering method in conjunction with hanging node adaption.

    12

  • Remeshing Methods On zones with a triangular or tetrahedral mesh, the spring-based

    smoothing method is normally used. The available remeshing methods in FLUENT work for triangular-

    tetrahedral zones and mixed zones where the non-triangular/tetrahedral elements are skipped. The exception is the 2.5D model, where the available remeshing method only work on wedges extruded from triangular surfaces.

    13

  • Local Remeshing MethodUsing the local remeshing method, FLUENT marks cells based on cell skewness and minimum and maximum length scales as well as an optional sizing function.

    FLUENT evaluates each cell and marks it for remeshing if it meets one or more of the following criteria: It has a skewness that is greater than a specified maximum skewness. It is smaller than a specified minimum length scale. It is larger than a specified maximum length scale. Its height does not meet the specified length scale (at moving face zones, e.g.,

    above a moving piston).

    In addition to remeshing the volume mesh, FLUENT also allows triangular and linear faces on a deforming boundary to be remeshed. FLUENT marks deforming boundary faces for remeshing based on moving an deforming loops of faces. You can use the local remeshing method only in cell zones that contain tetrahedral or triangular cells. Note that you cannot use the face region remeshing method in conjunction with hanging node adaption.

    14

  • 2.5D Surface Remeshing Method

    The 2.5D surface remeshing method only applies to extruded 3D geometries and is similar to local remeshing in two dimensions on a triangular surface mesh (not a mixed zone). Faces on a deforming boundary are marked for remeshing based on face skewness, minimum and maximum length scale and an optional sizing function.

    15

  • Applicability of the 2.5D Surface Remeshing Method

    The following applies to the 2.5D surface remeshing method:

    Triangular faces get remeshed based on marking. Extruded prisms get remeshed based on the remeshing of the triangular face. Only extruded regions get remeshed, not mixed regions. Note that you cannot

    use the 2.5D surface remeshing method in conjunction with hanging node adaption.

    16

  • Local Remeshing Based on Size Functions

    Instead of marking cells based on minimum and maximum length scales, FLUENT also marks cells based on the size distribution generated by the sizing function if the Sizing Function option under Options is enabled.

    Local remeshing using size functions can be used with the following remeshing methods:- local remeshing -2.5D surface remeshing

    17

  • Solid-Body Kinematics

    FLUENT uses solid-body kinematics if the motion is prescribed based on the position and orientation of the center of gravity of a moving object. This is applicable to both cell and face zones. The motion of the solid-body can be specified either as a profile or as a user-defined function (UDF).

    A profile may be defined by the following profile fields: time (time) crank angle (angle) (in-cylinder flows only) position (x, y, z) linear velocity (x, y, z) angular velocity (x, y, z) orientation (x, y, z)

    18

  • Solid-Body Kinematics

    By default FLUENT assumes that the motion is specified in the inertial coordinate system. However, it is also possible to prescribe the motion relative to the coordinate system

    19

  • Problem Setup for Dynamic Meshes

    1.Enable the appropriate option for modeling unsteady flow in the Solver panel.2. Set boundary conditions as required.3.Enable the dynamic mesh model, and specify related parameters.4. Specify the motion of the dynamic zones in your model.5. You can display the motion of the moving zones with prescribed motion to verify

    the simulation setup.6. Define the events that will occur during the calculation.7. Save case and data.8. Preview your dynamic mesh setup (when the motion is a prescribed motion).9. Specify the pressure-velocity coupling scheme. For transient flow calculations, the

    PISO algorithm is recommended, as it is the most efficient for such cases10. Use the automatic saving feature to specify the name and frequency with which

    case and data les should be saved during the solution process.

    20

  • Setting Parameters for Dynamic Mesh Modeling

    To enable the dynamic mesh model, turn on Dynamic Mesh in the Dynamic Mesh Parameters panel

    21

  • Setting Parameters for Dynamic Mesh Modeling

    If you are modeling in-cylinder motion, turn on the In-Cylinder option.

    If you are modeling 2.5D applications (e.g., pumps), turn on the 2.5D option (3D flows only).

    If you are going to use the six degrees of freedom solver, then turn on the Six DOF Solver option.

    22

  • Setting Mesh Update Parameters

    SmoothingTo turn on spring-based (or Laplacian smoothing if the 2.5D model is

    enabled), enable the Smoothing option under Mesh Methods in the Dynamic Mesh panel. The relevant parameters are specified in the Smoothing tab.

    23

  • Spring-Based Smoothing You can control the spring stiffness by adjusting

    the value of the Spring Constant Factor between 0 and 1. A value of 0 indicates that there is no damping on the springs, and boundary node displacements have more influence on the motion of the interior nodes. A value of 1 imposes the default level of damping on the interior node displacements as determined by solving related Equation.

    The effect of the Spring Constant Factor is illustrated in front Figures, which show the trailing edge of a NACA-0012 airfoil after a counterclockwise rotation of 2.3 and the mesh is smoothed using the spring-based smoother but limited to 20 iterations.

    Spring Constant 1.0

    Spring Constant 0.0

    24

  • Spring-Based Smoothing If your model contains deforming boundary zones, you can use the Boundary Node

    Relaxation to control how the node positions on the deforming boundaries are updated.

    A value of 0 prevents deforming boundary nodes from moving (equivalent to turning no smoothing on deforming boundary zones) and a value of 1 indicates no under-relaxation.

    You can control the solution of Remeshing Equation using the values of Convergence Tolerance and Number of Iterations. FLUENT solves remeshing Equation iteratively during each time step until one of the criteria are met.

    25

  • Laplacian Smoothing Note that for 2.5D modeling (3D flows only), you can only change the Boundary Node

    Relaxation and the Number of Iterations. Note that the Number of Iterations is used for both spring-based and Laplacian smoothing.

    26

  • Dynamic Layering You can control how a cell layer is split by specifying either Constant Height or

    Constant Ratio under Options. The Split Factor and Collapse Factor are the factors that determine when a layer of cells (hexahedra or wedges in 3D, or quadrilaterals in 2D) that is next to a moving boundary is split or merged with the adjacent cell layer, respectively.

    27

  • Remeshing In local remeshing, FLUENT agglomerates cells based on skewness, size, and height

    (adjacent moving face zones). The value of Maximum Cell Skewness indicates the desired skewness of the mesh. By default, the Maximum Cell Skewness is set to 0.9 for 3D simulations and 0.6 for 2D simulations. Cells with skewness above the maximum skewness are marked for remeshing. The size criteria are specified with Minimum Length Scale and Maximum Length Scale. Cells with length scales below the minimum length scale and above the maximum length scale are marked for remeshing.

    28

  • Remeshing

    For 3D simulations, the Face Remeshing option is available, allowing you the convenience of remeshing deforming boundary faces if you so desire.

    By default, FLUENT replaces the agglomerated cells only if the quality of the remeshed cells has improved. However, you can override this behavior by disabling Must Improve Skewness under Options.

    29

  • Remeshing When you use the Size Function remeshing option, you can control three

    parameters that govern the size function. You can specify the Size Function Resolution, the Size Function Variation, and the Size Function Rate or you can return to FLUENT's default values by using the Use Defaults button.

    The Size Function Resolution controls the density of the background grid The Size Function Variation is the measure of the maximum permissible cell size and it

    ranges from 1 to infinite The Size Function Rate is the measure of the rate of growth of the cell size,

    and it ranges from -0.99 to +0.99

    30

  • Setting In-Cylinder Parameters If you turn on the In-Cylinder model in the Dynamic Mesh Parameters panel , you need to

    specify the Crank Shaft Speed, the Starting Crank Angle, and the Crank Period which are used to convert between flow time and crank angle.

    31

  • Setting In-Cylinder Parameters FLUENT provides a built-in function to calculate the piston location as a

    function of crank angle. If the piston motion is specified using this function, you need to specify the Piston Stroke and Connecting Rod Length. The piston location is calculated using

    where ps is the piston location (0) at top-dead-center (TDC) and A at bottom-dead-center (BDC)), L is the connecting rod length, A is the piston stroke, and c is the current crank angle.

    !!!Not C

    omplete

    d

    32

  • Dynamic Mesh DEFINE Macros This section contains descriptions of DEFINE macros that you can use to

    define UDFs that control the behavior of a dynamic mesh. Note that dynamic mesh UDFs that are defined using DEFINE_CG_MOTION, DEFINE_GEOM, and DEFINE_GRID_MOTION can only be executed as compiled UDFs

    33

  • DEFINE_CG_MOTION You can use DEFINE_CG_MOTION to specify the motion of a particular dynamic zone

    in FLUENT by providing FLUENT with the linear and angular velocities at every time step. FLUENT uses these velocities to update the node positions on the dynamic zone based on solid-body motion. Note that UDFs that are defined using DEFINE_CG_MOTION can only be executed as compiled UDFs.

    34

  • DEFINE_CG_MOTION

    35

  • DEFINE_CG_MOTION

    36

  • DEFINE_GEOMYou can use DEFINE_GEOM to specify the geometry of a deforming zone.

    By default, FLUENT provides a mechanism for defining node motion along a planar or cylindrical surface. When FLUENT updates a node on a deforming zone (e.g., through spring-based smoothing or after local face re-meshing) the node is "repositioned'' by calling the DEFINE_GEOM UDF. Note that UDFs that are defined using DEFINE_GEOM can only be executed as compiled UDFs.

    37

  • DEFINE_GEOM

    38

  • The End

    By: Ehsan SaadatiPardad Petrodanesh [email protected] out more at:www.petrodanesh.irwww.petrodanesh.com

    Slide 1Slide 2IntroductionIntroductionIntroductionDynamic Mesh Update MethodsSpring-Based Smoothing MethodApplicability of the Spring-Based Smoothing MethodsLaplacian Smoothing MethodDynamic Layering MethodDynamic Layering MethodApplicability of the Dynamic Layering MethodRemeshing MethodsLocal Remeshing Method2.5D Surface Remeshing MethodApplicability of the 2.5D Surface Remeshing MethodLocal Remeshing Based on Size FunctionsSolid-Body KinematicsSolid-Body KinematicsProblem Setup for Dynamic MeshesSetting Parameters for Dynamic Mesh ModelingSetting Parameters for Dynamic Mesh ModelingSetting Mesh Update ParametersSpring-Based SmoothingSpring-Based SmoothingLaplacian SmoothingDynamic LayeringRemeshingRemeshingRemeshingSetting In-Cylinder ParametersSetting In-Cylinder ParametersDynamic Mesh DEFINE MacrosDEFINE_CG_MOTIONDEFINE_CG_MOTIONDEFINE_CG_MOTIONDEFINE_GEOMDEFINE_GEOMSlide 39