CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Ansys FAQ

Ansys FAQ

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search
m (How should I ask my question on the CFX forum to get the best possible answer?)
(moved global imbalances to the assessment of convergence and fixed some typos)
 
(42 intermediate revisions not shown)
Line 3: Line 3:
== CFX-5 ==
== CFX-5 ==
-
 
-
=== Preprocessing ===
 
=== Solver related questions ===
=== 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 behavior 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.
 +
<P>
 +
To resolve the issue work through the following points:
 +
<OL>
 +
<LI>
 +
Read the CFX documentation. Specifically section 15 ("Advice on Flow Modeling"), section 15.10.6 ("Problems with Convergence"), and any best practice guides applicable to your simulation.
 +
<LI>
 +
The first thing to consider is whether your simulation is sufficiently converged even though your specified criteria has not been met.
 +
<UL>
 +
<LI>
 +
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. Those parameters should not be changing to an accuracy tolerance suitable for your simulation.
 +
<LI>Check the Global Imbalances of all equations. If these are equal to zero, then 'what goes in' equals 'what goes out'. In general, for the mass and momentum equations they approach zero quite fast since their progression through the geometry can be considered as pressure driven (=fast). However, Energy, scalar and mass fractions equations can be considered flow driven (=relatively slow). Therefore it takes substantial more iterations before they have developed through the geometry from inlet to outlet. As a result, before judging the residual convergence of these equations, make sure their imbalances are close to zero.
 +
</UL>
 +
<LI>
 +
If important parameters have not converged so a tighter convergence is required, the next thing to do is to find the reason for bad convergence.
 +
<UL>
 +
<LI>Check that the physics of the simulation is correct.
 +
<LI>View the MAX-residuals in the solver manager and compare them to the RMS-residuals. If they are about 2 magnitudes higher it is likely to be a local phenomenon causing the convergence issues.
 +
<LI>Do a test run with the residuals included in the result file (you can write the residuals to backup files as well to view them during runtime). View the residuals on a representative plane or as a isosurface with a lower then your maximum residual as value. Consider why the residuals are high in that region - Is it:
 +
<OL>
 +
<LI>Poor mesh quality - the fix is obviously do a better quality mesh.
 +
<LI>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.
 +
</OL>
 +
</UL>
 +
<LI>
 +
If your setup is as good as it can be, the next step is to get the simulation as it currently is to converge. It is important to note, that this can have an impact on accuracy (especially the last two recommendations) and maybe just hides the problem instead of solving it.
 +
<UL>
 +
<LI>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.
 +
<LI>In contrast, for some applications it can be helpful to reduce the time step. Examples are CFX-cases with Reynolds Stress model or with multiphase. There, a too large timestep can be just too optimistic resulting in divergence due to numerical overshoots and oscillations. Convergence can obtained by reducing the Auto Timescale from default 1 to 0.3 or below.
 +
<LI>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).
 +
<LI>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, Energy, etc). It can also useful for buoyancy driven simulations.
 +
<LI>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.
 +
<LI>Use a lower order turbulence model.
 +
</UL>
 +
<LI>
 +
If you still cannot get the simulation to converge then try running it as a transient simulation. Adaptive time stepping 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.
 +
<LI>
 +
If the transient simulation shows the results to not be steady then give up on the steady state model as the flow is transient and needs a transient solution to properly capture it.
 +
</OL>
 +
 +
==== 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 <B>2D planar simulation</B> this would be one element in the normal vector direction, for a <B>2D axisymmetric simulation</B> 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.
 +
 +
==== I get the error "Floating point exception: Overflow". What does this mean and what do I do about it? ====
 +
 +
This error means the linear solver has diverged badly. You will need to improve the numerical stability of the simulation for this simulation to converge. There can be many causes for this divergence, but the main ones are (listed in approximately the order they should be checked in):
 +
<UL>
 +
<LI> <B>Is the physics of the simulation set up correctly?</B> Have you forgot a material property? Or have you entered a material property incorrectly? Have you left out a vital physical model? Does your CEL correctly evaluate?</LI>
 +
