# Ansys FAQ

(Difference between revisions)
 Revision as of 17:18, 20 November 2008 (view source)Peter (Talk | contribs)m (Reverted edits by Vamsikrish (Talk) to last version by Ghorrocks)← Older edit Revision as of 02:44, 18 August 2010 (view source)Joshua (Talk | contribs) Newer edit → Line 53: Line 53: === Postprocessing === === Postprocessing === + ==== Why are my results inaccurate? ==== + +
+
1. 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.
2. +
3. 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.  Some parameters worth investigating include the domain size, grid density, grid quality, grid type (e.g., structured versus unstructured), discretization (or advection) scheme, turbulence model, turbulence numerics, turbulence intensity, boundary conditions, two- versus three-dimensional simulations, and timestep size.
4. +
5. Perform an error analysis:
6. +
+
1. Calculate your discretization errors.  A calculation should be performed on each quantitative parameter of interest (e.g., lift).  The Journal of Fluids Engineering provides a good explanation of predicting discretization errors here (page 3).  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.
2. +
3. 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).
4. +
5. 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.
6. +
7. 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).
8. +
9. 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.
10. +
+
+ + ==== Are my results publishable? ==== + + The Journal of Fluids Engineering provides a good guide of recommendations regarding publishing your data here. == FSI (Fluid Structure Interaction) == == FSI (Fluid Structure Interaction) == Line 131: Line 149: == ICEM CFD == == ICEM CFD == + + ==== Where can I find a basic ICEM tutorial? ==== + + There are some tutorials available on the ANSYS Customer Portal.  ANSYS also has a YouTube page found here, which includes a tutorial on creating a structured C-grid around an airfoil. == CFX-Mesh == == CFX-Mesh ==

## CFX-5

### Solver related questions

#### 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:

1. Read the CFX documentation. Specifically the section titled "Tips for obtaining convergence", and any best practises guide applicable to your simulation.
2. 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.
3. 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.
4. 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:
1. Poor quality mesh - the fix is obviously do a better quality mesh
2. 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.
5. 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.
6. 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).

### Postprocessing

#### Why are my results inaccurate?

1. 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.
2. 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. Some parameters worth investigating include the domain size, grid density, grid quality, grid type (e.g., structured versus unstructured), discretization (or advection) scheme, turbulence model, turbulence numerics, turbulence intensity, boundary conditions, two- versus three-dimensional simulations, and timestep size.
3. Perform an error analysis:
1. Calculate your discretization errors. A calculation should be performed on each quantitative parameter of interest (e.g., lift). The Journal of Fluids Engineering provides a good explanation of predicting discretization errors <a href="http://journaltool.asme.org/Templates/JFENumAccuracy.pdf">here (page 3)</a>. 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.
2. 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).
3. 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.
4. 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).
5. 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.

#### Are my results publishable?

The Journal of Fluids Engineering provides a good guide of recommendations regarding publishing your data <a href="http://journaltool.asme.org/Templates/JFENumAccuracy.pdf">here</a>.

## FSI (Fluid Structure Interaction)

### General

#### 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.

#### 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.

### Solving

#### 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

### Postprocessing

#### 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.

## ICEM CFD

#### Where can I find a basic ICEM tutorial?

There are some tutorials available on the ANSYS Customer Portal. ANSYS also has a YouTube page found <a href="http://www.youtube.com/user/ansysinc">here</a>, which includes a tutorial on creating a structured C-grid around an airfoil.

## CFX-Mesh

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:

1. 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.
2. 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.
3. Describe precisely what you have done yourself to try and solve your problem, giving examples.
4. 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's:

• 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:
FIXME

Examples of questions that are unanswerable:
FIXME

• 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