fluent-fsi 14.5 lect-03 cosimulation setup

45
© 2011 ANSYS, Inc. January 4, 2013 1 Release 14.5 14. 5 Release Solving FSI Applications Using ANSYS Mechanical and ANSYS Fluent Lecture 3 Co-simulation Setup

Upload: enrique-flores

Post on 28-Dec-2015

211 views

Category:

Documents


32 download

TRANSCRIPT

Page 1: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20131 Release 14.5

14. 5 Release

Solving FSI Applications Using ANSYS Mechanical and ANSYS Fluent

Lecture 3Co-simulation Setup

Page 2: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20132 Release 14.5

Outline

Mechanical Setup

This section will cover the Mechanical setup in the context of a System Coupling co-simulation. We’ll discuss Analysis Settings, creating Fluid Solid Interfaces and other topics relevant to System Coupling simulations.

Fluent Setup

The Fluent setup for System Coupling simulations will be covered next. In addition to describing how to label Fluent boundaries to send/receive data from MAPDL, we’ll discuss creating useful monitor data, solution output, solver controls and other general considerations.

System Coupling Setup

Here we’ll cover the settings in the System Coupling GUI, including Coupling Steps & Iterations, creating Data Transfers between participant solvers and solution output controls.

Page 3: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20133 Release 14.5

Mechanical Analysis Settings

Set Number of Steps to 1 and Step End Time to at least the run duration required• Only 1 load step allowed

– Use restarts to make changes

– Use a table to define time varying loads

• Time duration controlled in System Coupling, but cannot be larger than the Step End Time set here

Set Auto Time Stepping = Off, Defined By = Substeps and Number of Substeps = 1• Gives 1 substep per transient time step (Coupling

Time Step)

• Substepping not supported (but will run)

Don’t use Define By = Time• It leads to substepping if not set consistently with

the Coupling Time Step in System Coupling

Page 4: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20134 Release 14.5

Mechanical Analysis Settings

Time Integration• Set to On for transients

– Accounts for transient effects such as structural inertia

• Can set to Off to produce a static solution within the Transient Structural system

– Useful for initialization – see later

– Fluent still needs to be transient

Large Deflection• Should usually be set to On

• When set to Off, the underlying structural mesh will not change, so forces from the deformed Fluent mesh will be applied to the undeformed structural mesh

Page 5: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20135 Release 14.5

Restart Controls• Generate Restart Points = Program Controlled

– Frequency is set in System Coupling

• Retain Files After Full Solve = Yes

– Must keep this set to allow restarts

Damping Controls• The fluid often provides much of the damping

• Here we set controls to model the energy loss in the structure

Mechanical Analysis Settings

Page 6: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20136 Release 14.5

Mechanical Analysis Settings

Output Controls• The rst file can become LARGE in transient

runs, even for small cases

• Can set Stress and Strain to No to reduce output if these quantities are not of interest

• Use Calculate Results At to reduce frequency

– All Time Points, Last Time Point

– Equally Spaced Points

• Set the total number of results sets you want

– Specified Recurrence Rate

• i.e. time step frequency

• These Calculate Results At options are interpreted over the entire run duration

– In a normal Mechanical analysis they are interpreted per Load Step

Page 7: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20137 Release 14.5

Mechanical Fluid Solid Interface

Define non-FSI supports and loads as usual

Insert a Fluid Solid Interface for regions that will receive data from System Coupling• Can define multiple interfaces

Page 8: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20138 Release 14.5

Mechanical Fluid Solid Interface

Split interfaces when faces meet at a small angle• Avoids mapping problems

A surface can only be included in one Fluid Solid Interface• No overlapping interfaces

12

Page 9: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 20139 Release 14.5

Contact Offset

Contact detection can be used to model contact between a Fluid Solid Interface and another face• But this may cause an invalid topology in

Fluent if the mesh is pinched off

Can use a Contact Offset to model contact without reducing the gap to zero• Avoids an invalid mesh topology in Fluent

• But there’s no automated way to block the flow in the small gap in Fluent

Page 10: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201310 Release 14.5

Solution Trackers

