0% found this document useful (0 votes)
14 views109 pages

CFX-FSI_120_lect-06_TwoWay

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views109 pages

CFX-FSI_120_lect-06_TwoWay

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 109

Chapter 6

Two-way Coupled FSI

Solving FSI Applications


using Workbench, ANSYS
Mechanical and CFX

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-1 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-2 Inventory #002678
Two-way Coupled FSI
Multiphysics Background Training Manual

• Simulations involving multiple physics requires solution of


multiple fields
• Fields are coupled: solution data from one field is required by one
(or more) other field

Fluid Dynamics
Solid Mechanics Mass
Momentum
Structural

Turbulence
Thermal

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-3 Inventory #002678
Two-way Coupled FSI
Multiphysics Background Training Manual

• CFX solves Mass and Momentum in a single matrix (fully coupled)


• Other CFX fields (Turbulence, Heat Transfer, …) are solved in a
segregated manner
– Fields are solved sequentially, iterations are needed for convergence

Fluid Dynamics
Solid Mechanics Mass
Momentum
Structural

Turbulence
Thermal

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-4 Inventory #002678
Two-way Coupled FSI
Multiphysics Background Training Manual

• ANSYS usually solves Structural OR Thermal, but the MFS (Multifield)


solver can be used to couple Structural and Thermal in a segregated
manner
– Other fields can be coupled through MFS, too (Electromagnetic, …)
• MFS couples different fields within ANSYS

Fluid Dynamics
Solid Mechanics Mass
Momentum
Structural
MFS
Turbulence
Thermal

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-5 Inventory #002678
Two-way Coupled FSI
Multiphysics Background Training Manual

• ANSYS can also couple fields using a fully coupled approach


• Different elements are used to couple different fields
– E.g. SOLID 226 can couple thermal and structural fields (and other fields)

Fluid Dynamics
Solid Mechanics Mass
Momentum

Structural
Thermal Turbulence

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-6 Inventory #002678
Two-way Coupled FSI
ANSYS and CFX Element Background Training Manual

• ANSYS FEA algorithms use elements that combine mesh and


physics, for example:
– SOLID70 is a thermal element
– SOLID45 is a structural element
– SOLID226 is a coupled field element that can couple structural – thermal

• CFX uses mesh elements only as a computational stencil


– Physics is not associated with the elements – only 1 element “type”
– Exception is Radiation elements

• Use of multiple elements (for multiphysics) in ANSYS requires:


– Data transfer between different element types
– Sequencing of element solutions

• The Multifield solver (MFS) provides an infrastructure for this

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-7 Inventory #002678
Two-way Coupled FSI
The MFX Solver Training Manual

• The MFX solver is the external variety of the MFS solver


– It couples ANSYS and CFX together

• MFX and MFS cannot be combined


– Notice the Structural – Thermal coupling has been removed below

Fluid Dynamics
Solid Mechanics Mass
MFX
Momentum
Structural
OR
Turbulence
Thermal MFX
Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-8 Inventory #002678
Two-way Coupled FSI
The MFX Solver Training Manual

• To couple CFX with a Structural – Thermal simulation use Coupled


Field Elements in ANSYS
– MFX can only couple to 1 element type on the ANSYS side

• Only one SOLVE command is allowed in ANSYS

Fluid Dynamics
Solid Mechanics Mass
Momentum

Structural
MFX
Thermal Turbulence

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-9 Inventory #002678
Two-way Coupled FSI
Iterative MFX Coupling Training Manual

• Iterations are required between the ANSYS and CFX solvers to


converge both systems
– In the same way that iterations are required to converge segregated field
within the CFX or ANSYS solvers
• Coupling is achieved by transferring surface loads/displacements
across physics interface (no body/volume loads)
Fluid Dynamics
Solid Mechanics Mass
MFX
Momentum
Structural

Turbulence

Heat Transfer

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-10 Inventory #002678
Two-way Coupled FSI
Iterative MFX Coupling Training Manual

• A transient 2-way FSI simulation has three levels of iterations:


The transient loop – each loop/step
Time Loop moves forward in time, as in a standard
CFX or ANSYS transient simulation.
Coupling / Stagger Loop
Field Loop Loads / displacements are
updated between the
ANSYS and CFX solvers.

The usual inner loop, used to


converge the field(s) within a solver –
named Coefficient Loops in CFX and
End Field Loop Equilibrium Iterations in ANSYS.

End Coupling / Stagger Loop


End Time Loop

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-11 Inventory #002678
Two-way Coupled FSI
Iterative MFX Coupling Training Manual

• Field Loop iterations stop when the


field reaches its convergence
target (or max iterations in CFX)
Time Loop
• Stagger Loop iterations stop when
Coupling / Stagger Loop
the loads / displacements reaches
Field Loop their convergence targets or max
number of loops is reached
• Ensure the individual field solvers
AND the loads / displacements are
converged before starting the next
time step
End Field Loop
• The CFX Field Loop does not need
End Coupling / Stagger Loop to be converged every Stagger
End Time Loop Loop, only by the end of the last
Stagger Loop

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-12 Inventory #002678
Two-way Coupled FSI
MFX Features Training Manual

• Third Party Coupling Scheme Not Required

• Supports Large Models


– CFX solution can use distributed parallel processing on n machines
– ANSYS solution can use local / shared memory parallel processing

• Solver data transfer across standard internet sockets (TCP/IP)


– Efficient
– Solvers can run on different machines (LAN, WAN, Internet)
– Heterogeneous architectures (mix Windows, Linux, UNIX)

• All Ansys 3D elements


– Structural (solid and shell), thermal and coupled-field

• All CFX capabilities


– Exception is multi-configurations (inc. re-meshing)

• Stagger iterations produce an implicit solution

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-13 Inventory #002678
Two-way Coupled FSI
MFX Features – Load Transfer Training Manual

• Loads transfer and mapping based on CFX GGI technology


– Supports non-matching meshes
– Efficient, robust
– Preserves profiles of local distributions
– Conservative both globally and locally at the element level
• Conservation of Force and Heat Flux is important!

• Interface load relaxation controls


• Convergence checks for interface loads

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-14 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-15 Inventory #002678
Two-way Coupled FSI
Workbench Workflow Training Manual

• Standard WB workflow for 2-way FSI


– Drop a CFX system onto the Setup cell of a Transient Structural
system
– Delete the Solution (and Results) cell from the Transient
Structural system

– Geometry is shared by default


– Fluid and structural meshes are created separately

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-16 Inventory #002678
Two-way Coupled FSI
Workflow Overview Training Manual

• Import / create geometry


– Extract fluid regions in DM
if necessary

