编程开源技术交流,分享技术与知识

网站首页 > 开源技术 正文

Fluent 重叠网格和动态网格 教程

wxchong 2025-03-04 14:28:34 开源技术 17 ℃ 0 评论

The purpose of this tutorial is to provide guidelines and recommendations for setting up and solving a dynamic overset mesh case. Overset mesh allows you to build up your case using multiple overlapping meshes that automatically get connected by interpolating cell data in the overlapping regions. The overset meshing technique is used in conjunction with the Six Degree of Freedom (6DOF) solver, allowing bodies to move as a result of fluid and/or external forces.

In this tutorial, you will learn:

  • Reading and appending mesh files into the Fluent solver and establishing a flow domain with the overset approach from overlapping meshes.
  • Best practices for overset mesh settings when two walls are close to each other or there is a very tight gap.
  • Compiling the UDF to specify the properties of the pod.
  • Setting up the moving zones and hooking the UDF.
  • Running a steady-state calculation and continuing an unsteady calculation for the problem.
  • Best practices for monitoring and diagnosing an overset case and postprocessing the results.

Note: Overset meshing has many applications beyond store separation. Refer to Overset Meshes in the Fluent User's Guide for additional information on overset meshing capabilities.

Related Videos

  • ANSYS Fluent: Introduction to Overset Meshing
  • ANSYS Fluent: Overset Meshing and Dynamic Meshes
  • ANSYS Fluent: Using the Six Degrees of Freedom (Six DOF) Solver
  • ANSYS Fluent: Setting up a Dynamic Mesh Problem for a Piston and Reed Valve - Part 1

1. Prerequisites

This tutorial is focused on overset meshing and it assumes that you are familiar with the Ansys Fluent interface and that you have a good understanding of the basic setup and solution procedures. Some of the basic steps in the setup and solution procedure will not be shown explicitly. In this tutorial, you will use the dynamic mesh model and the Six Degree of Freedom model. If you have not used these models before, refer to the Section on Dynamic Meshes in the Ansys Fluent User’s Guide. You will use a UDF to specify the properties of the pod. If you have not used UDFs before, refer to the Fluent Customization Manual.

2. Problem Description

A rescue pod is dropped from a moving airplane flying at Mach 0.8. As the pod falls, it is subjected to pressure, viscous drag, and gravitational forces. These forces also create a moment on the pod, causing it to rotate about its center of gravity.

The pod is released from the aircraft at t=0.

Figure 1: Schematic of Problem

The representation of the problem is shown in Figure 1: Schematic of Problem A close view of the bay area and different walls with their interior zones are shown in Figure 2: Close View of Bay Area.

Figure 2: Close View of Bay Area

3. Preparation

  1. Download the overset_dynamic_mesh.zip file here .
  2. Unzip overset_dynamic_mesh.zip to your working directory.
  3. The files Overset-background-mesh.msh, Overset-component-mesh.msh, and property.c can be found in the folder.
  4. Use the Fluent Launcher to start Ansys Fluent.
  5. Select Solution in the top-left selection list to start Fluent in Solution Mode.
  6. Select 2D under Dimension.
  7. Enable Double Precision under Options.
  8. Set Solver Processes to 4 under Parallel (Local Machine).