Useful to track structural displacements

Highlight Solution Information, select Results Tracker > Deformation from the toolbar• Select a vertex from the geometry

• Must be a single vertex (node) per tracker

Chart is created after the solution is complete

History is also stored in the .nlh file in the Mechanical solution directory

Page 11: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201311 Release 14.5

Close Mechanical or Write an Input File

If solving in WB, close Mechanical• When the Setup cell is updated an input

file is written in the project directory named ds.dat which will be parsed by System Coupling

If solving from the command line outside WB, in Mechanical select the analysis from the Outline tree then Tools > Write Input File• Writes an input file that you will

reference from the command line

Page 12: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201312 Release 14.5

Outline

Mechanical Setup

This section will cover the Mechanical setup in the context of a System Coupling simulation. We’ll discuss Analysis Settings, creating Fluid Solid Interfaces and other topics relevant to System Coupling simulations.

Fluent Setup

The Fluent setup for System Coupling simulations will be covered next. In addition to describing how to label Fluent boundaries to send/receive data from MAPDL, we’ll discuss creating useful monitor data, solution output, solver controls and other general considerations.

System Coupling Setup

Here we’ll cover the settings in the System Coupling GUI, including Coupling Steps & Iterations, creating Data Transfers between participant solvers and solution output controls.

Page 13: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201313 Release 14.5

Setup zones and boundary conditions as usual

Enable Dynamic Mesh

Set the required Dynamic Mesh Zones to use the System Coupling option

• Identifies zones that may receive displacements from System Coupling

• Defaults to Stationary when not connected to System Coupling

• Other zones can use Rigid Body, Deforming, etc

FSI Interface

Page 14: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201314 Release 14.5

FSI Interface – Solution Stabilization

System Coupling Dynamic Mesh Zones have a Solution Stabilization option on the Solver Options tab

• Used to stabilize tightly coupled FSI cases

• Replaces previous rpvarcommands

• Discussed in detail in the convergence chapter

Page 15: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201315 Release 14.5

Fluent Setup Notes

Make sure mesh motion is consistent at adjacent boundaries• E.g. if the edges of an FSI interface are not fixed in Mechanical,

then adjacent boundaries in Fluent should not use Stationary

The forces passed to System Coupling are based on the relative pressure, not the absolute pressure• Use an Operating Pressure of 0 Pa if necessary and apply

atmospheric (or other) pressure to non-FSI boundaries in Mechanical as needed

• Or if an Operating Pressure of 0 Pa is not suitable set an appropriate Reference Pressure…

Page 16: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201316 Release 14.5

Forces sent to System Coupling include pressure and viscous components

See Fluent doc for formulation

• // Theory Guide :: 0 // 22. Reporting Alphanumeric Data // 22.2. Forces on Boundaries // 22.2.1. Computing Forces, Moments, and the Center of Pressure

The pressure component is based on (p - pref), where p is the gauge (solved) pressure and pref is set under Reference Values

To base the forces on absolute pressure pref should be the negative of the Operating Pressure

Forces on FSI Interfaces

Page 17: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201317 Release 14.5

Use constant density (incompressible) fluids with care• Implies an infinite wave speed

• Cannot resolve acoustics / pressure waves (e.g. water hammer)

Using Ideal Gas instead of constant density gases gives a more stable solution• For a given interface displacement, an incompressible fluid

responds with a higher pressure change than a compressible one

• Even if the constant density assumption is valid for the converged solution, it can lead to divergence while iterating

Constant density fluids + transient + closed volume + FSI does not work!• Any change in displacement produces an infinite change in

pressure

Fluid Compressibility

Page 18: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201318 Release 14.5

When resolving pressure waves in liquids use the compressible liquid option in Fluent• May also need to solve the Energy equation for consistency, even

if heat transfer is not of interest

Fluid Compressibility

Page 19: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201319 Release 14.5

When using 2.5D remeshing, note that edge nodes on the ‘source’ face cannot be smoothed or remeshed

MDM with System Coupling

This case works OK with 2.5D remeshing. The non-FSI edge nodes are fixed but this does not cause any problems