• Set up Mechanical model


– Very similar to a standard
Mechanical model
– Tag the FSI interface region

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-17 Inventory #002678
Two-way Coupled FSI
Workflow Overview Training Manual

• Mesh fluid region

• Setup CFX model


– Define Coupling Timestep
controls
– Create fluid domain as usual,
enabling Mesh Motion
– FSI Interface will be a Wall
Boundary where the motion is
received from ANSYS
– In addition to usual CFX Solver
Controls, set Coupling solver
controls

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-18 Inventory #002678
Two-way Coupled FSI
Workflow Overview Training Manual

• Run in the CFX


Solver Manager
– Both codes started
automatically
– Or can launch one at a
time (different
machines, clusters)
– Solution output from
both codes tracked in
the CFX Solver
Manager
• Both solutions can
be post-processed in
CFD-Post
– Some limitations for
ANSYS results in
CFD-Post
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-19 Inventory #002678
Two-way Coupled FSI
Workbench Workflow Training Manual

• WB workflow not complete for 2-way FSI


– OK for single run, but not restarts
• Consider using WB for Geometry, Mesh and Mechanical, then
exporting the fluid mesh and ANSYS Input file and continuing in an
unconnected system (or outside of WB)

Fluid and Solid


Geometry

Fluid and Solid Mesh:


export fluid mesh,
then suppress fluid
body and continue
with structural setup

Structural Setup: Write


Input File when complete, Fluid Mesh and ANSYS Created as a Duplicate
then run CFX outside WB, Input File manually of the CFX FSI Steady
or as shown imported into CFX-Pre State system after the
Setup was complete

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-20 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-21 Inventory #002678
Two-way Coupled FSI
CAD / DesignModeler Training Manual

• Helpful to use a single CAD file containing both the


fluid and solid regions
– Ensures that FSI interface region lines up
– Fluid geometry/mesh may need to include fillets if present in
the solid
– “Small” mismatch OK ~ half the local element edge length
• Same as GGI’s in CFX

• Can import separate CAD files into DesignModeler and


move / transform as necessary
• Consider if subdomains are needed to control mesh
motion

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-22 Inventory #002678
Two-way Coupled FSI
CAD / DesignModeler Training Manual

• To use shell elements in Mechanical, make a Surface body in DM


– Given a fluid body, use Create > Thin/Surface with zero thickness to
create a Surface body
• When you select a face, the side with the positive surface normal is
highlighted in green
– Force passed from CFX is a vector, so the surface normal direction
doesn’t matter
– Only important when using Offset Type for a Surface Body in Mechanical
• Moves nodal location to the top/bottom of the shells; mid-plane is default

Outward pointing normal; Inward pointing normal;


use Offset Type = Bottom use Offset Type = Top

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-23 Inventory #002678
Two-way Coupled FSI
Meshing Training Manual

• When meshing the fluid part, suppress


the solid region in Meshing
– And visa-versa Solid Fluid
• Mesh does not need to match across
FSI boundary Fluid exerts pressure normal
– GGI numerics used to transfer loads to fluid boundary elements
– Use similar mesh length scales to
maintain load transfer resolution

• Difference in element normal directions


Solid
across interface can produce twisting
– Particularly on coarse meshes Fluid
– Line up element normals if necessary
• Mesh fluid and solid parts together so that
nodes match, as shown on next side
Force vector is transferred to the solid,
but does not act normal to the solid
elements – results in a twisting force
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-24 Inventory #002678
Two-way Coupled FSI
Meshing Training Manual

• No workflow in WB that allows fluid and solid parts to be meshed


with node matching, transferring the fluid region to CFX and the
solid region to Mechanical
• Instead, create the Mechanical system and
delete the Solution cell
• Place bodies into a single Part for matching
mesh
• Mesh both fluid and solid regions in the
Mechanical Model, then use File > Export to
write out a FLUENT Input File (.msh)
• Suppress the fluid region, continue with the
Mechanical Model definition, writing out an
ANSYS Input File
• Import the FLUENT mesh into CFX-Pre in a
stand-alone CFX Component System
– No automatic mesh update in CFX-Pre
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-25 Inventory #002678
Two-way Coupled FSI
Meshing Training Manual

• It is also possible to create fluid and solid meshes outside


Workbench (e.g. ICEM)
– Import the fluid mesh into CFX-Pre manually
– Import the solid mesh into Finite Element Modeler, then connect to a
Mechanical system:

• Fluid and solid meshes can be created together in ICEM so that


nodes match at the interface
– Meshing the fluid volume then extracting the surface mesh to use as a
Mechanical shell mesh is also possible

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-26 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-27 Inventory #002678
Two-way Coupled FSI
Mechanical Analysis Settings Training Manual

• Set Number of Steps to 1 and Step End


Time to 1 [s] (TIME,1)
– These values are not used
– Coupling Time Duration defined in CFX-Pre
will override

• Usually set Auto Time Stepping = Off,


Defined By = Substeps and Number of
Substeps to 1 (AUTOTS,OFF NSUB,1,1,1)
– This gives a single substep per transient
time step (Coupling Time Step), which is set
in CFX-Pre

• Although you can also Define By Time


(DELTIM,<t>,<t>,<t>), it is problematic
when using Adaptive Time Steps (set in
CFX-Pre) or when changing the Coupling
Time Step
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-28 Inventory #002678
Two-way Coupled FSI
Mechanical Analysis Settings Training Manual

• If Number of Substeps > 1, then ANSYS will


perform sub-cycling (substeps within each
Coupling Time Step)
– Not recommended
– Loads from CFX are not updated for the
substeps
– CFX will only receive the final displacements
– If the interface timescales require a smaller
timestep then both codes should be using a
smaller timestep
• If Auto Time Stepping is used then this
implies sub-cycling, since the Number of
Substeps will be adjusted automatically
– Not recommended
• “Sub-cycling” is not possible on the CFX
side
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-29 Inventory #002678
Two-way Coupled FSI
Mechanical Analysis Settings Training Manual

• Time Integration = On (TIMINT,ON)


– Required for transient!
– Should only be off if performing a steady-
state simulation which will be restarted as a
transient

• Large Deflection = On (NLGEOM,ON)


– Should ALWAYS be on, regardless of
whether the structural displacements are
large or not
– Without this, the underlying mesh in ANSYS
will not change, so forces will be applied to
the original mesh; simulations will be less
stable

• Damping Controls
– Define structural damping if important
– Same as any non-FSI transient dynamic simulation (see ANSYS doc)

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-30 Inventory #002678
Two-way Coupled FSI
Mechanical Analysis Settings Training Manual