4. Mesh

  1. Read the mesh file Overset-background-mesh.msh.
  2. FileReadMesh...
  3. As Ansys Fluent reads the mesh file, it will report the progress in the console. This mesh has three different zones that allow for a greater level of refinement where the pod will be falling and less refinement at the far field. Dividing the background mesh into multiple zones allows for non-conformal interfaces between the other zones that will not be in the overset interface.
  4. Note: Fluent uses the terminology of a component mesh and a background mesh. The mesh containing the moving object is called component mesh and stationary mesh is called the background mesh. The outer boundary of component mesh is referred as component boundary.
  • Select All Mesh Files (*.msh* *.MSH*) from the Files of type: drop down list. Then select Overset-background-mesh.msh
  1. In this step you will create mesh interfaces between multiple zones in the stationary mesh. This mesh has three cell zones- upstream, downstream, and fluid-background.
  2. DomainInterfacesMesh...
  • Select interface-background-downstream and interface-downstream-background in the Boundary Zones list.Enter downstream-background for Interface Name Prefix.Click Create.Select interface-background-upstream and interface-upstream-background in the Boundary Zones list.Enter upstream-background for Interface Name Prefix.Click Create and close the Mesh Interfaces dialog box.
  1. Append the component mesh file
  2. DomainZonesAppendAppend Case File...
  • Select overset-component-mesh.msh and click OK.Click OK in the Warning dialog box that appears stating that some zone IDs have changed.If you have the Display Mesh After Reading option enabled in the Fluent Launcher, then you must refresh the graphics window by right-clicking in the graphics window and selecting Refresh Display.Note: Fluent will append the component mesh and two meshes will overlap each other. If background and component meshes are present in the same mesh file, then you can start directly from the mesh file without appending.
  1. Display the mesh.
  2. DomainMeshDisplay
  • Select all surfaces and click Display.Close the Mesh Display dialog box.
  1. Note: There are approximately 110 K mesh elements in this case.
  2. Check the mesh.
  3. DomainMeshCheckPerform Mesh Check
  4. The mesh check fails with a warning. The warning states that there is an overset zone that is not a part of any overset interface. If any zone already has overset type, we need to define overset-interface with available overset zone. If mesh does not have any overset type predefined, then this warning will not come.
  5. Note: Fluent performs various checks on the mesh and reports the progress in the console window. Pay attention to the reported minimum volume and make sure this is a positive number.