<LI> <B>Is the mesh of high enough quality?</B> Different simulations have different mesh quality requirements. Simple low Reynolds number flow can handle lower quality elements than high Reynolds number flows, and some physical models require high quality mesh. Multiphase modeling usually requires a higher mesh quality than single phase, and some multiphase models are very strict - for instance accurate surface tension modeling can require aspect ratios of less than 1.5, but simple flows can handle aspect ratios 10 or 100 times worse than this. Also note that high aspect ratio elements in prism layers does not necessarily cause problems as the element is aligned with the flow direction.</LI>
 +
<LI><B>Is a better initial condition required?</B> The closer the initial condition is to the real flow field the easier it will be for the solver to converge. You can achieve this improved initial condition by:
 +
<UL>
 +
<LI>Using a previous simulation which has converged at a condition close to the problem simulation's condition.</LI>
 +
<LI>Using upwinding for the advection terms. Note this is not very accurate and is not recommended for final results, but it is a useful way of generating initial conditions which are close.</LI>
 +
<LI>Using a coarse mesh and interpolating as an initial condition onto the final mesh.</LI>
 +
<LI>Doing a simulation which does not include tricky physics, for instance doing a single phase model before introducing the multiphase physics.</LI>
 +
</UL></LI>
 +
<LI><B>Is double precision required?</B> Some models require additional numerical accuracy to solve. Examples include multiphase (especially surface tension) and buoyancy driven flows.</LI>
 +
<LI><B>Does the model require small time steps to start?</B> Some simulations require small time steps to start, but once going the time step can be increased.</LI>
 +
</UL>
 +
 +
==== During the solution process, I get the warning message "A wall has been placed at portion(s) of an OUTLET" ====
 +
This message appears whenever backflow would occur at a pressure outlet boundary condition. This type of boundary condition cannot handle backflow into the computational domain.
 +
 +
If the warning message disappears before obtaining the final solution, the results are still valid. If the warning persists, you have three options:
 +
<OL>
 +
<LI>
 +
Use an opening type boundary condition like the warning message suggests. However, you have to specify the direction of the backflow at an opening.
 +
Unless you have information about the direction of the backflow, the second option involves less modeling uncertainties.
 +
<LI>
 +
Move the outlet further downstream to a position where no backflow occurs.
 +
<LI>
 +
If the outlet and the wall is not significantly affecting your results you can ignore it and accept the solution with the back flow warning.
 +
</OL>
 +
 +
==== Calculating the Heat Transfer Coefficient in CFX ====
 +
The Heat Transfer coefficient calculated by CFX will be quite different from standard film coefficients calculated by other means, but it is possible to output values that reflect the standard definition.   
 +
 +
In CFX, the Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Wall Adjacent Temperature)
 +
Most standard engineering equations we are familiar with use some "bulk temperature" in place of the Wall Adjacent Temperature. Of course CFX has no idea what your "bulk temperature" would be, and must use some other value.  When using Wall Adjacent Temperature, which is the fluid temperature of the first fluid node off the wall, the returned value for HTC is going to be completely mesh dependent.  Where coarser meshes will give you answers approaching the standard definition using bulk temperature, and a fine mesh would give you very large values, as the denominator of the HTC equation is approaching zero. 
 +
 +
If you want the HTC to use a different value for the Reference Temperature instead of Wall Adjacent Temperature, there are a two approaches:
 +
 +
<OL>
 +
<LI>
 +
Use the expert parameter "Tbulk for HTC"  and set this to your some reference temperature.  CFX will now calculate: Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Tbulk for HTC)
 +
<LI>
 +
Create your own expression for MyBulkTemperature through the geometry, for example, along the pipe length, which may be a function of the length. 
 +
<UL>
 +
<LI> Create a new expression for MyHTC = Wall Heat Flux / (Wall Temperature - MyBulkTemperature). </LI>
 +
<LI> The tricky part is how do you get "Wall Temperature"?
 +