• Output Controls
– Each timestep is actually treated as a load
step in ANSYS
– The rst file can become quite large, even for
small cases
– Can reduce by using Output Controls under
Analysis Settings as shown
• Note that Last Time Point means the last
substep of each loadstep – i.e. once per
Coupling Step (transient time step)

• Insert MFOU in a Command Snippet to


reduce the frequency at which results are
written:
MFOU,10
– This will save results to the rst file every 10th Coupling Step (transient
time step). Note that this is not sufficient for a restart / backup point

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-31 Inventory #002678
Two-way Coupled FSI
Mechanical Analysis Settings Training Manual

• Backup / Restart Points


– For long simulations you may want to create backup files that can
be used for a restart
– Use the MFRC command and the MFOU command
MFOU,10
MFRC,50,1

– Above creates restart points every 50 time steps, keeping only the
most recent (1) file set required for restarts
– Results are also written to the rst file every 10 time steps – all
these results are maintained
– Must manually create corresponding backup files for CFX too,
typically using the Coupling Step Interval option
– MFRC must be a multiple of MFOU
– Note the RESCONTROL command is ignored for MFX
– MFRC cannot be added when restaring – define it in the initial run
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-32 Inventory #002678
Two-way Coupled FSI
Mechanical Loads and Supports Training Manual

• Define non-FSI supports and loads as


usual
• Insert a Fluid Solid Interface for the
regions that will communicate with
CFX
– Pick Faces or use Named Selections
– Can define multiple interfaces
• Split FSI interfaces when faces meet
at a small angle
– E.g. trailing edge of an airfoil
– Avoids mapping problems

1
2

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-33 Inventory #002678
Two-way Coupled FSI
Mechanical Loads and Supports Training Manual

• Ensure any non-FSI time-dependent loads are consistent with the


simulation start time
– Restarts of transient cases will not start from 0 [s], including restarts
from “steady state” cases that are actually transient dynamic with
TIMINT,OFF

• When a Rotational Velocity is applied in Mechanical, it will solve in a


rotating reference frame
– The mesh is not actually rotated (just like CFX)
– Displacements passed to CFX will be relative to the rotating frame
– Use a rotating frame on the CFX side too

• Apply other loads and supports as usual

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-34 Inventory #002678
Two-way Coupled FSI
2-way Thermal and Structural Analysis Training Manual

• When both thermal and structural loads are to be passed from CFX to
ANSYS, must use coupled field elements in ANSYS
– E.g. SOLID 226 and SOLID 227
– Set up as a Transient Structural analysis then switch the element type
using a Command Snippet inserted into Geometry > Part:

Sets element type matid to SOLID 226


with KEYOPT(1) = 11 (Structural –
Thermal degrees of freedom)

For element type matid, set KEYOPT(2) =1. This


Et,matid,226,11 sets weak (load vector) coupling, producing a
KEYOPT,matid,2,1 symmetric matrix but requiring at least two
iterations to achieve a coupled response. This
just allows iterative solvers to be used rather
than the direct sparse solver – the best solver
will be case dependent.
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-35 Inventory #002678
Two-way Coupled FSI
Close Mechanical or Write an Input File Training Manual

• Do not run the solver in


Mechanical
• If completing the entire
simulation in WB, just close
Mechanical and Update the Setup
cell
– Writes an input file in the project
directory named ds.dat which will
be picked up by CFX-Pre

• If running CFX and the solvers


outside WB, in Mechanical select
the analysis from the Outline tree
then Tools > Write Input File
– Writes an input file that you will
select in CFX-Pre

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-36 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-37 Inventory #002678
Two-way Coupled FSI
CFX Simulation Type Training Manual

• Coupling Time Duration


– Total transient time
– For steady-state enter arbitrary value

• Coupling (Multifield) Time Step


– Transient time step size applied to CFX
and ANSYS
– On the ANSYS side only, sub-cycling is
possible as noted previously
– For steady-state enter a fraction of the
Time Duration (e.g. 1/20th to have 20
load / displacement updates during the
run)
– Adaptive option dynamically adjusts the
time step based on the number of
coupling iterations needed to converged
each timestep
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-38 Inventory #002678
Two-way Coupled FSI
CFX Simulation Type Training Manual

• Coupling Initial Time


– Generally leave as Automatic
– When restarting this will pick up time
completed in the previous run

• Analysis Type
– This controls if the CFX solver is run
in steady-state or transient mode
– If Transient, time controls must be in
sync with ANSYS, so nothing to set

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-39 Inventory #002678
Two-way Coupled FSI
CFX Domain Training Manual

• Reference Pressure in CFX is not passed to ANSYS by default


– Set “include pref in forces = t” if necessary
• Expert Parameters Panel in CFX-Pre
• Absolute Pressure will be used in the forces passed to ANSYS
– May need to apply atmospheric pressure to the external boundaries of
the structure in ANSYS
– Don’t set 0 or 1 [atm] Reference Pressure if that is not representative of
your domain pressure
• Use compressible fluids if your fluid is compressible!
– And in some cases even if it’s not
– Can help maintain stability – incompressible fluids can react with large
pressure spikes to boundary motion
– For example don’t use Air at 25 C; use Air Ideal Gas
– Incompressible + Closed Volume + Mesh Motion does not work!

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-40 Inventory #002678
Two-way Coupled FSI
CFX Domain Training Manual

• If resolving pressure waves in “incompressible” fluids (e.g. Water


Hammer) define your own density as a function of pressure, e.g:
• Pref = 100 [bar]
• BulkMod = 2.2e9[Pa]
• Density = 1002[kg/m^3]*(1 +(Absolute Pressure – Pref)/BulkMod)

• Enable Total Energy equation when resolving pressure waves in the


fluids
– Even if heat transfer is not of interest
– Otherwise can get pressure wiggles in the CFX solution because the
system is over-constrained

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-41 Inventory #002678
Two-way Coupled FSI
CFX Boundaries Training Manual

• Create the FSI interface as a wall


boundary in CFX
• Heat Transfer and/or Mesh Motion option
can be ANSYS MultiField
– Receiving elements in ANSYS must support
thermal and/or structural DOF
• Mesh Motion: receives displacements
and sends forces
• Heat Transfer: receive Wall Heat Flow
and sends Temperature, or visa-versa
• FSI interfaces can be set on wall
boundaries only
– No CFX interface boundaries (e.g. Fluid-
Solid, Fluid-Porous)
– Can make inlets / outlets walls with a
continuity boundary source if an inlet/outlet
pressure force needs to be passed to ANSYS
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-42 Inventory #002678
Two-way Coupled FSI
Transient 1-way using 2-way Framework Training Manual