This case will not work with 2.5D remeshing. The nodes along the top edge of the fluid zone cannot be smoothed / remeshed, so as the structure moves negative fluid volumes will occur

SOLID

FLUID FLUID

Moving tip of flap is immersed in the fluid

remeshing zone and does not approach other

boundaries; works OK

Moving tip of flap slides along top

boundary, will fail

Page 20: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201320 Release 14.5

Fluent uses a default under relaxation factor of 0.1 for displacements from rigid body motion

• Problematic since you would need many Coupling Iterations to converge the rigid body motion

• Therefore the rigid body displacement URF is set to 1 when the Minimum Coupling Iterations is reached

– Likely to get unstable rigid body motion if Minimum Coupling Iterations is the default of 1

• Will generally need to set Minimum Coupling Iterations > 1 and also increase the rigid body URF in Fluent.

– Note that Solution Stabilization (discussed later) can be used with rigid body displacements in Fluent by setting:(rpsetvar 'dynamesh/sdof-solver-options? #t)

MDM with System Coupling

Page 21: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201321 Release 14.5

Fluent cannot superimpose mesh motion due to a sliding mesh or rigid body motion and any other mesh motion (e.g. from System Coupling) on the same zone

• So you cannot have an FSI interface in a sliding mesh zone

A rotating frame in Fluent should generally be paired with a Rotational Velocity in Mechanical, neither of which actually rotate the mesh• Smoothing or remeshing can be used in Fluent and the FSI

interface behaves just like a stationary frame case

• Rotating the structural model using a Joint or a Remote Displacement results in Fluent receiving the bulk rotational motion – generally not a good idea

MDM with System Coupling

Page 22: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201322 Release 14.5

Always monitor force data on the System Coupling interfaces• Integral of Static Pressure may be

suitable

• Directional forces can be obtained via Custom Field Functions, e.g.:

– Static Pressure * X Face Area

Get Data Every Iteration• Important to check force is

converging within each time step

• Need iteration data to check this

• Also useful for debugging failed runs

Monitor Data

Page 23: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201323 Release 14.5

Monitor data should show convergence within a time step, as shown.

Further discussion in the Convergence chapter.

Monitor Data

1 Time Step

Page 24: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201324 Release 14.5

Keep the Fluent UI open (interactive run) to view monitor plots in Fluent• If you selected the Plot option

• Future versions will allow plotting in System Coupling

Track a monitor text file in System Coupling (beta)• In Fluent write the monitor data to a file

• See System Coupling section for details on tracking the file

Monitor Data

Page 25: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201325 Release 14.5

Cannot directly monitor displacements in Fluent

Can monitor mesh coordinates via a Custom Field Function• Define > Custom Field Functions

– Pick the Mesh Coordinate

• Create a monitor for the Custom Field Function on the deforming surface

– Point locations do not move with the mesh

• Could subtract the initial mesh coordinate to get a displacement

Monitor Data

Page 26: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201326 Release 14.5

Output results data from Fluent as usual• Can use Autosave and perform post-

processing in Fluent

• Use Automatic Export with the CFD-Post Compatible format to perform post-processing in CFD-Post

– Case file should also be written

Restart data is controlled from System Coupling

Results Data

Page 27: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201327 Release 14.5

Transient Formulation• 1st Order Implicit is the default

• 2nd Order Implicit method (not bounded) is available when using Smoothing

• If Remeshing is enabled then only the 1st Order Implicit method is available

• The 1st Order method may require a very small time step for accurate solutions

Non-Iterative Time Advancement (NITA) not supported with System Coupling

Solution Methods

Note the green line, which uses the 1st order transient formulation with 80 time steps per cycle. Refining to 400 time steps per cycle gives significantly different results. The 2nd order scheme gives good results at 80 time steps per cycle and further refinement does not change the results.

Page 28: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201328 Release 14.5

Time Step Size & Number of Time Steps• Not used – controlled by System Coupling

• But Number of Time Steps must be > 0

Max Iterations/Time Step• Means Fluent iterations per Coupling Iteration

• Use fewer iterations than a normal transient case

• No point converging each Coupling Iteration too tightly since the transferred quantities may change in the next Coupling Iteration

• Use monitor points as a guide; do enough iterations to get reasonable values for interface forces, but don’t fully converge the first Coupling Iteration

Time Step and Iterations

Page 29: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201329 Release 14.5

Outline

Mechanical Setup

This section will cover the Mechanical setup in the context of a System Coupling simulation. We’ll discuss Analysis Settings, creating Fluid Solid Interfaces and other topics relevant to System Coupling simulations.

Fluent Setup

The Fluent setup for System Coupling simulations will be covered next. In addition to describing how to label Fluent boundaries to send/receive data from MAPDL, we’ll discuss creating useful monitor data, solution output, solver controls and other general considerations.

System Coupling Setup

Here we’ll cover the settings in the System Coupling GUI, including Coupling Steps & Iterations, creating Data Transfers between participant solvers and solution output controls.

Page 30: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201330 Release 14.5

After completing the Structural and Fluent setup, the state of the System Coupling Setup cell will be • Upstream data is now available for SC Setup

• Refresh the cell and double-click/edit to open the SC GUI

System Coupling Setup

Page 31: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201331 Release 14.5

System Coupling GUI

Solution Information Text Monitors

Chart Monitors

Outline

Details

Page 32: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201332 Release 14.5

Duration Controls• SC controls the time duration for both

participant solvers

Step Controls• Set the Time Step Size (if transient) for

both participant solvers

• Set the Min. and Max. # of Coupling Iterations

– The number of times data is exchanged between the solvers per (time) step

– …

System Coupling Analysis SettingsTransient

Steady State

Page 33: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201333 Release 14.5

• As discussed System Coupling uses iteratively implicit coupling

• The minimum and maximum number of iterations per time step control the number of iterations between the CFD and the structural solutions during each time step

• During each time step there are multiple iterations, which include multiple mesh updates and data transfers between the solvers

• Convergence for the time step is achieved when the rate of change in data transfer quantities becomes acceptably small

• Using one iteration per time step is referred to as explicit coupling, and explicit coupling is generally not accurate for anything other than one-way or "weakly" coupled cases

System Coupling Analysis Settings

Page 34: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201334 Release 14.5

Comparing Explicit and Implicit Coupling

• AGARD 445.6 case

• Standard wing flutter test case

• Zero angle of attack

• Transonic to low supersonic speeds

• Traditional linear flutter analysis tools are not accurate due to non-linear effects

Bending mode

Torsional mode

Page 35: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201335 Release 14.5

Comparing Explicit and Implicit Coupling

• Comparing the predicted flutter frequency versus time step size for different Coupling (Stagger) Iterations

• Explicit coupling (1 Stagger) requires a smaller time step for accurate results

• The physics determines the time step size with implicit coupling

• Large time step with 5 coupling iterations and small time step with 1 coupling iteration both give good results

• Large time step case runs 4 times faster – implicit coupling reduces CPU time

• Explicit coupling is unstable at larger time steps

12

13

14

15

16

1.E-04 1.E-03 1.E-02

Time step size [s]

Flu

tter

fre

qu

ency

[H

z]

5 Stagger

3 Stagger

1 Stagger

-6.E-03

-4.E-03

-2.E-03

0.E+00

2.E-03

4.E-03

6.E-03

0 0.05 0.1 0.15 0.2 0.25

Time [s]

Am

pli

tud

e [

]

dt=0.00025 [s], 1 Stagger

dt=0.005 [s], 5 Stagger

dt=0.005 [s], 1 Stagger

Page 36: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201336 Release 14.5

For steady/static runs you can:• Use 1 step, with many iterations per step

• Use many steps, with 1 iteration per step

Convergence is the same• Many step approach allows you to

interrupt the run

Intermediate restart and results data is different• Restart data can be created every n steps

– 1 step --> no restart data possible

• Doesn’t make sense to use Autosave in Fluent

– Number of Fluent iterations completed will vary per step

• In Mechanical results are output at the end of each step by default

Min. and Max. Coupling Iterations

Page 37: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201337 Release 14.5

For transient runs:• Must make sure convergence is obtained

by the Maximum Iteration number

– Check output files, charts, monitor points

– If not, adjust settings (see Convergence section later)

• Setting Min. and Max. Iterations to 1 produces explicit coupling

– Also use this for 1-way transient cases

Min. and Max. Coupling Iterations

Page 38: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201338 Release 14.5

Under Participants the systems connect to SC are shown

For Fluent all Wall regions are shown• Walls tagged as System Coupling in

Fluent can be used for 2-way data transfer

• Other walls can be used for 1-way data transfer to Mechanical

For Mechanical all Fluid Solid Interfaces are shown

System Coupling Participants

Page 39: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201339 Release 14.5

Use Ctrl key to select a Fluent and Mechanical region pair, then right-click and select Create Data Transfer• Data transfers can be one-way (i.e.

only transfer force or only transfer displacement) or two-way

– Can Suppress or Delete one of the data transfers for one-way

• Can only pick one region from each participant at once

• Can only use each region once

Creating Data Transfers

Page 40: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201340 Release 14.5

Participant, Region & Variable fields are complete when using the Ctrl key method to create Data Transfers

Under Relaxation Factor• Defaults to 1 (no under relaxation)

• For transient cases, relaxation is applied from the 2nd Coupling Iteration onwards for each step

– i.e. in the 1st Coupling Iteration of each step the full loads are always applied

• For steady state cases the URF is always applied against the previous load

– Could be from the previous Step or the previous Coupling Iteration

Data Transfer Details

Page 41: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201341 Release 14.5

… Under Relaxation Factor• Reducing the Under Relaxation Factor can

help convergence/stability

• Use of a small Under Relaxation Factor in a transient case is a red flag

– See the Convergence section

Convergence Target• Default is usually fine

• See documentation for details on how this is evaluated

• Monitor data should be used to confirm convergence

Data Transfer Details

Page 42: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201342 Release 14.5

Data Transfer Details

Ramping• None

– Full data transfer values (but still under relaxed if applicable) are passed to the Target from the first Coupling Iteration

• Linear to Minimum Iteration

– Data transfer values are linear ramped against the final value from the previous Coupling Step

– The full load is applied once the Minimum Iteration (under Analysis Settings) is reached

– The default Minimum Iteration is 1, so ramping has no effect unless you change this to >1

Page 43: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201343 Release 14.5

Co-Simulation Sequence• Who solves first – default is Mechanical

• In most cases it shouldn’t make much difference

Debug Output• Discussed later

Intermediate Restart Data Output• Use this for backup points, not post-

processing data

Execution Control

• Creates Fluent cas & dat files

– In addition to any results requested in Fluent

• Creates restart points in Mechanical

– r00x and rdb files, which are only used for restarts

– no rst data is produced, which is only used for post-processing

Page 44: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201344 Release 14.5

Summary

• Mechanical Analysis Settings are generally the same for all FSI cases since some parameters are not used and a single substepshould be used

• Setting Time Integration to Off is equivalent to a static analysis. This provides an easy way to initialize a transient.

• If you plan to restart, you must ask to Retain Files After Full Solve

• Mechanical results files can become very large. Output only the data you need at a reasonable frequency.

• Create Fluid Solid Interfaces in Mechanical for regions that will receive forces from System Coupling

Page 45: Fluent-FSI 14.5 Lect-03 CoSimulation Setup

© 2011 ANSYS, Inc. January 4, 201345 Release 14.5

Summary

• In Fluent turn on Dynamic Mesh and use the System Coupling option to identify regions that will receive displacements

• Always create monitors in Fluent to track the forces on the System Coupling interfaces, with a frequency of Every Iteration

• Also track displacements if possible, or use Solution Trackers in Mechanical

• Output results files from Fluent at an appropriate frequency containing only the data needed for post-processing

• In System Coupling create Data Transfers by multi-selecting a region from each participant solver

• Select a backup frequency in System Coupling, if needed

• Convergence should be monitored and changes made if needed

• This is discussed in detail later