Well from the original HTC equation, we can see: Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Wall Adjacent Temperature)
 +
Rearrange this equation to: Wall Temperature = (Wall Heat Flux / Wall Heat Transfer Coefficient) + Wall Adjacent Temperature </LI>
 +
<LI> You can then make a new variable from your "MyHTC" expression, and make a contour, or plot it on a graph with a line running along the wall.  Remember this is a boundary only variable. </LI>
 +
<LI> The same approach can be used for Nusselt numbers as well. </LI>
 +
</UL> </LI>
 +
</OL>
=== Postprocessing ===
=== Postprocessing ===
 +
 +
==== Why are my results inaccurate? ====
 +
 +
<ol>
 +
<LI>Firstly, is the simulation correctly set up? Does your model include all relevant physics?</LI>
 +
  <li>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.</li>
 +
  <li>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 modeling other sensitivity analyses may be required, covering things such as:
 +
<UL>
 +
<LI>Domain size (how close can the boundaries be to the region of interest?)</LI>
 +
<LI>Grid density</LI>
 +
<LI>Grid quality</LI>
 +
<LI>Grid type (e.g., structured versus unstructured),</LI>
 +
<LI>Spatial discretization (or advection) scheme</LI>
 +
<LI>Temporal discretisation scheme</LI>
 +
<LI>Turbulence model,</LI>
 +
<LI>Turbulence numerics,</LI>
 +
<LI>Turbulence intensity,</LI>
 +
<LI>Boundary condition type,</LI>
 +
<LI>Any empirical models used, such as heat/mass transfer coefficients, drag laws, free surface model,</LI>
 +
<LI>Two- versus three-dimensional simulations,</LI>
 +
<LI>and timestep size.</li>
 +
</UL></LI>
 +
  <li>Perform an error analysis:</li>
 +
<ol>
 +
<li>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: [http://journaltool.asme.org/Templates/JFENumAccuracy.pdf 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.</li>
 +
<li>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).</li>
 +
<li>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.</li>
 +
<li>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).</li>
 +
<li>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.</li>
 +
</ol>
 +
<LI>And finally - consider the results are you comparing against. Are they accurate? How do you know? Are you modeling EXACTLY the same conditions as the results you are comparing against?</LI>
 +
</ol>
 +
 +
==== Are my results publishable? ====
 +
 +