• 1-way transient FSI is most


easily performed using the
2-way framework but only
sending data in one
direction Receive
– Automates data transfer Temperature but
send nothing
– No intermediate files
needed Receive displacements
– Conservative GGI-type but send nothing
interpolation is better than
simple linear interpolation
in CFD-Post

Use Additional
Coupling options to
send data 1-way

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-43 Inventory #002678
Two-way Coupled FSI
Transient 1-way using 2-way Framework Training Manual

• Can be a problem when timescales are very different


– E.g. long thermal transient in the solid, but transient timestep limited
by the CFD solution
– Cannot “sub-cycle” the CFD solution

• Can only send surface data


– Solve CHT in CFX, but only pass surface temperatures and solve
solid temperature in ANSYS too
– Usually faster than 2-way coupled heat transfer

• Use coupled field elements for thermal stress

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-44 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• Critical for transient FSI cases to start from a physically consistent


solution
– The initial position of the structure must be consistent with the initial
fluid field

• For some transient cases it is sufficient to initialize the fluid field as


usual
– Use a converged steady-state fluid-only solution, or specify accurate
initial values
– Appropriate when the initial fluid field would not produce “significant”
deformations
• “Significant” can be very small

• Otherwise a steady-state 2-way FSI simulation should be solved first,


then restarted as a transient
– A steady-state fluid-only solution can initialize this case, but often not
necessary

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-45 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• Consider the case of a pressurised pipe:

Water 1000 psi

• Under steady-state conditions the pipe will expand


slightly due to the high fluid pressure
• Starting a transient FSI simulation using the undeformed
pipe geometry will likely fail
• Let’s examine what happens in this scenario…

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-46 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• Assume that CFX solves first …


• In the first CFX timestep we get a rough solution
consisting of water at 1000 psi in an undeformed pipe
– CFX passes a large force to ANSYS …

Water 1000 psi

• ANSYS expands the pipe slightly and passes


deformations back to CFX
– Let’s assume the pipe walls move 0.1 [mm], increasing the
internal pipe volume by 0.1%

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-47 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• The water can respond with a change in density to “fill


the void”
• What pressure change is required to reduce the density
of water by 0.1%?
– For an incompressible fluid it is infinite!
– For compressible water with a bulk modulus of 2.2e9 [Pa] it is:
Change in Pressure
% Density Change 
Bulk Modulus

Change in Pressure 0.001* 2.2e9 2.2e6 [Pa]

– We need a pressure change ~ 22 [atm]; likely to cause the


solver to fail!

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-48 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• Another way to look at this is to calculate the acceleration


of the pipe walls
– Assume a timestep of 1e-4[s]
– The pipe moves 0.1[mm] in 1e-4[s]

Velocity 0.0001[m] / 1e - 4 [s] 1 [m/s]

Acceleration 1 [m/s] / 1e - 4[s] 10,000 [m/s 2 ]

– A huge pressure difference must be generated to accelerate


water at this rate; likely to cause the solver to fail!

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-49 Inventory #002678
Two-way Coupled FSI
Initialization Training Manual

• The more compressible a fluid the easier it can respond


to deformations through density changes

• Reducing the timestep can make start-up problems


worse, not better
– Half the timestep, acceleration increases by a factor of 4

• This example should be initialized using a steady-state 2-


way FSI solution
– Pipe will already be expanded when the transient starts
– Procedure for restarts discussed later

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-50 Inventory #002678
Two-way Coupled FSI
CFX Output Control Training Manual

• Backup tab
– Writes CFX backup files
– ANSYS files are needed too for a
restart
– Use the Coupling Step Interval
option with the same frequency as
the MFRC command
– May cause CFX to overwrite MFOU
command inserted in Mechanical
(next slide)

• Stopping the run always produces a


restart point
CFX is currently (12.0) retaining all backup files for
FSI runs – delete old ones manually if necessary
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-51 Inventory #002678
Two-way Coupled FSI
CFX Output Control Training Manual

• Transient Results specified as


normal for CFX
• The frequency at which CFX
transient results or backup files are
written may affect the ANSYS
results too
– If Output Frequency is Coupling
Step Interval or Every Coupling
Step, CFX will pass an MFOU
command to ANSYS using the
lowest (most common) frequency
– Will override an MFOU command
inserted in a Command Snippet in
Mechanical
– Process Input File must be enabled for the
command to pass to ANSYS (see later)
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-52 Inventory #002678
Two-way Coupled FSI
CFX Monitor Points Training Manual

• Create monitor points for the


transferred quantities at the FSI
(forces, displacements, temperature,
heat flux)
• Enable Monitor Options and Monitor
Coeff. Convergence for transients
– This provides CFX monitor history for
each coefficient loop within a transient
timestep
– Allows you to monitor how the
transferred quantities are changing
within a timestep and judge if they have
converged

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-53 Inventory #002678
Two-way Coupled FSI
CFX Monitor Points Training Manual

• Transient Force History at Interface:

1 timestep

Forces, displacements,
temperatures, heat flows
should be converged
within a timestep
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-54 Inventory #002678
Two-way Coupled FSI
CFX Solver Control Training Manual

• Maximum Coefficient Loops =


Number of CFX iterations per
stagger loop
• In general don’t use too many loops
– There’s no point converging each
stagger too tightly since the transferred
quantities may change in the next
stagger loop
• Use a Conservation Target
– Good practice, but be careful if your
flow rate goes to zero (e.g. valve
closing) since the reported mass
imbalance can be high
• Equation Class Settings
– Mesh Displacement – see moving
mesh chapter
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-55 Inventory #002678
Two-way Coupled FSI
External Coupling Training Manual

• Coupling Step Control = Stagger


Loops
– Max. Iterations = 10 is a reasonable
number
• Often fewer loops are required, but is
case dependent
• If 10 stagger loops are consistently
used, increase or adjust other
controls
• Set to 1 if running 1-way transient or
to make the solution explicit
– Min. Iterations = 3 is reasonable
• With the default relaxation factor of
0.75 you need a few loops to ensure
the correct loads are transferred
• Set to 1 if running 1-way transient or
to make the solution explicit
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-56 Inventory #002678
Two-way Coupled FSI
External Coupling Training Manual

• Under Relaxation Factor refers to


the transferred loads, default = 0.75
– E.g. only 75% of the change in
loads is sent
– Increase to speed up convergence
if possible
– Set to 1 if running explicit (one
stagger loop) or 1-way transient,
otherwise you’ll get the wrong
loads!
– Reducing will slow convergence
and require more stagger loops to
get accurate loads
• Try other methods of improving
convergence first

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-57 Inventory #002678
Two-way Coupled FSI
External Coupling Training Manual

