This article contains answers for Ansys related FAQ. Please feel free to add questions and answers here!
My steady state solution converges for a while but stops converging before reaching my convergence criteria
Failure to obtain full convergence is a common issue for steady state simulations. It often occurs when doing mesh refinement studies, where coarse mesh simulations converge fully and quickly but as the mesh is refined the simulation fails to achieve the same residuals convergence. Frequently the cause for this behaviour is by the coarse mesh not resolving small shedding features, but as the mesh is refined smaller flow features are resolved and unless they are properly handled by the simulation setup it can lead to convergence problems.
To resolve the issue work through the following points:
- Read the CFX documentation. Specifically the section titled "Tips for obtaining convergence", and any best practises guide applicable to your simulation.
- The first thing to consider is whether your simulation is sufficiently converged even though your specified criteria has not been met. To check whether your simulation is sufficiently converged, output the parameters important to your simulation to monitor points and display them in the solver manager. Appropriate parameters could be lift, drag, pressure loss, flow rate - what ever is an important parameter to your simulation. If these parameters are not changing to an accuracy tolerance suitable for your simulation then your simulation is almost certainly OK as it is and no further work needs be done.
If important parameters have not converged so a tighter convergence is required, the next thing to try is trying to get the simulation as it currently is to converge. Tips here are:
- Use a larger physical time step. A time step approximately equal to the average residence time in the simulation domain is a good guide for most simulations. If it is a recirculating system without an inlet or outlet then use the turn over time of the largest flow feature. You can get the residence time in CFX-Post by placing a streamline and looking at the "Time" variable on it. The maximum value of time is the residence time.
- Use Local Timescale Factor. A factor of about 5 is a good guess to start with. If this is successful you should run the final few iterations to convergence with a physical timescale (not local timescale all the way to convergence).
- For some simulations using double precision can help, particularly if there is a large range between maximum and minimum values of dimensions or flow parameters (velocity, pressure etc). It can also useful for buoyancy driven simulations.
- If using the hybrid differencing scheme you can consider reducing the blend factor. Don't reduce it below 0.75 without showing it does not harm accuracy by a sensitivity check.
If you cannot get it to fully converge then you should look at why it has not converged and try to fix the problem. Check:
- The physics of the simulation is correct.
- Do a test run with the residuals included in the result file. It is likely a small region of the flow has high residuals while the rest is converging. Consider why are the residuals high in that region - Is it:
- Poor quality mesh - the fix is obviously do a better quality mesh
- A physical instability, such as vortex shedding - the fix here is to use a larger timescale, a coarser mesh in the vortex shedding region, decrease the blend factor (if using hybrid differencing) or use a lower order turbulence model. The first option is preferred as the latter options can have accuracy implications.
- If you still cannot get the simulation to converge then try running it as a transient simulation. Adaptive timestepping can be useful here to quickly find the appropriate timescale. Transient simulations are much slower than steady state simulations so be aware that you will need extra patience.
- If the transient simulation shows the results to not be steady state then give up on the steady state model as the flow is transient and needs a transient solution to properly capture it.
How to avoid 6000 - 7000 K temperatures using finite rate chemistry model
Edit the def file and add the following to the edited ccl file. (You can do it by simply clicking the EDIT button in cfx5solver or using cfx5cmds command) Add these lines to the EXPERT section:
EXPERT PARAMETERS: stiff chemistry = t END
If you don't have this section, you can create it and then add a line there (see the manual).
Can CFX do a 2D simulation?
This is discussed in the CFX documentation, but it has been asked so many times on the CFD-Online Forum it is worth repeating. CFX cannot do a 2D simulation.
Is there any way of doing a 2D simulation in CFX?
Yes. From a 2D mesh of the geometry, extrude it one element in the normal direction. For a 2D planar simulation this would be one element in the normal vector direction, for a 2D axisymmetric simulation this would be sweeping a small angle with one element. For the planar mesh the extrusion should be approximately equal to the smallest element edge length in the model, for the axisymmetric mesh the sweep should be a small angle, maximum 5° but smaller if you want high accuracy.
In CFX-Pre you should set the top and bottom faces of the extrusion as symmetry planes. If you want to include swirl in the model use periodic boundaries. The remaining boundaries should be set as walls, inlets, openings and outlets to define the flow.
The CFX documentation discusses 2D simulations and it is recommended you read it before proceeding.
Why are my results inaccurate?
- Firstly, is the simulation correctly set up? Does your model include all relevant physics?
- Has your solution converged to a reasonable value (see above)? For a simple analysis, an RMS residual of 1E-5 should be sufficient. Keep lowering your residual value until the solution no longer converges monotonically.
- Perform a sensitivity analysis on the relevant features of your simulation. In its simplest form, a sensitivity analysis involves altering one parameter (e.g., grid refinement) while keeping the other parameters constant and observing the effect this parameter has upon the simulation accuracy (e.g., by monitoring skin friction). The purpose of a sensitivity analysis is to obtain a simulation that is both accurate and cost effective. For just about every simulation a sensitivity analysis on mesh size and convergence tolerance is required. Depending on what you are modelling other sensitivity analyses may be required, covering things such as:
- Domain size (how close can the boundaries be to the region of interest?)
- Grid density
- Grid quality
- Grid type (e.g., structured versus unstructured),
- Spatial discretization (or advection) scheme
- Temporal discretisation scheme
- Turbulence model,
- Turbulence numerics,
- Turbulence intensity,
- Boundary condition type,
- Any empirical models used, such as heat/mass transfer coefficients, drag laws, free surface model,
- Two- versus three-dimensional simulations,
- and timestep size.
- Perform an error analysis:
- Calculate your discretization errors. A calculation should be performed on each quantitative parameter of interest (e.g., lift). The Journal of Fluids Engineering provides an explanation of predicting discretization errors here: Calculating Discretization Errors. In terms of errors, discretization errors are the greatest concern to a CFD modeler. Discretization errors are those that occur as a result of modeling the governing flow equations as algebraic expressions in a discrete space-time domain. Discretization errors should approach zero as the grid is resolved (i.e., as more grid points are generated and the solution becomes grid-independent). However, discretization errors also depend on grid quality (e.g., aspect ratio, orthogonality, skew). A well-refined grid is not necessarily a high quality grid and, thus, grid resolution and quality sensitivity analyses are recommended.
- Physical approximation errors can cause significant accuracy issues. This type of error is caused by physically approximating something to simplify the simulation (e.g., modeling a real fluid as an ideal gas).
- Computer round-off errors are caused when a computer stores floating point data. Depending on the accuracy your computer stores the data at, some round-off may occur. This type of error is usually negligible compared to the others and can be easily decreased by running the simulation in Double Precision mode.
- Iterative convergence errors are due to the resolution of the RANS equations. Since the Navier-Stokes equations are not solved directly, the solution iterates until a specified convergence criterion is reached (e.g., a residual value of a certain size is reached). This type of error can be decreased by allowing convergence to an acceptable level (see above).
- Usage errors are caused by user specifications. For example, the user may run a turbulent simulation as laminar or an unsteady simulation as steady. These errors can be monitored via a convergence study.
- And finally - consider the results are you comparing against. Are they accurate? How do you know? Are you modelling EXACTLY the same conditions as the results you are comparing against?
Are my results publishable?
The Journal of Fluids Engineering provides a good guide of recommendations regarding publishing your data. Journal of Fluids Engineering Numerical Accuracy
Why do I see a non-zero velocity at the walls?
CFX uses control volumes centred on the nodes, so the nodes on the walls generate control volumes whose centroids is off the walls. That is why the wall control volumes have non-zero velocities.
To make it display as expected in post processing, CFX has added the "hybrid" variable option for velocities, where it forces the velocity to zero (or more generally the wall velocity) at the wall. The "conservative" variables show the actual control volume values, and will not in general, be zero at the wall.
FSI (Fluid Structure Interaction)
Which ANSYS products are necessary to solve a FSI simulation?
Beginning with ANSYS 11.0, Ansys Workbench with Simulation and CFX are required.
Prior to ANSYS 11.0 you needed to use CFX (standalone or in workbench) and the ANSYS Prep7 GUI.
Which Ansys licenses are required for FSI in Ansys?
Working with Ansys 10.0 or older, a Muliphysics and a CFX license are required.
Ansys 11.0 has multiple options. It is possible to run an FSI simulation with a single license now.
What kind of coupling methods are possible?
One-way or two-way FSI coupling.
Is it possible to perform a steady-state FSI simulation?
Yes, Ansys 11.0 enables steady state and transient FSI simulations as well.
What is the general procedure for a FSI simulation in Ansys 11.0?
For a two-way simulation:
1. Define the Solid setup in Ansys Simulation (Ansys Workbench). This includes an Fluid-Solid-Interface.
2. Write an Ansys Input File (.inp) of this setup.
3. Define the Fluid setup in Ansys CFX-Pre. A link to the Ansys Input File is required.
4. Write an Ansys Definition File (.def) of this setup from CFX Pre
5. Start the coupled FSI run with the CFX Solver Manger
6. Postprocess both the CFD and solids results in CFX-Post.
How do I start an FSI simulation in Ansys 11.0?
Start the CFX Solver Manager and load the .def File. Ansys will load the .inp file automatically.
Is it necessary to define the Ansys Insallation Root in "Define Run" in Ansys 11.0?
On a Windows PC it is not, on Unix it is necessary.
Is it possible to stop a running FSI simulation in Ansys 11.0?
Yes, hit the stop button. It works.
Is it possible to write back-up files of a FSI simulation in Ansys 11.0?
Yes. You can write backup files from CFX in the usual way.
The solver terminates with the error message "A negative volume appeared". What went wrong?
This error often appears with FSI simulations. Normally it comes together with a large deflection simulation of the solid part. Mostly the CFD-mesh deformation is too big and negative elements appear. Possible solutions might be
- a better fluid mesh
- meshsiffness 1/wall distance
- smaller timesteps
If I open the FSI simulation in CFX-Post 11.0 only the fluid data are available. Where are the solid data?
CFX-Post only opens the .res file by default. If you want to postprocess fluid and solid data together you have to load the solid data additionally: File -> Load Result -> Load the Ansys .rst or similar data an activate the radio button "add data". Now you can postprocess all data in CFX-Post.
A well-refined grid is essential for properly capturing the viscous flow effects. For turbulence modeling, a boundary layer thickness of y+max < 1 is recommended to capture the viscous sublayer properly. However, many turbulence models now include wall scales that allow for y+ values larger than one, thereby creating a cost-effective and robust grid. As Reynolds number increases, grid refinement must, too. Grids used in laminar flows can be considered refined once they are resolved (see below).
A resolved grid is one in which the solution parameters of interest (e.g., skin friction) no longer change with further refinement. Proper grid resolution is required for simulation accuracy.
The third parameter to successful grid development is grid quality, a factor that is often overlooked. Grid quality parameters include (but are not limited to):
- Aspect ratio
- Determinant of the Jacobian matrix
- Expansion factor
- Type of grid
- Advantages of a structured grid
- Very efficient numerical procedures can be implemented on structured grids.
- Multi-block grids allow for customization of various regions.
- Structured boundary layers and other anisotropic regions limit discretization errors.
- Structured grids allow for decreased storage and less complicated data structures.
- Advantages of an unstructured grid
- Unstructured grids are highly robust and simpler to generate.
- There is a lack of restriction on where nodes are placed, increasing the automation of generation.
- Unstructured grids allow for subdivision of cells in areas requiring increased accuracy.
- Advantages of a structured grid
ICEM CFD includes a quality calculator for a priori grid accuracy. CFX-Post also allows for some a posteriori mesh quality calculations. For external aerodynamic applications, a C-grid with a multi-block structured mesh is recommended with aspect ratios near unity, high orthogonality on walls, minimal skew, and a very low expansion factor (1.01-1.05, if possible) in the boundary layer regions.
Where can I find a basic ICEM tutorial?
There are some tutorials available on the ANSYS Customer Portal. ANSYS also has a YouTube page (ANSYS YouTube page), which includes a tutorial on creating a structured C-grid around an airfoil.
How should I ask my question on the CFX forum to get the best possible answer?
The most important point to understand about the CFX forum is that the quality of the answer to your question will depend entirely on the quality of your question!
Most of the questions posed on the CFX forum are so poorly posed that it's impossible to understand what the poster is actually asking. If you want effective help with your problem adhere to the following guidelines:
- Make sure your question is as clear, concise and as intelligible as possible. Use punctuation. Other forum readers are not going to spend time trying to decipher a garbled question.
- Give a clear general description of what class of problem and/or application you are working on BEFORE you start asking specific questions. This will aid other forum readers to better understand your specific questions.
- Describe precisely what you have done yourself to try and solve your problem, giving examples.
- Depending on your problem you should always include the following:
- A copy of your command file as a file attachment. Many simple problems can be spotted in a command file by an expert user.
- If you are asking a mesh quality related question then include some sample images of your mesh, including the boundary layer.
- If you are asking a user Fortran and/or user CEL question then include a copy of your existing code file as an attachment.
- Dont ask over broad questions e.g. "How do I simulate a 4-stroke engine". Nobody is going to type out fifty pages of guidance. They have better things to do.
- Don't shorten the words. It's a web forum, not a SMS text message. It's very hard to read it. Or R U 2 lazy? People may tend to be lazy to decipher and answer.
Example of a well posed question:
Examples of questions that are unanswerable:
How to upload images:
- Create the image on your local machine e.g. skew_mesh.jpg
- Upload the image to Imageshack
- Copy the link "Thumbnail for websites"
- Paste the link into your post e.g. <a href="http://img91.imageshack.us/my.php?image=pipeym8.jpg" target="_blank"><img src="http://img91.imageshack.us/img91/5681/pipeym8.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>
How to share non-image files as attachments:
- If you have more than one file, zip them into a single file.
- Upload the file to Rapidshare Gigasize
- Scroll down to "I don't want a collector's account right now. Just give me the download-link." and click it.
- Scroll down until you see the link e.g. http://rapidshare.de/files/33808646/audio.log.html