For steady-state cases, and for transient blade row cases that use the
Harmonic Balance
transient method, the CFX-Solver applies a false timestep
as a means of under-relaxing the equations as they iterate towards
the final solution. Because the solver formulation is robust and fully
implicit, a relatively large time scale can typically be selected,
so that the convergence is as fast as possible.
These cases typically require between 50 and 100 outer loop iterations to achieve convergence. If you expect that the actual flow being simulated would take a long time to reach a steady-state condition, given the initial conditions you have specified, then a greater number of outer loop iterations may be required. In this case, you can usually reduce the number of iterations required by setting initial conditions that more closely resemble the steady-state flow.
Although a relatively large time scale can be used, if the time scale is too large, the resulting convergence could be "bouncy" or otherwise problematic. If such a problem occurs, try reducing the time scale, say, by a factor of four. If there is no noticeable improvement, then the convergence problem may be caused by another factor.
If the time scale is too small, then the convergence will be very slow.
In addition to the advice in the following sections, you will probably require a small physical time scale for the following situations:
This sets the number of outer loop iterations for the CFX-Solver. The CFX-Solver will terminate the run after this number of iterations, even if specified convergence criteria have not been reached. Most simulations will require between 50 and 100 iterations for adequate convergence. After a solver run, you should always check the reason why the CFX-Solver finished; that is, has the convergence criteria been met or has the maximum number of iterations been reached? If the CFX-Solver finished because the maximum number of iterations was reached, you may want to continue the run until the convergence criteria is achieved.
If you are using Mesh Adaption, the maximum number of iterations specified is the maximum number of iterations in the final adaption step. The total maximum number of iterations will depend on the number of adaption steps and the maximum number of iterations per adaption step.
The time scale used by the CFX-Solver can be controlled using one of three methods:
You can control these settings from CFX-Pre by going to the Outline tree view and right-clicking Solver Control > Edit. Alternatively, you can use the Command File Editor to achieve more control over the Ansys CFX-Solver. (See Controlling the Time Scale with the Command File Editor for details.)
Auto Timescale is a fluid timescale control option that uses an internally calculated physical time scale based on the boundary conditions, flow conditions, physics, and domain geometry. Information on how the CFX-Solver calculates the Auto Timescale is available in Automatic Time Scale Calculation in the CFX-Solver Theory Guide
Auto Timescale is the default timescale control setting. However, be aware that the Auto Timescale calculated by the solver is often conservative. This is usually robust, but faster convergence is often possible using a more aggressive setting. This can be done by:
Setting Length Scale Option to Aggressive (see Length Scale Option)
Increasing the Time Scale Factor (see Timescale Factor)
Changing to an appropriate Physical Time Scale (see Physical Time Scale)
It is also worth noting that, in some instances, the internal time scale calculation fails to find an appropriate velocity or length scale on which to base the time scale. For example, a buoyancy-driven flow problem can be specified using a Subdomain heat source in a cavity. If no velocity field or temperature difference is specified, a very large time scale (several orders of magnitude) can result. If this is the case, then you should try either:
Specifying a small fixed physical time scale and follow the general guidelines about increasing or decreasing time scale accordingly
Specifying an initial guess for velocity and/or temperature.
When using the Auto Timescale option for fluid domains in a steady-state simulation, the Length Scale Option may also be set. The length scale is used by the solver to evaluate a time scale based on . The options are:
Conservative: The cube root of the domain volume is used. This is the default.
Aggressive: The maximum extent of the domain volume is used.
Specified Length Scale: Uses a user-specified value.
The Timescale Factor option, set automatically to a default value of 1, can be used to multiply the Auto Timescale value calculated by the solver.
The Maximum Timescale can be used to bound the internally-calculated time scale. The Ansys CFX-Solver uses the smaller of the internally calculated time scale and the user maximum value.
Advanced control over the auto timestepping algorithm is available using CCL directly or using the Command File Editor. The following additional parameters are available:
Timescale Update Frequency: Controls the frequency with which a new timescale is updated (default is every 5 iterations)
Number of Timescale Updates: Controls the number of times that a new timescale is calculated (unbounded by default)
Timescale Ramping Factor: If the Number of Timescale Updates has been passed, and the Maximum Timescale is larger than the internally-calculated timescale, the solver increases the timescale every iteration by a factor of the Timescale Ramping Factor until the Maximum Timescale is reached. The default is 1.2.
In the CCL example that follows, the solver starts with an internally calculated timescale multiplied by the Timescale Factor of 1.5. The internally calculated timescale is updated every 7 iterations, but is not permitted to exceed the Maximum Timescale of 5 [s]. The timescale is updated every 7 iterations for a total number of 12 updates. After this period, the timescale increases every iteration by a factor of 1.3 until it reaches the Maximum Timescale.
SOLVER CONTROL: CONVERGENCE CONTROL: Maximum Number of Iterations = 300 Timescale Control = Auto Timescale Timescale Factor = 1.5 Number of Timescale Updates = 12 Timescale Update Frequency = 7 Maximum Timescale = 5 [s] Timescale Ramping Factor = 1.3 END END
The Local Timescale Factor option enables different time scales to be used in different regions of the calculation domain. The value you enter is a multiplier of a local element-based time scale. Smaller time scales are applied to regions of the flow where the local time scale is very short (such as fast flow), and larger time scales to those regions where the time scale is locally large (such as slow flow). The default value is 5. Any value less than this can be considered a "small" timestep.
This option is very useful when there are widely varying velocity scales in the simulation, for example, jet flow into a plenum chamber. The main disadvantage of this method is that very small timescales may locally result for small elements or large aspect ratio elements, which may in turn reduce the overall convergence rate. For this reason, it is best used on meshes of uniform element size and moderate aspect ratios.
The Physical Timescale option enables a fixed time scale to be used for the selected equations over the entire flow domain.
In general, there are two situations in which you would use a physical time scale:
To provide sufficient relaxation of the equation nonlinearities so that a converged steady-state solution is obtained, or,
To evolve the solution through time in order to provide transient information about a time-dependent simulation.
For advection dominated flows, the physical time scale should be some fraction of a length scale divided by a velocity scale. A good approximation is the Dynamical Time for the flow. This is the time taken for a point in the flow to make its way through the fluid domain. For many simulations, a reasonable time estimate is easy to make based on the length of the fluid domain , and the mean velocity , for example:
(16–1) |
For external flow, should be based upon a characteristic geometric length (for example, chord length).
If the domain contains largely varying velocity and length scales, you should try to estimate an average value. If you get divergence, check in the CFX-Solver Output file that your time scale is not larger than the Advection Time Scale value given in the Average Scale Information at the end of the run. A "small" time scale can be considered to be less than 1/3 the smallest length / velocity scale in the simulation. Values higher than this can be considered a "large" time scale.
It is often necessary to alter the physical time scale for buoyancy driven flows in order to achieve convergence. The maximum physical time scale may be estimated using the following relationship:
(16–2) |
where:
is a length scale associated with the vertical temperature gradient
is the temperature variation in the fluid
is the thermal expansivity of the fluid
is the gravitational acceleration.
Physical time scales that are too large are characterized by bouncy convergence or results that do not converge. Time scales that are too small are characterized by very slow, steady convergence.
Depending on your initial guess, a significantly smaller time scale may be required for the first few iterations of a problem.
A judicious physical time scale value usually gives faster convergence than specifying a Local Timescale Factor value.
If you use an expression for the physical time scale, it must evaluate to a constant value. CEL variables are available to control the time scale depending on the iteration. For details, see Timestep, Timestep Interval, and Iteration Number Variables in the CFX Reference Guide.
The Solid Timescale Control option is available if you have a solid domain and are performing a steady-state calculation. Because there is no flow in a solid domain, the relevant time scale for the solution in the solid part of the domain may be very much longer than the time scale in the fluid domain. It is usually safe to set a much larger time scale in a solid domain than would be used in a fluid domain. You can also set a time scale for the energy equation class in a solid domain (see Controlling the Timescale for Each Equation).
When using the Auto Timescale option for the Solid Timescale Control, a Solid Timescale Factor is used. The default value is 1. How this value is used to calculate a solid time scale is described in Solid Time Scale Estimate in the CFX-Solver Theory Guide.
CFX gives you great flexibility in controlling the timescale used for each equation solved. You can specify a timescale on a global basis, a domain basis, a fluid basis, an equation-class basis, or an individual equation basis.
When setting timesteps like this, there will often be more than one timescale defined for any given equation. For example, you could define both a global timescale and a timescale for a single fluid in one domain. The different ways in which a timescale can be set are outlined below in decreasing order of precedence below. For a given equation, the option with highest precedence will always be used:
For a specific equation, in a specific phase, in a specific domain.
For a specific equation in a specific domain.
For a specific equation in a specific phase, in all domains.
For a specific equation in all domains.
For a specific equation class, in a specific phase, in a specific domain.
For a specific equation class in a specific domain.
For a specific equation class, in a specific phase, in all domains.
For a specific equation class in all domains.
For all equations, in a specific phase, in a specific domain.
For all equations in a specific domain.
For a specific phase in all domains.
For all equations globally.
For solid domains that use the global Solid Timescale Factor option (when Solid Timescale Control is set to Auto Timescale).
Note: Solid Timescale and Solid Timescale Control are not allowed outside the global level. Options 1 to 11 can only be specified using the Auto Timescale or Physical Timescale.
An equation could be (but is not limited to): the momentum, continuity, or energy equation for a single fluid; the mass fraction equation for a single component; the volume fraction equation for a single fluid; one of the turbulence equations for a single fluid; an Additional Variable equation.
An equation class can include more than one equation. The equation
classes include momentum
, continuity
, energy
, rs
(Reynolds
stress), ke
(turbulent kinetic energy), ed
(turbulent eddy dissipation), tef
(turbulent eddy frequency), meshdisp
(mesh
displacement), mf
(mass fraction), vf
(volume fraction),
and av
(Additional
Variable). The first eight of these will include more than one equation
only in a multiphase and/or multi-domain simulation. The mf
class will include as many equations as there are components,
the vf
class will include as many equations as
there are fluids, and the av
class will include
as many equations as there are Additional Variables.
The CFX-Pre user interface supports options 8, 12, and 13. To use other options, you must edit the CCL file.
The default approach for solid domains is therefore the lowest priority option. If you want to set a special timescale control for the energy equations in the fluid domain but not affect the solid domains, then you must use one of options 1, 2, 5, or 6. If you use options 1 to 8 for the energy equation and also specify a Solid Timescale Factor, the Solid Timescale Factor will be ignored.