• Convergence Target default is


0.01
– Monitor loads with timesteps
and reduce if necessary

• See CFX documentation for


details of interface load
convergence
– ANSYS CFX-Solver Manager
User’s Guide >> Residual
Plotting >> Residual Plotting for
ANSYS Multi-field Runs

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-58 Inventory #002678
Two-way Coupled FSI
External Coupling Training Manual

• Select who should solve first


– The physics that is driving the
solution should solve first
• Not always obvious!
– E.g. flow induced vibration
• The fluid is driving the vibrations - solve
CFX first?
• Solving ANSYS first usually works better
– lagged forces is better than lagged
mesh displacements
• See which works best for your case

• Can also solve simultaneously


– Not often used
– Likely to require more stagger loops since data is further lagged
– Both codes can work at the same time – don’t share processors!
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-59 Inventory #002678
Two-way Coupled FSI
Steady State 2-way FSI Solver Control Training Manual

• Two ways to run steady-state:


– Run as n coupling steps, with 1 stagger per step
• As shown earlier, e.g. Coupling Time Step = 1/20th of Coupling Time
Duration
– Run as 1 coupling step, with n staggers
• Coupling Time Duration = Coupling Time Step
• Set the number of stagger loops (e.g. 20)

– A run can only be manually stopped at the end of a Coupling


Step, therefore the first method provides more flexibility here
– Use MFOU with the first method to avoid unnecessary results
data

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-60 Inventory #002678
Two-way Coupled FSI
Steady State 2-way FSI Solver Control Training Manual

• 20 Coupling Steps, 1 stagger per step, up to 8 CFX iterations per


stagger; Maximum of 20*1*8 = 160 CFX iterations in total, with
loads being updated 20 times

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-61 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-62 Inventory #002678
Two-way Coupled FSI
Starting the Run Training Manual

• Write the Definition file and proceed to


the CFX Solver Manager
– WB writes the def file in the background
• Run Definition panel: as usual
• MultiField panel:
– MFX Run Mode:
• Start ANSYS and CFX
– Both solvers started automatically
• Start ANSYS only / Start CFX only
– If running on different machine – see
parallel discussion below
• Process Input File only
– Produces a .mf file
– Used for physics changes; see
discussion below

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-63 Inventory #002678
Two-way Coupled FSI
Starting the Run Training Manual

• MultiField panel:
– Mechanical Input File is that specified
in CFX-Pre
• Can change here if you’ve written a
new one
– Process ANSYS Input File
• Uncheck if the Mechanical Input File
is a .mf file
• See restarts discussion below
• On the Solver panel enable the Double
Precision option
– Recommended for FSI applications
since the mesh deformations are often
very small compared to the size of the
domain
• Start Run

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-64 Inventory #002678
Two-way Coupled FSI
Running in Parallel Training Manual

• CFX can use all the usual parallel methods


– Set up as for any non-FSI run

• ANSYS is limited to local (shared


memory) parallel
• To run ANSYS in local parallel specify,
for example, -np 4 in the Additional
Arguments field
– Will run on the local machine
– ANSYS can run on two cores without any
additional licenses
• From the Command Line:
> cfx5solve -def CFX_Setup.def -double -mfx-run-mode "Start ANSYS
and CFX" -ansys-input ANSYS_Setup.inp -ansys-arguments "-np 2"
Start both solvers using the files specified, run CFX in double precision, run ANSYS
on two partitions
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-65 Inventory #002678
Two-way Coupled FSI
Running on Two Different Hosts Training Manual

• To run on different machines: ...


...
– Start ANSYS first on machine A +--------------------------------------+
| |
• MFX Run Mode = Start ANSYS | Starting ANSYS Solver |
| |
only +--------------------------------------+
ANSYS solver listening on 1971@MACHINE1
• CFX out file will show a port and
hostname that ANSYS is listening
on
– Start CFX on machine B
• Other machines can be used as
slaves
• Provide the port and hostname
output by ANSYS

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-66 Inventory #002678
Two-way Coupled FSI
Running on Two Different Hosts Training Manual

• From the command line:


> cfx5solve -def CFX_Setup.def -mfx-run-mode “Start ANSYS
only" -ansys-input ANSYS_Setup.inp
– Start the ANSYS solver using the input file specified

> cfx5solve -def CFX_Setup.def -double -mfx-run-mode "Start


CFX only" -cplg-host 2249@MACHINE1
– Start the CFX solver using the specified def file in double precision,
connect to the ANSYS solver already running on MACHINE1 using the
specified port

• Run ‘cfx5solve –help’ or see doc for all command options

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-67 Inventory #002678
Two-way Coupled FSI
Running in Parallel Training Manual

• Slave processes/threads must be on different cores


– Otherwise things will run VERY slow
– Since the codes are (usually) running sequentially, it would seem
logical that they can happily share cores
– However, a slave process pulls 100% of the available CPU while
it’s in ‘waiting’ mode
• The other code is starved of CPU
– OK for CFX and ANSYS to share a master processor
• Example: A single quad-core machine
– CFX: 4 partitions, ANSYS serial
• OK – only the master is shared
– CFX: 3 partitions, ANSYS 2 partitions (cores)
• OK – when ANSYS is ‘waiting’ 1 core will be in use, leaving 3 for
CFX

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-68 Inventory #002678
Two-way Coupled FSI
Another Look at the Workflow Training Manual

• ANSYS is the master


process CFX-Pre Mechanical
– ANSYS controls the
transient timestep, interface
mapping, interface Definition File Input File
convergence checks, load Contains CCL definition of Contains APDL
fluid model and interface / definition of structural
transfer, etc coupling settings model

• But all these settings are


defined in CFX-Pre Process Input File
CFX adds APDL
commands for interface /
coupling settings
• We have an input file from
ANSYS that contains the
mechanical model with the
FSI surfaces tagged CFX Solver ANSYS Solver
Input File + appended
– Workbench writes this input Settings from the
APDL commands from
Definition file CFX
file into the project directory
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-69 Inventory #002678
Two-way Coupled FSI
Another Look at the Workflow Training Manual

• CFX-Pre writes a Definition


File (.def) containing the CFX-Pre Mechanical
CFD model and the
interface / MFX controls
Definition File Input File
• When the run is started, Contains CCL definition of Contains APDL
fluid model and interface / definition of structural
CFX creates APDL coupling settings model
commands for the
interface / coupling settings
and combines them with the Process Input File
ANSYS Input file contents CFX adds APDL
commands for interface /
– Important to understand coupling settings
what’s happening here
when performing restarts
– See Appendix A for restart
details CFX Solver ANSYS Solver
Input File + appended
Settings from the
APDL commands from
Definition file CFX

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-70 Inventory #002678
Two-way Coupled FSI
ANSYS Commands Inserted by CFX Training Manual