5. Overset Interface Creation

  1. In this step you will ensure that the component boundary is properly defined as the overset boundary type.
  2. SetupBoundary ConditionsOversetoverset_boundary Typeoverset
  3. Note: Ansys Meshing automatically assigns boundary types according to boundary names. Meshes created in other meshing tools may require you to manually define all of the boundary types.
  4. Define Overset Interface.
  5. DomainInterfacesOverset...
  6. This opens the Create/Edit Overset Interfaces dialog box.
  • Enter overset-interface for Name.Select fluid-background from the Background group box and component from the Component group box.Click Create to create the overset interface.Close the Create/Edit Overset Interfaces dialog box.
  1. Repeat the mesh check to confirm that it is successful.
  2. DomainMeshCheckPerform Mesh Check
  3. Define overset settings for creating an efficient interface.
  4. Set the donor-priority-method to boundary-distance-based. This option is only available through the TUI command:
  5. /define/overset-interfaces/options/donor-priority-method 1
  6. While establishing overset interface, Fluent does an optimization to get best location of the interface while reducing the number of cells in the overlapping region that will participate in the calculation. There are options to define the priority of the cell zones that will take part in the overset interface creation. Zones defined as higher priority will be given more weightage. When cell zones have the same priority, there are two methods that govern overlap minimization (see Overlap Minimization in the Fluent User's Guide ): one method is cell volume based (proportional to the inverse of the cell volume) and other method is boundary distance based (proportional to the inverse of the distance to the closest boundary).
  7. Cell volume based works best if the component mesh resolution is fine near walls and increases gradually away from walls and becomes similar in size to or larger than the background mesh. Boundary distance based method works best where overlapping meshes have uniform and nearly identical resolutions and therefore it is most suitable when two walls have small distance in between them. In this example, the store wall is very near to the bay wall and the boundary distance based method allows Fluent to create an overset interface somewhere middle of the gap. It is important to have sufficient cells overlapping each other between the gap region of two walls (at least 4 cells from both walls), so it is better to create inflation layers on walls to resolve this requirement.
  8. In this step you will create the overset intersection, also referred to as hole cutting. When the case is initialized, Ansys Fluent automatically creates the overset intersection. Experts have the option to investigate how the intersection is created by enabling expert options in the TUI:
  9. /define/overset-interfaces/options/expert? yes
  10. With expert options enabled, you can create the intersection using the following command:
  11. /define/overset-interfaces/intersect-all
  12. When prompted to keep bounding cells, press the Enter key to accept the default option of no.
  13. Keep bounding cells? [no]
  14. You can increase the overset verbosity to have Fluent print more information to the console for any overset process. Verbosity settings range from 0 to 3 depending on the information required. To increase verbosity, enter:
  15. /define/overset-interfaces/options/verbosity 2
  16. To list all overset interface related information, enter:
  17. /define/overset-interfaces/list

6. Steady-State Case Setup

In this section you will set up the case for steady-state flow.

6.1. General Settings

Retain the setting of steady-state pressure-based solver.

PhysicsSolver

6.2. Models

  1. Enable the energy equation.
  2. PhysicsModelsEnergy
  3. Specify the k-omega viscous model.
  4. PhysicsModelsViscous...
  • Retain the default selection of the k-omega SST viscous model.Enable the Viscous Heating and Production Limiter options.Click OK to close and confirm the model settings.

6.3. Materials

Specify the properties for air.

  • Open the Create/Edit Materials dialog box.
  • PhysicsMaterialsCreate/Edit
  • Select ideal-gas from the Density drop-down list.
  • Click Change/Create and close the dialog box.

6.4. Operating Conditions

Set the operating conditions.

PhysicsSolverOperating Conditions...

  1. Enter 0 Pa for Operating Pressure.
  2. Click OK to confirm the operating conditions.

6.5. Boundary Conditions

  1. Set the boundary conditions for the inlet.
  2. SetupBoundary ConditionsInletpressure-inlet Edit...
  • Enter 154419.3 pa for Gauge Total Pressure.Enter 101325 pa for Supersonic/Initial Gauge Pressure.Retain Intensity and Viscosity Ratio as the Specification Method in the Turbulence group box.Retain the default values of 5% and 10 for Turbulent Intensity and Turbulent Viscosity Ratio respectively.Click Apply and close the Pressure inlet dialog box.
  1. Set the boundary conditions for outlet.
  2. SetupBoundary ConditionsOutletpressure-outlet Edit...
  • Enter 101325 pa for Gauge Pressure.Retain Intensity and Viscosity Ratio as the Specification Method in the Turbulence group box.Retain the default values of 5% and 10 for Backflow Turbulent Intensity and Backflow Turbulent Viscosity Ratio respectively.Click Apply and close the Pressure Outlet dialog box.
  1. Keep the defaults for all of the other boundary conditions.

6.6. Reference Values

PhysicsSolverReference Values...

  1. Select pressure-inlet from the Compute from drop-down list.
  2. Select fluid-background from the Reference Zone drop-down list.
  3. Retain the default Reference Values as shown above.

6.7. Solution

In this section you will specify solution methods and controls that are appropriate for this overset meshing case.

  1. Set the solution methods.
  2. SolutionSolutionMethods...
  • In the Solution Methods task page, retain the default selections for the Spatial Discretization.
  1. Set the solution controls.
  2. SolutionControlsControls...
  • Review and retain the default settings.Click Limits... to open the Solution Limits dialog box.Enter 1e+07 for Maximum Turb. Viscosity Ratio.Click OK to accept the settings.
  1. Define a report for the drag coefficient of the pod.
  2. SolutionReportsDefinitionsNewForce ReportDrag...
  • Enable Report File and Report Plot in the Create group box.Select wall-pod from the Wall Zones list.Click OK to create the report.
  1. For additional information on writing report files, refer to "Creating Report Files" in the Fluent User's Guide.
  2. Specify the residual monitor criterion for the solution equations.
  3. SolutionReportsResiduals...
  4. Enter 1e-06 as the Absolute Criterion for all of the Equations and then close the Residual Monitors dialog box.
  5. Ensure Hybrid is selected as the initialization method in the Solution ribbon tab.
  6. Click Initialize.
  7. Define parameters for calculation to a steady-state solution.
  8. SolutionRun Calculation
  • Enter 1000 for No. of Iterations.Note: If you are running in serial, then you must reorder the mesh prior to beginning the calculation, using the mesh/reorder/reorder-domain text command. This reordering is done automatically for parallel processes > 1.Click Calculate.
  1. Check the mass imbalance for the inlet and outlet to confirm there is not a large difference.
  2. ResultsReportsFluxes...
  • Select pressure-inlet and pressure-outlet from the list of Boundaries.Click Compute and close the Flux Reports dialog box.
  1. Save the steady-state case and data files (overset-pod-steady-state.cas.h5 and overset-pod-steady-state.dat.h5).
  2. FileWriteCase & Data...
  3. Click OK in the Information dialog box that appears.

7. Unsteady Setup

In this section you will define the transient settings.

7.1. General Settings

  1. Select Transient in the General task page (Solver group box, under Time).
  2. SetupGeneralTransient
  3. Set the Operating Conditions.
  4. PhysicsSolverOperating Conditions...
  • Enable Gravity.Enter -9.81 for Y.Click OK to confirm the operating conditions.A warning message will be displayed that for compressible (ideal and real) gas models with buoyancy, it is recommended to use a specified operating density value of zero.

7.2. Compile the UDF

User-DefinedUser-DefinedFunctionsCompiled...

  1. Click Add... to open the Select File dialog box.
  2. Select property.c and click OK.
  3. Select Use Built-in Compiler.
  4. Click Build to build the library.
  5. Click OK to close the Question dialog box that appears.
  6. Note: This UDF contains the mass of the pod and its moments of inertia.
  7. Ansys Fluent sets up the directory structure and compiles the code. You can see the compilation in the console window.
  8. Click Load to load the library.

7.3. Dynamic Mesh Settings

In this section you will specify the six degrees of freedom (Six DOF) and dynamic mesh settings.

DomainMesh ModelsDynamic Mesh...

  1. Enable Dynamic Mesh.
  2. Disable Smoothing.
  3. Enable Six DOF.
  4. Click Settings... to open the Options dialog box.
  • Enable Write Motion History.Enter pod-motion for the File Name.Click OK to confirm the settings.
  1. Set up the moving zones.
  • Create the dynamic zone for the componentClick Create/Edit... in the Dynamic Mesh task page to open the Dynamic Mesh Zones dialog box.Select component from the Zone Names drop-down list.Retain the selection of Rigid Body for Type.Retain the selection of On in the Six DOF group box.Enable Passive in the Six DOF group box.Enter 7.6 for X and 18.5 for Y in the Center of Gravity Location group box.Click Create to create the dynamic zone for the component.Note: The UDF is automatically selected in the Six DOF UDF/Properties drop-down list. If there were additional UDFs loaded, then you would have to select the correct one.Create the dynamic zone for the pod.Select wall-pod from the Zone Names drop-down list.Retain the selection of Rigid Body for Type.Retain the selection of On and disable Passive in the Six DOF group box.Retain the values for Center of Gravity Location.Click Create to create the dynamic zone for the pod.Close the Dynamic Mesh Zones dialog box.

7.4. Report Generation for Unsteady Case

Create a new drag report definition named unsteady_pod for the drag coefficient on the wall-pod.

SolutionReportsDefinitionsNewForce ReportDrag...

  1. Enter unsteady-pod-drag for Name.
  2. Enable Report File and Report Plot in the Create group box.
  3. Select wall-pod from the Wall Zones list.
  4. Click OK to create the report.

Note that the drag report definition created previously, report-def-0 for the steady state simulaiton should be deleted. If not a Warning Message appears in the console notifying you that Data for the following Report File can be wriiten to its file..

You can click Yes in the Warning Message to create a new report file.

7.5. Run Calculations for Unsteady Case

SolutionRun CalculationRun Calculation...

  • Enter 0.001 for Time Step Size (s).
  • Enter 1000 for Number of Time Steps.
  • Enter 8 for Max Iterations/Time Step.
  • Start recording the transcript.
  • FileWriteStart Transcript...
  • Enter a name for the transcript file.
  • Click Calculate.
  • the simulation can take several hours depending on the compute capacity being utilized.
  • Stop recording the transcript.
  • FileWriteStop Transcript...
  • Save the case and data files (overset-pod-transient.cas.h5 and overset-pod-transient.dat.h5).
  • FileWriteCase & Data...

7.6. Overset Solution Checking

Check overset solution.

Open the transcript file and look for the warning of:

dead->solve cells

Ideally, no cells should go directly from being dead cells to being solve cells. A large number of cells directly converting from dead to solve can affect the accuracy of the solution or cause divergence. If you find that there is a large number of cells that went directly from dead to solve, then you can reduce the time step size to decrease the likelihood of this issue occurring. If there are any dead to solve cells present for this calculation run, the warning is printed as shown below:

WARNING: 1 overset dead->solve cells in interface overset-interface

Note: Objects move their position with time in transient overset moving mesh cases, requiring dead cells to convert into solve cells. Dead cells do not have proper solution data, so they need to convert to receptor cells to get the required solution information before converting to solve cells. If a dead cell converts directly into a solve cell, it may lack required information and cause an improper result. Refer to "Diagnosing Overset Interface Issues" in the Fluent User's Guide for additional information.

7.7. Postprocessing

  1. Create contours of static pressure.
  2. ResultsGraphicsContoursNew...
  • Enter contour-pressure for Contour Name.Select Banded from the Coloring drop-down list.Ensure Pressure... and Static Pressure are selected from the Contours of drop-down lists.De-select all surfaces in the list of Surfaces.Click Save/Display.Close the Contours dialog box.Note: To capture intermediate images, you can create an animation definition prior to beginning the calculation. This would allow you to view the individual image files as well as an animation of the pod as it falls. For additional information on creating animation definitions, see Animating the Solution in the Fluent User’s Guide.Related VideosANSYS Fluent: Scene and Animation Creation
  1. Save the case file (overset-pod-transient.cas.h5).
  2. FileWriteCase & Data...
  3. Plot the center of gravity motion of the pod.
  • Read the pod-motion file into Microsoft Excel and plot flow time vs CG-orientation of the pod.Plot flow time vs CG-angular orientation of the pod.

7.8. Diagnosing an Overset Case

Once an overset interface is created, it is important to check and diagnose it. In this section you will learn about diagnosing an overset interface and about the different cells participating in the solution.

In overset meshing all meshes are categorized into five cell types:

  • Solve – (yellow in figures Figure 3: Cell Marking on component & Figure 4: Cell Marking on fluid-background) cells that take part in the solution.
  • Donor – (marked red in figures Figure 3: Cell Marking on component & Figure 4: Cell Marking on fluid-background) provide information to corresponding cell zones.
  • Receptor – (marked blue in figures Figure 3: Cell Marking on component & Figure 4: Cell Marking on fluid-background) receive information from donor cells in the corresponding cell zones.
  • Dead – (marked in red in figures Figure 5: Dead Cells in the Component) deactivated cells located in regions of overlap between the background and component meshes, where multiple cells are present in the same exact location. Only one set of cells in a region is allowed to take part in the solution. Additionally, cells outside of the flow regime are marked as dead.
  • Orphan – receptor cells that cannot find a corresponding donor cell. Although Fluent has intelligence to deal with orphan cells, their presence should be avoided to reduce the risk of solution inaccuracies and divergence.

You can mark orphan cells using the TUI command:

define/overset-interfaces/mark-cells orphan no

This will show all of the orphan cells present in the case, unless you specify a particular zone. Marking orphan cells creates a register that you can display via the define/overset-interfaces/display-cells text command. The marked cells are in the overset-orphan-cells-r0 register.

In this case there are not any orphan cells, so nothing is displayed in the graphics window. If you mark solve cells or other cells types and display those registers, then it will appear in the graphics window.

If large number of orphan cells are generated in a case, then it is advisable to modify the mesh accordingly.

Different type of cells can also be displayed creating contours of Cell Info and displaying the Overset Cell Type for given surfaces.

Enable the following TUI command to include receptor cells in the contours display:

/define/overset-interfaces/options/render-receptor-cells? yes

The overset interface for this tutorial is created properly, but issues could arise during overset interface creation for geometries with complex topology. Ansys Fluent provides options to diagnose issues and fix them. You can use the ‘debug hole cut’ option to understand more about flood filling of seed cells or leakage between overlapping boundaries. For detailed information on overset mesh diagnosis, refer to "Diagnosing Overset Interface Issues" in the Fluent User's Guide.

  1. Start a new Fluent session, and read overset-pod-steady-state.cas.h5 and overset-pod-steady-state.dat.h5.
  2. File ReadCase & Data...
  3. Create zone surfaces for component and fluid-background.
  4. ResultsSurfaceCreateZone...
  • Select component in the Zone list.Retain component for New Surface Name and click Create.Similarly, create a zone surface for fluid-background.Close the Zone Surface dialog box.
  1. Enter the following TUI command in the console:/define/overset-interfaces/options/render-receptor-cells? Yes
  2. Display contours of the overset cell type on the surface you just created.
  3. De-select Lighting ViewDisplay
  4. ResultsGraphicsContoursNew...
  • Enter contour-overset-1 for Contour Name.Disable Auto Range (which enables Clip to Range) in the Options group box.Disable Node Values and Global Range in the Options group box.Select Cell Info... and Overset Cell Type from the Contours of drop-down lists.Enter -0.5 for Min and 2.5 for Max.Table 1: Meaning of ValuesCell TypeInteger Function ValueDonor2Solve1Receptor0Orphan-1Dead-2Note: Dead cells cannot be displayed in contours.Click Colormap Options... to open the Colormap dialog box.Enter 3 for Colormap Size in the Colormap group box.Click Apply and close the Colormap dialog box.Select component from the list of Surfaces.Click Save/Display and close the Contours dialog box.Figure 3: Cell Marking on componentRepeat the process for fluid-background.Figure 4: Cell Marking on fluid-background
  1. Marking and displaying dead cells.
  • Expand Cell Zones in the tree to check the id number.Setup Cell Zone ConditionsFluidMark dead cells in component with the following TUI command: define/overset-interfaces/mark-cells dead yes 29Mark dead cells in fluid-background with the following TUI command: /define/overset-interfaces/mark-cells dead yes 7Display the dead cells by entering the define/overset-interfaces/display-cells text command in the console.Enter 0 for the text command prompt to display the overset-dead-cells-component-r0 register (you can enter 0 instead of typing the full name of the register).Figure 5: Dead Cells in the ComponentEnter 1 for the text command prompt to display only the overset-dead-cells-fluid-background-r1 register.Figure 6: Dead Cells in the Background

8. Summary

In this tutorial, you have learned about overset meshing in Ansys Fluent and its setup along with best practices, by solving a store separation problem. You have also learned a few diagnostic techniques for overset meshing and the postprocessing of results for a store separation case.

****作者提供服务****:

一、代做服务

提供ANSYS Mechanical、Fluent、CFX仿真项目代做服务;

项目过程中,可提供录制项目视频、问题解答指导、远程一对一答疑服务;

项目完成后,提供相关软件培训视频教程;

二、答疑指导服务

提供在线远程答疑指导服务。

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表