cfd_pro_14.5_l11_solversettings_outfile

Upload: mahir-soyer

Post on 05-Jan-2016

220 views

Category:

Documents


0 download

DESCRIPTION

CFD

TRANSCRIPT

  • 2013 ANSYS, Inc. December 12, 2013 1 Release 14.5

    14. 5 Release

    Introduction to ANSYS CFD Professional

    Lecture 11 Solver Settings and Output File

  • 2013 ANSYS, Inc. December 12, 2013 2 Release 14.5

    Introduction CFX requires inputs (solver settings) which tell it how to calculate the

    solution. By introducing the concepts of accuracy, stability and convergence, the purpose of each setting can be understood. Emphasis will be placed on convergence, which is critical for the CFD simulation

    We will cover: How to select the timestep and the convergence criteria Solution Initialization Using the Solver Manager How to monitor and judge the solution convergence and accuracy Specifying the output options for the run Using the Output file

  • 2013 ANSYS, Inc. December 12, 2013 3 Release 14.5

    Initialization Initial values must be provided for all solution variables

    A good initial guess can reduce the solution time

    A poor initial guess may lead to a failure in the first few iterations

    The initial values can be set in 3 ways: Solver automatically calculates the initial values Initial values are entered by the user Initial values are obtained from a previous solution

    Initial values can be set on a per-domain basis or globally for all domains

  • 2013 ANSYS, Inc. December 12, 2013 4 Release 14.5

    Initialization Setting Initial Values Automatic: the CFX-Solver calculates an

    initial value for the solved variable unless a previous results file is provided

    Automatic with Value: the specified value will be used unless a previous results file is provided

    To use a previous solution as the initial guess enable the Initial Values Specification toggle when launching the Solver

  • 2013 ANSYS, Inc. December 12, 2013 5 Release 14.5

    Solver Control

    The Solver Control panel contains various controls that influence the behaviour of the solver

    These controls are important for the accuracy of the solution, the stability of the solver and the length of time it takes to obtain a solution

  • 2013 ANSYS, Inc. December 12, 2013 6 Release 14.5

    Solver Control Advection Scheme The Advection Scheme refers to the way the

    advection term in the transport equations is modeled numerically

    i.e. the term that accounts for bulk fluid motion Often the dominant term

    Three schemes are available: High Resolution, Upwind and Specified Blend

    Rarely need to change from the default High Resolution scheme as it keeps the solution as close to 2nd order as possible without going unbounded

    Unsteady Advection Diffusion Generation 0

    1

    Theory Upwind, diffusive

    Blend Factor = 1, unbounded High Resolution

  • 2013 ANSYS, Inc. December 12, 2013 7 Release 14.5

    Convergence Control

    The Solver will finish when it reaches Max. Iterations unless convergence is achieved sooner

    If Max. Iterations is reached, you may not have a converged solution

    Can be useful to set Max. Iterations to a large number

    When the Solver finishes you should always check why it finished

    Fluid Timescale Control sets the timescale in a steady-state simulation

    0

    1

  • 2013 ANSYS, Inc. December 12, 2013 8 Release 14.5

    Timescale Background ANSYS CFX employs the so-called False Transient

    A timescale is used to move the solution towards the final answer Converged solution is independent of the timescale used

    0

    1

    Choice of timescale is important in obtaining convergence

    For advection-dominated flow, a fraction of the fluid residence time is often a good estimate

    Timescale too large: Convergence becomes bouncy. Solver might fail

    Timescale too small: Convergence will be very slow

  • 2013 ANSYS, Inc. December 12, 2013 9 Release 14.5

    Timescale Control

    Physical Timescale Specify the timescale. Usually a constant but can also be

    variable via an expression

    Auto Timescale The Solver calculates a timescale based on boundary /

    initial conditions or current solution and domain length scale

    Tends to be conservative

    Local Timescale Factor Multiplies the local timescale (local mesh

    lengthscale/local velocity scale

    Useful when vastly different local velocity scales exist Never use as final solution; always finish with constant

    timescale

    0

    1 Timescale Control can be Auto Timescale, Physical Timescale or Local Timescale Factor

  • 2013 ANSYS, Inc. December 12, 2013 10 Release 14.5

    Convergence Criteria Convergence Criteria settings determine

    when the solution is considered converged and hence when the Solver will stop

    Assuming Max. Iterations is not reached

    Residuals are a measure of how accurately the set of equations have been solved

    Lower residuals mean a more accurate solution to the set of equations

    Residuals are just one measure of accuracy and should be combined with monitor points and imbalances

    Residual Target For reasonable convergence MAX residuals

    should be below 1.0E-3 and RMS should be less than 1.0E-4. In fact target RMS values might need to be 1.0E-5 or 1.0E-6.

    0

    1

  • 2013 ANSYS, Inc. December 12, 2013 11 Release 14.5

    Conservation Target

    The Conservation Target sets a target for the global imbalances

    Its good practice to set a Conservation Target and/or monitor the imbalances during the run

    Set a target of 0.01 (1%) or less Flux In Flux Out < 1% ( for some applications < 0.01%)

    Flux Maximum

    OutFlux InFlux Imbalance %

  • 2013 ANSYS, Inc. December 12, 2013 12 Release 14.5

    Solid Timescale Control

    Timescale for solution in a solid domain

    The Solid Timescale should be MUCH larger than the fluid timescale (100 times larger is typical)

    the energy equation is usually very stable in the solid zone solid timescales are typically much larger than fluid timescales

    The solid timescale is automatically calculated as a function of the length scale, thermal conductivity, density and specific heat capacity

    Or you can choose the Physical Timescale option and provide a timescale directly

  • 2013 ANSYS, Inc. December 12, 2013 13 Release 14.5

    Output Control Results The Output Control settings control the

    output produced by the Solver

    The Results tab controls the final .res file Generally do not use the Selected Variables (or

    None) option since it probably wont contain enough information to restart the run later

    Output Equation Residuals is useful if you need to check where convergence problems are occurring

    Extra Output Variables List contains variables that are not written to the standard results file

    E.g. vorticity

  • 2013 ANSYS, Inc. December 12, 2013 14 Release 14.5

    Output Control Backup The Backup tab controls if and when

    backup results files are automatically written by the Solver

    Recommended for long Solver runs in case of power failure, network interruptions, etc

    Option: Standard: Like a full results file Essential: Allows a clean solver restart Smallest: Can restart the solver, but there will

    be a jump in the residuals

    Selected Variables: Not recommended

    Can also manually request a backup file from the CFX Solver Manager at any time

    Frequency of output can be adjusted

  • 2013 ANSYS, Inc. December 12, 2013 15 Release 14.5

    Output Control Monitor The Monitor tab allows you to create the Monitor

    Points

    These are used to track values of interest as the Solver runs

    The Cartesian Coordinates option, is used to track the value of a variable at a specific X,Y, Z location

    The Expression Option is used to monitor the values of a CEL expression:

    E.g. Calculate the area average of Cp at the inlet boundary: areaAve(Cp)@inlet

    You should create monitor points for quantities of interest

    One measure of convergence is when these values are no longer changing

  • 2013 ANSYS, Inc. December 12, 2013 16 Release 14.5

    Solver Manager

    The CFX-Solver Manager is a graphical user interface used to:

    Define a run Control the CFX-Solver

    interactively

    View information about the emerging solution

    Export data

  • 2013 ANSYS, Inc. December 12, 2013 17 Release 14.5

    Defining a Run Define a new Solver run

    Solver Input File should be the .def file Can pick a .res or .bak file to continue a previous run

    To make a physics change and restart a solution, create a new .def file and select the .res or .bak file in the Initial Values Specification section

    To interpolate solution in initial values file on to the mesh in the def file, set Use Mesh From to Solver Input File

    Double Precision The solver uses more significant figures

    Reduce round-off error when small variations in a variable are important, where small is relative to the global range of that variable

    Increases solver memory & CPU requirements

  • 2013 ANSYS, Inc. December 12, 2013 18 Release 14.5

    Defining a Parallel Run By default the Solver will run in serial

    A single solver process runs on the local machine

    Set the Run Mode to one of the parallel options to make use of multiple cores/processors

    Requires parallel licenses Allows you to divide a large CFD problem into smaller

    partitions

    Faster solution times

    Solve larger problems by making use of memory (RAM) on multiple machines

    The Local Parallel options are used when running on a single machine

    The Distributed Parallel options are used when running across multiple machines

  • 2013 ANSYS, Inc. December 12, 2013 19 Release 14.5

    Advanced Controls

    On the Solver tab you adjust Solver Memory settings

    The Solver estimates its memory requirements Memory Alloc Factor is a multiplier for this estimate

    Use when the solver stops with an Insufficient Memory Allocated error

    Can provide individual factors for each stack

  • 2013 ANSYS, Inc. December 12, 2013 20 Release 14.5

    Interactive Solver Control During a solution, Edit Run in Progress lets you make changes on the fly

    Models generally cannot be changed, but numeric values can

  • 2013 ANSYS, Inc. December 12, 2013 21 Release 14.5

    Additional Solution Monitors By default, monitor plots

    are created showing the RMS residuals for each equation solved, plus one plot for any monitor points

    Right-click to switch between RMS and MAX

    Additional monitors can be selected showing:

    Imbalances Boundary fluxes (FLOW) Boundary forces

    Tangential (viscous)

    Normal (pressure)

    Source terms .out file Monitor Plot

    Right-click

    New

    Monitor

  • 2013 ANSYS, Inc. December 12, 2013 22 Release 14.5

    Additional Icons By dragging the cursor over any icon, the feature description will appear

    Start a new

    Simulation

    Monitor Run

    in Progress

    Monitor

    Finished Run Stop Current

    Run

    Back up

    Current Run

    Switch

    Residual Plot

    between

    RMS and

    MAX

  • 2013 ANSYS, Inc. December 12, 2013 23 Release 14.5

    Solver Output File Produced by the ANSYS CFX-Solver and contains information about your

    simulation:

    Model setup The state of the solution during the run Job statistics for the particular run

    Now lets take a look at an out file..

    CFX-Solver

    CFX-Pre

    CFX-Post

    .def

    .res

    .cfx .cfx, .def, .res

    .out

    .gtm, .def

  • 2013 ANSYS, Inc. December 12, 2013 24 Release 14.5

    Model Setup

    Physics definition

    CFX Command Language (CCL)

  • 2013 ANSYS, Inc. December 12, 2013 25 Release 14.5

    Solver

    Mesh quality

    checks, mesh

    statistics and GGI

    intersection details

    are shown here

    188 MB of

    RAM

    allocated

    The start of the Solver

    process

    Memory requirements

    shown here are for

    the Solver. If memory

    errors occur check if

    its the Interpolator, Partitioner or Solver

    process

  • 2013 ANSYS, Inc. December 12, 2013 26 Release 14.5

    State of the Solution Diagnostics shown as the solver iterates towards a solution

    Upper case OK is good. Lower case ok means youre on the limit. F means failed to solve the equation. Reducing the

    timestep may help avoid ok and F. The first few iterations may show ok and F and can be ignored as long as they go away

  • 2013 ANSYS, Inc. December 12, 2013 27 Release 14.5

    Final Imbalances When the solution finishes, the Imbalances are shown

    Equation Imbalance in domain

  • 2013 ANSYS, Inc. December 12, 2013 28 Release 14.5

    Summary This section has covered the following important points:

    Initialization is key to providing a stable solution, especially for complex physics or flows with high solution gradients

    Convergence is one important part of judging solution progress. Dont forget that the solver will terminate when the Max Iterations has been

    reached, regardless of solution convergence levels

    Output Control: Always monitor imbalances to ensure conservation Use backups so that data can be rescued if the solver/hardware fails Monitor quantities of interest as an additional aid when judging steady-state

    behaviour

    The output file gives important information about the physics, resource usage and solution progress