• You can view the commands


generated by CFX in the
ANSYS Solver output,
following the end of the Input
File

End of ANSYS Input File

CFX generated these commands

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-71 Inventory #002678
Two-way Coupled FSI
“Process Input File” Training Manual

• If you disable Process ANSYS


Input File then CFX does not CFX-Pre Mechanical
generate any APDL
commands for ANSYS
Definition File Input File
– Therefore the Mechanical Contains APDL
Contains CCL definition of
Input File must already fluid model definition of structural
contain the interface and model and interface /
coupling settings
coupling settings
• For example when using the
Mechanical APDL GUI
• Also see CFX documentation:
– ANSYS CFX Solver Manager
User’s Guide >> Working with
Solver Manager >> ANSYS
Multi-field Run >> Processing
the ANSYS Input File CFX Solver ANSYS Solver
Settings from Input File
Settings from the
Definition file

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-72 Inventory #002678
Two-way Coupled FSI
Solver Files Generated Training Manual

• CFX
– The working directory will contain the CFX
Output and Results files as usual
– The transient (.trn) and backup (.bak) results
files are stored in the <name>_001 directory
• ANSYS
– The subdirectory <name>_001.ansys is
created and contains all the ANSYS files
– The transient and file results are stored in
the .rst file (can get very large)
– The auto-generated ANSYS.mf file can be
viewed in this subdirectory
– ANSYS.stdout is the ANSYS Solver output
as displayed in the CFX Solver Manager
• Workbench
– The working directory is:
…/<ProjectName>_files/dp0/CFX/CFX
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-73 Inventory #002678
Two-way Coupled FSI
CFX Solver Output Training Manual

Start of Time Step


First Stagger Loop

Solve Mesh Displacement


- Should be fully converged

CFX Coefficient Iterations


- Should be converging

Second Stagger Loop

Solve Mesh Displacement


- Should be fully converged

CFX Coefficient Iterations


- Should be converged by the
end of the last stagger

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-74 Inventory #002678
Two-way Coupled FSI
CFX Solver Output Training Manual

• As noted earlier, monitor point output should be used to judge


interface convergence
• ANSYS Field Solver and Interface Loads plot also shown

X-axis values do not


correspond to each
other or to CFX
Cumulative Cumulative
ANSYS Stagger
Iterations Loops

L2 normalized values should be less than Interface loads should be negative


corresponding convergence criteria at the end of each timestep
(CRIT) at the end of each timestep
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-75 Inventory #002678
Two-way Coupled FSI
ANSYS Output – Check Interface Mapping Training Manual

• In the ANSYS Output, ALWAYS check the interface mapping


• Scroll to the top of the ANSYS Out File
• Right-click in the window and select Find…
• Search for the following – make sure Match case is enabled:

This section provides information on the


mapping between the CFX and ANSYS
meshes. If the Non-Matching Area Fraction
or the No. of Un-Mapped Nodes is non-zero,
then some parts of the FSI interface will not
be passing loads between the field solvers.
In this case check that the two side physically
match and completely overlap.

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-76 Inventory #002678
Two-way Coupled FSI
ANSYS Output Training Manual

Time Step and Stagger Number

Start and End Time for this Time Step

Actual Force Loads Received


(and/or Thermal Loads)

Start and End Time for this Load Step


– 1:1 correspondence to Time Step

ANSYS Field Solver


convergence and iterations

Check if CFX & ANSYS Field


Solvers are Converged

Check Interface Load


Convergence

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-77 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-78 Inventory #002678
Two-way Coupled FSI
Convergence Advice and Diagnostics Training Manual

• Monitor the loads within each timestep!


– Otherwise you’ll have no idea what’s happening
• Both the CFX and ANSYS output files are generally
needed to diagnose convergence problems or failures
• If one solver fails, the other finds out about it only
through the failed solver’s inability to communicate
• If the run fails:
– Find out which solver failed first
– If ANSYS, were reasonable forces / temperatures / heat fluxes
passed?
– If CFX, were reasonable displacements / temperatures / heat
fluxes received?
– Were the individual field solvers converging?
• Check Mesh Displacement convergence in CFX

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-79 Inventory #002678
Two-way Coupled FSI
Convergence Advice and Diagnostics Training Manual

• In general it’s better to reduce the timesteps rather than


increasing the number of stagger loops or reducing the
Under Relaxation Factor
• Run fluids-only and structure-only simulations first
before running the FSI case

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-80 Inventory #002678
Two-way Coupled FSI
Convergence Difficulties Training Manual

• Expect difficulties when the field(s) receiving the solution


unknown (i.e. DOF) is very sensitive to that value
– CHT: A small change in temperature received will cause a significant
change in heat flux/flow sent
– Structural: A small change in displacement will cause a significant
change in stress/force sent

• Recommendation: Solver whose fields are most sensitive


should serve the solution unknown
– CHT: field equations with largest ρcp or conductivity (i.e. k) should serve
temperature and receive flow/flux
• In most cases, solid thermal conductivity will be larger than fluid, thus Send
Wall Heat Flux from CFX and Receive Temperature from ANSYS
– Structural: no choice to be made here

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-81 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• For strongly coupled FSI convergence


can be improved or divergence avoided
by improving the implicitness between
CFX and ANSYS
• Use when small pressure changes cause
large displacements
• See Appendix C for background

• On the FSI boundary:


– Add a Continuity source using the Fluid
Mass Flux option with a Flux of 0
– Set the Mass Flux Pressure Coefficient:
(Density / Time Step Size) * a[m Pa^-1]
where a is determined from a Static
Structural analysis in Mechanical using
a typical fluid pressure for your case

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-82 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Source coefficients have no effect at convergence, but they do affect


residual normalisation
– True residual values will likely be larger than those reported
– May need to tighten the convergence criteria
– Keep a close eye on other convergence measures – imbalances, monitor
points

• Adding this coefficient results in an effect similar to artificial


compressibility
• Monitor displacements during a time step and adjust a as necessary
– Excessively damped displacements – decrease a
– Bouncy / diverging displacements – increase a

• A similar approach can be used for thermal load transferred between


CFX and ANSYS
– Add boundary Energy Source Coefficients to the CFX equations

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-83 Inventory #002678
Two-way Coupled FSI
Element Integration Accuracy Training Manual

• Consider full and not reduced integration on solids


– Particularly if only a few elements through thickness

1
3