The Journal of Fluids Engineering provides a good guide of recommendations regarding publishing your data.  [http://journaltool.asme.org/Templates/JFENumAccuracy.pdf Journal of Fluids Engineering Numerical Accuracy]
 +
 +
==== Why do I see a non-zero velocity at the walls? ====
 +
 +
CFX uses control volumes centered 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.
 +
 +
==== Why are my streamlines discontinuous as it crosses from a stationary frame of reference to a rotating frame of reference? ====
 +
 +
The variable "Velocity" is relative to the local frame of reference. If the frame of reference is rotating then it is relative to the rotating frame - so it will be different to the stationary frame by radius x omega. So when streamlines go from a stationary frame to a rotating frame the velocity jumps by radius x omega.
 +
 +
To see continuous streamlines plot the variable "Velocity in stationary frame". This is referenced to the stationary frame regardless of whether the frame is rotating or not, so will be continuous. You might need to access this variable using the puzzingly labeled "..." button.
== FSI (Fluid Structure Interaction) ==
== FSI (Fluid Structure Interaction) ==
=== General ===
=== General ===
-
==== Which programms are necessary to solve a FSI simulation? ====
+
==== Which ANSYS products are necessary to solve a FSI simulation? ====
-
Beginning with Ansys 11.0, Ansys Workbench with Simulation and CFX are required.
+
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? ====
==== 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 requests an Ansys Product and a CFX license.
+
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? ====
==== What kind of coupling methods are possible? ====
Line 26: Line 191:
==== What is the general procedure for a FSI simulation in Ansys 11.0? ====
==== 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.
1. Define the Solid setup in Ansys Simulation (Ansys Workbench). This includes an Fluid-Solid-Interface.
Line 32: Line 199:
3. Define the Fluid setup in Ansys CFX-Pre. A link to the Ansys Input File is required.
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.
+
4. Write an Ansys Definition File (.def) of this setup from CFX Pre
-
5. Solve the Definition File with Ansys CFX-Solver.
+
5. Start the coupled FSI run with the CFX Solver Manger
-
 
+
-
6. Postprocess the data in CFX-Post.
+
-
 
+
-
 
+
-
=== CFX Setup ===
+
-
 
+
-
 
+
-
=== Ansys Setup ===
+
 +
6. Postprocess both the CFD and solids results in CFX-Post.
=== Solving ===
=== Solving ===
Line 49: Line 209:
Start the CFX Solver Manager and load the .def File. Ansys will load the .inp file automatically.
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? ====
+
==== Is it necessary  to define the Ansys Installation Root in "Define Run" in Ansys 11.0? ====
On a Windows PC it is not, on Unix it is necessary.
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? ====
==== Is it possible to stop a running FSI simulation in Ansys 11.0? ====
-
No, the "Stop"-button does not work for FSI simulations.
+
Yes, hit the stop button.  It works.
==== Is it possible to write back-up files of a FSI simulation in Ansys 11.0? ====
==== 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? ====
==== 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
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
* a better fluid mesh
-
* meshsiffness 1/wall distance
+
* meshstiffness 1/wall distance
* smaller timesteps
* smaller timesteps
 +
 +
These error messages can be difficult to debug as the solver often crashes without leaving a results file so it can be hard to see where the problem is. So a good way to debug these problems is set this up in CFX-Pre for your simulation:
 +
* On the Output tab, go to "Transient Results Files" and set it to save a results file every time step. To keep the file size manageable, select "Include mesh", but make it "Selected Variables" and select no variables.
 +
* If the mesh motion is prescribed (ie not FSI or 6DOF) then you can turn the fluid, turbulence, energy and any other solvers off using an expert parameter. This means the only work the solver is doing is calculating the mesh motion. Obviously this will speed the simulation up immensely.
 +
* Run the simulation and load the results files up in CFD-Post
 +
* Pay particular attention to the time steps immediately before it crashed. The region of highly distorted mesh should be obvious. If not use the mesh quality calculator to find the region of poor mesh.
Line 68: Line 235:
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.
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.
-
 
-
== Ansys Workbench ==
 
== ICEM CFD ==
== ICEM CFD ==
-
== CFX-Mesh ==
+
==== Grid Refinement  ====
 +
 
 +
A well-refined grid is essential for properly capturing the viscous flow effects.  For turbulence modeling, a boundary layer thickness of y+<sub>max</sub> < 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).
 +
 
 +
==== Grid Resolution  ====
 +
 
 +
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.
 +
 
 +
==== Grid Quality  ====
 +
 
 +
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):
 +
<ul>
 +
<li>Aspect ratio
 +
<li>Orthogonality
 +
<li>Skew
 +
<li>Determinant of the Jacobian matrix
 +
<li>Expansion factor
 +
<li>Type of grid
 +
<ul><li>Advantages of a structured grid
 +
<ul><li>Very efficient numerical procedures can be implemented on structured grids.
 +
<li>Multi-block grids allow for customization of various regions.
 +
<li>Structured boundary layers and other anisotropic regions limit discretization errors.
 +
<li>Structured grids allow for decreased storage and less complicated data structures.</li></ul>
 +
<li>Advantages of an unstructured grid
 +
<ul><li>Unstructured grids are highly robust and simpler to generate.
 +
<li>There is a lack of restriction on where nodes are placed, increasing the automation of generation.
 +
<li>Unstructured grids allow for subdivision of cells in areas requiring increased accuracy.</li></ul>
 +
</li></ul></ul>
 +
 
 +