4
2

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-84 Inventory #002678
Two-way Coupled FSI
Help Resources Training Manual

• ANSYS Help Documentation


– Mechanical APDL > Coupled-Field Analysis Guide > Multi-field
Analysis Using Code Coupling

• CFX Help Documentation


– Lots of information throughout the CFX documentation
• Use search, e.g. “Multifield” or “Multi-field” including the quotes
– Some specific sections:
• ANSYS CFX Tutorials >> Oscillating Plate with Two-Way Fluid-Structure Interaction
• ANSYS CFX Reference Guide >> Reference Guide for Mesh Deformation and Fluid-
Structure Interaction
• ANSYS CFX-Solver Modeling Guide >> Coupling CFX to an External Solver: ANSYS
Multi-field Simulations
• ANSYS CFX Solver Manager User’s Guide >> Working with the Solver Manager >>
ANSYS Multi-field Run

• Customer Portal
– Knowledge Base
– Tech Support
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-85 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-86 Inventory #002678
Two-way Coupled FSI
Restarts from a Completed Run Training Manual

• On the CFX side perform a restart as


usual
– Provide a previous res file as the Initial
Values File or Solver Input File
• ANSYS always resumes from a previous
database
– Select the db file from the previous
ANSYS run directory
• The Mechanical Input File must be
specified but is not used in this case
• Enable Process ANSYS Input File:
– APDL commands are created again from
the CFX Solver Input File and a RESUME
command is also inserted

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-87 Inventory #002678
Two-way Coupled FSI
Restarts from a Completed Run Training Manual

• Example of the commands generated by Typical Restart Commands


Generated by CFX
CFX shown
resume,ANSYS,db
/SOLU
• Note that there’s no reference to the MFAN,ON
Mechanical Input File MFCLEAR,MFLC
MFRS,-1,SING
– Any changes made there are not used MFTI,1
MFDT,1,1,1,OFF
• The MF commands are recreated from MFLC,SURF,ANSYS,1, …
MFLC,SURF,CFX,'Wall', …
the CFX Solver Input File MFIT,20,1,20
– The MF commands stored in the db file MFCO,ALL,1e-3
MFRE,ALL,0.75,RELX
are not used MFPS,group1,ANSYS
MFPS,group2,CFX
• If Process ANSYS Input File is disabled, MFSO,group2,group1
the Mechanical Input File is used and is CMWRITE,ANSYS,cm
KBC,1
run “as is” /GST,ON,ON
– The Restart ANSYS Run toggle is SOLVE
SAVE
ignored because CFX doesn’t generate a CMWRITE,ANSYS,cm
RESUME command FINISH
/EXIT
– No MF commands generated
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-88 Inventory #002678
Two-way Coupled FSI
Restarts from a Backup Point Training Manual

• A failed run can be restarted using a


CFX backup file and ANSYS files
produced using the MFRC command
– Must be from a consistent point in the run

• Pick the CFX .def file and use the CFX


backup file as the Initial Values File
• Same MultiField settings as restarting
from a completed run, except the rdb
(restart database) file is used
• Again, the Mechanical Input File is
not used and CFX re-creates the MF
commands
– But you won’t see a RESUME command

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-89 Inventory #002678
Two-way Coupled FSI
Restarts with Physics Changes Training Manual

• Changes to CFX physics can be made as usual


– Create a new .def file and use the previous res file as the Initial
Values File

• Changes to coupling, interface or time settings


specified in CFX can use the previous procedure
– Since CFX re-creates the MF commands each time, these
changes will be passed to ANSYS
– Example: Extending a run by increasing the Coupling Time
Duration

• Changes to ANSYS settings are less straight-forward


since the Mechanical Input File is not used when
restarting
– Where should be changes be made?

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-90 Inventory #002678
Two-way Coupled FSI
Restarts with Physics Changes Training Manual

• First, create the .mf file


– This is what CFX is doing in the
background when Process ANSYS Input
File is checked
– Use Process Input File only option
– Select the Mechanical Input File and the
previous db file
– Provide the CFX def file and Start Run

• Run will complete in a few seconds


• Inside the ANSYS run directory an
ANSYS.mf file is created

…/RunName_002.ansys/ANSYS.mf

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-91 Inventory #002678
Two-way Coupled FSI
Restarts with Physics Changes Training Manual

• Manually edit the ANSYS.mf file using


APDL to make any changes
• Start the run using the edited .mf file as
the Mechanical Input File
• Disable Process ANSYS Input File
• Select the previous db file

• Can also use this approach to change


interface / coupling settings (MF
commands) instead of making a new .def
file in CFX-Pre
• Need to use this approach to restart a
steady-state 2-way FSI case as transient
– Add TIMINT,ON to the .mf file to switch
ANSYS from steady-state to transient

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-92 Inventory #002678
Two-way Coupled FSI
Restarts - General Training Manual

• ANSYS results are appended to the rst file


– Old rst is copied into new run directory
• Can be a very large file!
– Can move the old rst file to prevent it being copied
• A new rst file will be created for the new run

• For all restarts also see CFX documentation:


– ANSYS CFX Solver Manager User’s Guide >> Working with Solver
Manager >> ANSYS Multi-field Run >> Restart Procedure for ANSYS
Multi-field Run

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-93 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-94 Inventory #002678
Two-way Coupled FSI
Multi-Field Commands - Background Training Manual

• MF commands are ANSYS APDL commands that control Multifield


parameters
• They are created by CFX-Pre and appended to the ANSYS input at run-time

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-95 Inventory #002678
Two-way Coupled FSI
Basic MF Commands Training Manual

• MFRS
– Multifield restart time (for restarts only)
– Usually has a value of -1, meaning restart from end of previous solution
• MFAN
– Turns on Multifield solver
• MFTI
– End time for the Multifield analysis
• MFIT
– Controls the number of stagger loops
• MFDT
– Control the transient time step size
• MFOU
– Controls how often results are stored

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-96 Inventory #002678
Two-way Coupled FSI
Basic MF Commands Training Manual

• MFRC
– Control how often restart files are written
• MFCO
– Controls Field Convergence Criteria
• MFRE
– Field Relaxation Factors
• MFLC,SURF,CFX,'Interface','Total Force', ANSYS, 1,FORC,CPP
– Load transfer command
• MFPS and MFSO
– Which field goes first, sequential or parallel

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-97 Inventory #002678
Two-way Coupled FSI
Other Relevant APDL Commands Training Manual

• BCSOPTION,,INCORE
– For the sparse solver tries to retain the entire factorized matrix in memory
– Runs faster, but significantly increases memory usage
• KBC,1
– Sets stepped loads
– CFX will always append this command to the ANSYS input
– If using Prep7 make sure you set it manually
• OUTRES
– Minimum data you can write and still restart
– Note that you may need more data for post-processing (e.g Stress data)

OUTRES, ERASE OUTRES, ERASE


OUTRES, ALL, NONE OR OUTRES, ALL, NONE
OUTRES, NSOL, LAST OUTRES, NSOL, LAST
OUTRES, ESOL, LAST
Structural Solution Only
Structural + Thermal
or Thermal Solution

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-98 Inventory #002678
Two-way Coupled FSI
Other Relevant APDL Commands Training Manual

• NEQIT
– Sets the maximum number of equilibrium iterations
• NCNV
– The ANSYS solver will continue when convergence has not been
achieved

Note that ANSYS runs until convergence or max. number of equilibrium


iterations, but the calculation will stop if max. number of equilibrium iterations is
reached. You can set NCNV so that ANSYS will continue if convergence is not
achieved and this can be combined with NEQIT to limit the number of
equilibrium iterations. However, you need to be careful when doing this – you
must make sure ANSYS is converged by the end of the last stagger loop. If
you are reaching the maximum number of stagger loops then something hasn’t
converged – CFX, interface loads, or ANSYS – and this needs to be corrected.
If one of the field solvers is very poorly converged, it may pass spurious loads
to the other which could cause failure.

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-99 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-100 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Convergence can be improved by coupling the fluid and solid


equations more tightly (more implicit)
– Use fully-coupled monolithic approach as framework for improving the
iteratively implicit solution algorithm

• Fully coupled (single matrix) FSI can be represented as:


Fluid-Solid Coupling

Fluid Solution  AFF AFS   U , p   RF 


A     
Solid Solution
 SF ASS      RS 
Solid-Fluid
Coupling
Coefficient Matrix Change in Solved Residuals
Variable (Velocity,
Pressure, Displacement)
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-101 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• In the iteratively implicit approach coupling occurs indirectly through


the interface:

Fluid Solution Interface and Solid Solution

 AFF AFI 0   U , p   RF 
 A AII    
AIS    I   RI  
 IF
 0 ASI ASS    S   RS 
• The interface displacement contribution to the fluid solution, AFII is
handled explicitly
• The AFII term is placed into the right-hand-side of the fluid solution
• No active coefficients in the AFF coefficient matrix – hence explicit

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-102 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• In the iteratively implicit approach coupling occurs indirectly through


the interface:

Fluid Solution Interface and Solid Solution

 AFF AFI 0   U , p   RF 
 A AII    
AIS    I   RI  
 IF
 0 ASI ASS    S   RS 
• Similarly the fluid force contribution to the solid & interface solution
is handled explicitly
• In both cases an implicit solution is only obtained by iterating

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-103 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Implicitness of the fluid solution can be improved by adding an


approximation of AFII to the AFF term:
– Describes how a change in interface displacement affects fluid solution

Fluid Solution Interface and Solid Solution

 AFF AFI 0   U , p   RF 
 A AII    
AIS    I   RI  
 IF
 0 ASI ASS    S   RS 
• Similarly solid solution implicitness could be improved by adding an
approximation of AIFU and AIFp to the AII term
– Describes how a change in fluid force affects interface displacement
– This is not covered here and is not currently possible in ANSYS
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-104 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Goal: Improve coupling between the interface displacement and fluid


solution by adding an approximation of AFII to the AFF term
– Done by adding a Source Term Coefficient to the interface boundary

Fluid Solution Interface and Solid Solution

 AFF AFI 0   U , p   RF 
 A AII    
AIS    I   RI  
 IF
 0 ASI ASS    S   RS 
• Since the term is multiplied by a change in momentum/pressure, the
contribution will go to zero at convergence
– We are not adding a source term, just a source term coefficient to
improve convergence

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-105 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Approximating AFII :
• AFF contains contributions for the continuity and momentum
equations
– We can add a continuity Source Term Coefficient at a boundary
– Therefore AFI needs to describe how interface displacements affect the
continuity equation (pressure is the solved variable for this equation):
M F Rate of change in M
AFI  Rate of change in
 I interface displacement
• So we can write AFII as:
M F M F  I
AFI  I   I  pF
 I  I pF

AFF contribution

• Now depends on a fluid unknown pF, rather than a solid unknown I
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-106 Inventory #002678
Two-way Coupled FSI
Improving Implicitness Training Manual

• Now estimate the partial derivatives:


• First factor models mass swept due to interface motion:

M F    I  A I  = Fluid Density


  A I  AI = Interface Area
 I  I  t  t t = Coupling Timestep

– Fluid Mass Flux sources are entered per unit area, so only need /t

• Second factor models motion due to pressure changes


 I
 Change in interface displacement due to change in pressure
pF

– Estimate this by applying a typical pressure in simulation and measuring


the boundary displacement
– Quantity will have dimensions of (Length 3 Time2 / Mass), e.g. [m]/[Pa]

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-107 Inventory #002678
Two-way Coupled FSI
Outline Training Manual

• Multiphysics Background and the MFX Solver


• Workflow Overview
• Geometry & Meshing Details
• Mechanical Setup Details
• CFX Setup Details
• Solving Details
• Convergence Advice
• Appendix A: Restarting FSI Simulations
• Appendix B: Multifield APDL Commands
• Appendix C: Improving CFX Implicitness
• Appendix D: Reference Material

ANSYS, Inc. Proprietary July 2009


© 2009 ANSYS, Inc. All rights reserved. 6-108 Inventory #002678
Two-way Coupled FSI
CFX Boundaries Training Manual

• Additional Coupling Sent Data


– Additional loads to send to ANSYS (e.g. particle tracking or EMAG forces)
– Not used in a typically FSI simulation
– Cannot define additional quantities to receive, but additional loads sent
may change, for example, the displacements received
• Data Transfer Type
– Conservative (labelled CPP in the ANSYS “MFLC” command)
• CFX GGI technology. Locally and globally conservative and preserves profiles. Should
be used when sending flows (Heat Flows, Total Force)
– Profile Preserving (labelled NONC in the ANSYS “MFLC” command)
• Used for non-conservative data and fluxes (Displacement, Temperature, Wall Heat
Flux)
– The appropriate option is automatically chosen
• If defining your own data to send need to pick the appropriate option
– Flux versus Flow
• A flux is a flow per unit area
• E.g. should not transfer Wall Heat Flux and use Conservative – Wall Heat Flow should
be used with the Conservative option
ANSYS, Inc. Proprietary July 2009
© 2009 ANSYS, Inc. All rights reserved. 6-109 Inventory #002678

You might also like