ICEM CFD includes a quality calculator for <i>a priori</i> grid accuracy.  CFX-Post also allows for some <i>a posteriori</i> 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 ([http://www.youtube.com/user/ansysinc 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? ==
== How should I ask my question on the CFX forum to get the best possible answer? ==
 +
 +
The CFD-Online forum has general comments on this issue which everybody should be aware of [http://www.cfd-online.com/Forums/site-help-feedback-discussions/175429-guide-how-ask-question-forums.html#post612025/ here].
 +
 +
Some good articles on asking effective questions on other online forums are [http://www.mactalk.com.au/content/how-ask-good-question-get-great-answers-1676/ here] and [http://css-tricks.com/2271-how-to-ask-a-good-question-in-the-forums/ here]. These describe the general principles of writing a good forum question.
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!
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!
Line 89: Line 291:
#*If you are asking a user Fortran and/or user CEL question then include a copy of your existing code file as an attachment.
#*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:
+
Don'ts:
-
* 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 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.
-
 
+
-
Example of a well posed question:<br>
+
-
FIXME
+
-
 
+
-
Examples of questions that are unanswerable:<br>
+
-
FIXME
+
-
How to upload images:
+
* 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.
-
* Create the image on your local machine e.g. skew_mesh.jpg
+
-
* Upload the image to [http://www.imageshack.us Imageshack]
+
-
* Copy the link "Thumbnail for websites"
+
-
* Paste the link into your post e.g. <i><nowiki><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></nowiki></i>
+
-
How to share non-image files as attachments:
+
==== How do I post an image or attachment on the forum? ====
-
* If you have more than one file, zip them into a single file.
+
* Create the image/attachment on your local machine e.g. skew_mesh.jpg
-
* Upload the file to [http://www.rapidshare.de Rapidshare]
+
* Click "Go Advanced"
-
* Scroll down to "I don't want a collector's account right now. Just give me the download-link." and click it.
+
* Click on "Attachments" (The icon looks like a paperclip)
-
* Scroll down until you see the link e.g. <i><nowiki>http://rapidshare.de/files/33808646/audio.log.html</nowiki></i>
+
* Click "Choose File" and browse to your image (such as skew_mesh.jpg). Click OK when you have selected your image file.
 +
* Click "Upload"
 +
* Your image/attachment should now appear in the attachments window. Close the attachments window.
 +
* You should be back on the Go Advanced editor now. Move the cursor to where you would like to insert your image/attachment.
 +
* Click on "Attachments" (the paperclip) and select the image/attachment file.
 +
* You should now have some markup text inserted into your post. When you click "Submit Reply" on the post images will be displayed as thumbnails (and are clickable for the full image), and attachments are shown as a link to download.
[[Category: FAQ's]]
[[Category: FAQ's]]
{{Stub}}
{{Stub}}

Latest revision as of 02:03, 18 August 2018

This article contains answers for Ansys related FAQ. Please feel free to add questions and answers here!

Contents

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 behavior 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 section 15 ("Advice on Flow Modeling"), section 15.10.6 ("Problems with Convergence"), and any best practice guides 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.
    • 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. Those parameters should not be changing to an accuracy tolerance suitable for your simulation.
    • Check the Global Imbalances of all equations. If these are equal to zero, then 'what goes in' equals 'what goes out'. In general, for the mass and momentum equations they approach zero quite fast since their progression through the geometry can be considered as pressure driven (=fast). However, Energy, scalar and mass fractions equations can be considered flow driven (=relatively slow). Therefore it takes substantial more iterations before they have developed through the geometry from inlet to outlet. As a result, before judging the residual convergence of these equations, make sure their imbalances are close to zero.
  3. If important parameters have not converged so a tighter convergence is required, the next thing to do is to find the reason for bad convergence.
    • Check that the physics of the simulation is correct.
    • View the MAX-residuals in the solver manager and compare them to the RMS-residuals. If they are about 2 magnitudes higher it is likely to be a local phenomenon causing the convergence issues.
    • Do a test run with the residuals included in the result file (you can write the residuals to backup files as well to view them during runtime). View the residuals on a representative plane or as a isosurface with a lower then your maximum residual as value. Consider why the residuals are high in that region - Is it:
      1. Poor mesh quality - 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.
  4. If your setup is as good as it can be, the next step is to get the simulation as it currently is to converge. It is important to note, that this can have an impact on accuracy (especially the last two recommendations) and maybe just hides the problem instead of solving it.
    • 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.
    • In contrast, for some applications it can be helpful to reduce the time step. Examples are CFX-cases with Reynolds Stress model or with multiphase. There, a too large timestep can be just too optimistic resulting in divergence due to numerical overshoots and oscillations. Convergence can obtained by reducing the Auto Timescale from default 1 to 0.3 or below.
    • 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, Energy, 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.
    • Use a lower order turbulence model.
  5. If you still cannot get the simulation to converge then try running it as a transient simulation. Adaptive time stepping 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 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.

I get the error "Floating point exception: Overflow". What does this mean and what do I do about it?

This error means the linear solver has diverged badly. You will need to improve the numerical stability of the simulation for this simulation to converge. There can be many causes for this divergence, but the main ones are (listed in approximately the order they should be checked in):

  • Is the physics of the simulation set up correctly? Have you forgot a material property? Or have you entered a material property incorrectly? Have you left out a vital physical model? Does your CEL correctly evaluate?
  • Is the mesh of high enough quality? Different simulations have different mesh quality requirements. Simple low Reynolds number flow can handle lower quality elements than high Reynolds number flows, and some physical models require high quality mesh. Multiphase modeling usually requires a higher mesh quality than single phase, and some multiphase models are very strict - for instance accurate surface tension modeling can require aspect ratios of less than 1.5, but simple flows can handle aspect ratios 10 or 100 times worse than this. Also note that high aspect ratio elements in prism layers does not necessarily cause problems as the element is aligned with the flow direction.
  • Is a better initial condition required? The closer the initial condition is to the real flow field the easier it will be for the solver to converge. You can achieve this improved initial condition by:
    • Using a previous simulation which has converged at a condition close to the problem simulation's condition.
    • Using upwinding for the advection terms. Note this is not very accurate and is not recommended for final results, but it is a useful way of generating initial conditions which are close.
    • Using a coarse mesh and interpolating as an initial condition onto the final mesh.
    • Doing a simulation which does not include tricky physics, for instance doing a single phase model before introducing the multiphase physics.
  • Is double precision required? Some models require additional numerical accuracy to solve. Examples include multiphase (especially surface tension) and buoyancy driven flows.
  • Does the model require small time steps to start? Some simulations require small time steps to start, but once going the time step can be increased.

During the solution process, I get the warning message "A wall has been placed at portion(s) of an OUTLET"

This message appears whenever backflow would occur at a pressure outlet boundary condition. This type of boundary condition cannot handle backflow into the computational domain.

If the warning message disappears before obtaining the final solution, the results are still valid. If the warning persists, you have three options:

  1. Use an opening type boundary condition like the warning message suggests. However, you have to specify the direction of the backflow at an opening. Unless you have information about the direction of the backflow, the second option involves less modeling uncertainties.
  2. Move the outlet further downstream to a position where no backflow occurs.
  3. If the outlet and the wall is not significantly affecting your results you can ignore it and accept the solution with the back flow warning.

Calculating the Heat Transfer Coefficient in CFX

The Heat Transfer coefficient calculated by CFX will be quite different from standard film coefficients calculated by other means, but it is possible to output values that reflect the standard definition.

In CFX, the Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Wall Adjacent Temperature) Most standard engineering equations we are familiar with use some "bulk temperature" in place of the Wall Adjacent Temperature. Of course CFX has no idea what your "bulk temperature" would be, and must use some other value. When using Wall Adjacent Temperature, which is the fluid temperature of the first fluid node off the wall, the returned value for HTC is going to be completely mesh dependent. Where coarser meshes will give you answers approaching the standard definition using bulk temperature, and a fine mesh would give you very large values, as the denominator of the HTC equation is approaching zero.

If you want the HTC to use a different value for the Reference Temperature instead of Wall Adjacent Temperature, there are a two approaches:

  1. Use the expert parameter "Tbulk for HTC" and set this to your some reference temperature. CFX will now calculate: Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Tbulk for HTC)
  2. Create your own expression for MyBulkTemperature through the geometry, for example, along the pipe length, which may be a function of the length.
    • Create a new expression for MyHTC = Wall Heat Flux / (Wall Temperature - MyBulkTemperature).
    • The tricky part is how do you get "Wall Temperature"? Well from the original HTC equation, we can see: Wall Heat Transfer Coefficient = Wall Heat Flux / (Wall Temperature - Wall Adjacent Temperature) Rearrange this equation to: Wall Temperature = (Wall Heat Flux / Wall Heat Transfer Coefficient) + Wall Adjacent Temperature
    • You can then make a new variable from your "MyHTC" expression, and make a contour, or plot it on a graph with a line running along the wall. Remember this is a boundary only variable.
    • The same approach can be used for Nusselt numbers as well.

Postprocessing

Why are my results inaccurate?

  1. Firstly, is the simulation correctly set up? Does your model include all relevant physics?
  2. 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.
  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. For just about every simulation a sensitivity analysis on mesh size and convergence tolerance is required. Depending on what you are modeling 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.
  4. 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 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.
    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.
  5. And finally - consider the results are you comparing against. Are they accurate? How do you know? Are you modeling 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 centered 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.

Why are my streamlines discontinuous as it crosses from a stationary frame of reference to a rotating frame of reference?

The variable "Velocity" is relative to the local frame of reference. If the frame of reference is rotating then it is relative to the rotating frame - so it will be different to the stationary frame by radius x omega. So when streamlines go from a stationary frame to a rotating frame the velocity jumps by radius x omega.

To see continuous streamlines plot the variable "Velocity in stationary frame". This is referenced to the stationary frame regardless of whether the frame is rotating or not, so will be continuous. You might need to access this variable using the puzzingly labeled "..." button.


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.

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 Installation 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
  • meshstiffness 1/wall distance
  • smaller timesteps

These error messages can be difficult to debug as the solver often crashes without leaving a results file so it can be hard to see where the problem is. So a good way to debug these problems is set this up in CFX-Pre for your simulation:

  • On the Output tab, go to "Transient Results Files" and set it to save a results file every time step. To keep the file size manageable, select "Include mesh", but make it "Selected Variables" and select no variables.
  • If the mesh motion is prescribed (ie not FSI or 6DOF) then you can turn the fluid, turbulence, energy and any other solvers off using an expert parameter. This means the only work the solver is doing is calculating the mesh motion. Obviously this will speed the simulation up immensely.
  • Run the simulation and load the results files up in CFD-Post
  • Pay particular attention to the time steps immediately before it crashed. The region of highly distorted mesh should be obvious. If not use the mesh quality calculator to find the region of poor mesh.


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

Grid Refinement

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

Grid Resolution

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.

Grid Quality

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
  • Orthogonality
  • Skew
  • 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.

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 CFD-Online forum has general comments on this issue which everybody should be aware of here.

Some good articles on asking effective questions on other online forums are here and here. These describe the general principles of writing a good forum question.

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.

Don'ts:

  • Don't 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.

How do I post an image or attachment on the forum?

  • Create the image/attachment on your local machine e.g. skew_mesh.jpg
  • Click "Go Advanced"
  • Click on "Attachments" (The icon looks like a paperclip)
  • Click "Choose File" and browse to your image (such as skew_mesh.jpg). Click OK when you have selected your image file.
  • Click "Upload"
  • Your image/attachment should now appear in the attachments window. Close the attachments window.
  • You should be back on the Go Advanced editor now. Move the cursor to where you would like to insert your image/attachment.
  • Click on "Attachments" (the paperclip) and select the image/attachment file.
  • You should now have some markup text inserted into your post. When you click "Submit Reply" on the post images will be displayed as thumbnails (and are clickable for the full image), and attachments are shown as a link to download.


My wiki