You are on page 1of 34

Tips and Tricks:

VOFtoDPM – 10th Sep 2019


Dr Paul Hutcheson
Lead Tech Services Engineer, ANSYS UK

1
Agenda

• Introduction to VOFtoDPM
• Length scales / mesh generation
• Making the most of mesh adaption
• Solution stability and convergence
• Reducing run time / timestep
• Q&A (15 mins)
• Summary
• appendix – other simulations

3
Introduction

‐ This webinar is not a training session in how to use VOFtoDPM


‐ It is intended for users who have tried VOFtoDPM, but want some “best practice”
‐ Please review the ANSYS learning hub training material for VOFtoDPM. There are three tutorials
and training material available.
‐ The focus of this webinar is on tips and tricks to make setup easier, to enable accurate and
consistent simulation and in as less time as possible
‐ The webinar will highlight the key points to get across
‐ For more details on all parts of the setup please follow the 2019R1 tutorial “Breakup of a
turbulent liquid jet in crossflow” further to the webinar notes in your own time. Slides and files
can be found via this link:
‐ https://performancemanager8.successfactors.com/sf/idp/SAML2/SSO/POST/company/ansysincP

4
What is VOF-to-DPM? VOF DPM

‐ Common mis-conceptions:
➢ VOF-to-DPM is a breakup model
➢ VOF-to-DPM is itself a new self-contained multiphase model
➢ VOF-to-DPM is based on some physical theory
‐ What is VOF-to-DPM?
➢ A transition tool between existing VOF and DPM models
➢ It is not a “model” as such
➢ Identifies candidate liquid structures suitable for representation as DPM droplets (i.e. based on sphericity and size)
‐ Other requirements for transition:
➢ Liquid structure is isolated from other structures, i.e. it has pure gas in-between.
➢ The maximum volume fraction inside the liquid structure is > 0.9. This can be changed with beta features active.
‐ A key add-on to VOF-to-DPM is dynamic mesh adaption
➢ Used to refine the liquid-gas interface necessary to resolve instabilities leading to droplet formation
➢ VOF-to-DPM will reverse any mesh refinement around a lump when it is transferred to DPM
➢ Reduces simulation cost by not having to design a static mesh with sufficient refinement at every gas-liquid interface!
5
Length scales

‐ Why do we need mesh adaption?


‐ To resolve isolated liquid structures covering a wide size range e.g. 1mm diameter nozzle (the jet)
to O(10) um diameter droplets.
‐ A difference in length scales could be O(100).
‐ How could this be achieved with a fixed mesh approach?
‐ Mesh adaption reduces overall mesh count, and thus simulation effort significantly.
‐ VOFtoDPM routine tells the mesh adaption routine to reverse refinement after droplet is
represented in DPM
‐ After conversion, we can take advantage of secondary breakup models in DPM to model further
reductions in length scale from the primary sizes to the secondary size (e.g. O(100) -> O(10) um).
This is assuming secondary breakup is significant. Guidance on this is given in the tutorial.

6
Length scales – choosing key length scales in the mesh

‐ This is a key step not considered by most users:


‐ Question: What minimum droplet size are you aiming to resolve? Call this D_min. How are you
going to ensure all droplets are adequately resolved on a non-uniform mesh?
‐ Step 1: Choose the initial cell size in the nozzle just fine enough to resolve the nozzle geometry.
For nozzle diameter D, a good choice is between D/15 and D/20
➢ For SRS (scale-resolving simulation) it is recommended to have 40 cells at the very least to capture LES behavior. 60 cells is
recommended, but more can be given if smaller resolved scales are required.
➢ With 15 cells across, 2 levels of adaption would reach 60 cells across after adaption. With 20 cells across, 1 level of adaption
would reach 40, but 2 would reach 80. It depends what resolution you need for the nozzle turbulence.
‐ Step 2: Choose the initial cell size away from the nozzle equal to D_min x 2RL
➢ RL=5 is the maximum recommended refine level for optimal parallel partitioning efficiency. 6 can be used as an absolute
maximum for greater accuracy but at the expensive of parallel partition efficiency, as well as the reduced timestep needed.
‐ Step 3: Set your minimum cell volume equal to (2*D_min)^3
➢ Aim for at least 2 cells across the minimum droplet diameter
➢ The minimum cell volume should be used to prevent over-refinement, not the max refine level
➢ Using the minimum cell volume ensures a consistent mesh size at the gas/liquid interface even on non-uniform meshes.
➢ Max refine level should be kept high (e.g. 6) – to ensure it does not prevent the min cell volume being reached
7
Length scales – choosing a min diameter

‐ How to estimate a minimum diameter?


‐ Experimental measurements can be used, or a suitable droplet size correlation in the literature
for the atomizer configuration of interest
‐ Otherwise, a mesh independence study will be required, reducing mesh size until the droplet
distribution remains unchanged
‐ An argument for the estimating the minimum diameter follows below.

‐ 90% of the liquid volume in a spray contains droplet diameters greater than D_v10%
‐ D_v10% is a common characteristic diameter and a good choice for the minimum diameter
‐ Using Lefebvre*, Table 3.3, D_v10%/SMD > 0.5 for Rosin-Rammler distribution spread parameter
q between 1.2-4.0
‐ Setting min diameter equal to half that of the expected SMD will capture > 90% of spray volume

* “Atomization and Sprays”, A.H.Lefebvre, 1989, published by Taylor and Francis (1st edition)
8
Length scales

‐ Where is D_min entered in FLUENT?


In this example 3 injections have been created, as
per the 2019R1 tutorial.

All droplets smaller than the minimum diameter


(here 0.0001 m) will be put in the “tiny” injection

Tiny injection is the first mechanism, so is called first


Mechanisms called in order
Non-diffused droplets larger than the min diameter
will then be put in the “resolved” injection for
post-processing. If we have chosen an appropriate min
cell volume, we know these droplets were resolved
with at least 2 cells across

Min cell volume has to be set manually - discussed later

9
Length scales – example
Remember: the length scale of a hex
cell is halved after 1 level of adaption

‐ Target D_min = 0.1 mm


0.05 mm cells
0.1 mm cells ‐ 0.1mm/(2^1) = 0.05 mm or 40 cells
across nozzle diameter (bare minimum
for LES behaviour inside nozzle)
‐ 0.8mm/(2^4) = 0.05 mm = D_min/2
‐ So a min cell volume of 0.05e-3 m^3 =
1.25e-13 m^3 should be set to achieve
the above
0.8 mm cells

10
0.8 mm cells
Mesh generation

‐ Mesh adaption is best suited starting from coarse uniform


meshes, and adapting from there to the solution requirements.
‐ However, a uniform mesh is only practical for box geometry
without a nozzle
‐ Include a small cylindrical nozzle, and to both capture the nozzle
curvature properly and maintain a uniform mesh would require
10’s of millions of cells! Not practical.
➢ E.g. nozzle diameter = 1mm, 20 cells across means a cell size of 50 microns –
everywhere!
‐ Two solutions:
1. Refined nozzle mesh connected to a coarser mesh using a non-
conformal mesh interface (top right)
2. Conformal mesh, refined around the nozzle (bottom right)

11
Mesh generation – mesh type

‐ The main focus is to maximise the number of isotropic hexahedra in the breakup zone, to
minimize diffuse of the gas/liquid interface that is crucial to breakup.
‐ Tetrahedra are not recommended for interface capturing, since they result in a high level of
diffusion compared to hexahedra
‐ Polyhedra are less diffuse, good for capturing complex geometry but after adaption can
deteriorate in quality
➢ Refinement will be prevented if orthogonal quality < 0.01, which means refinement may not occur when it is needed. This limit
can be changed by the user in the mesh adaption panel under advanced controls.
‐ Hexahedra maintain good quality after adaption, but an initial hex mesh of high quality is
sometimes difficult or costly to generate for complex geometry
‐ Therefore it is suggested:
‐ Simpler geometry – CutCell (Fluent Meshing or ANSYS Meshing) or Multizone/sweep (ICEMCFD
or ANSYS Meshing)
‐ Complex geometry – Poly-hexcore (Fluent Meshing)
12
Making the most of mesh adaption

‐ “Putting the mesh where you really need it”


‐ A common misconception or setup error is that the user will choose an appropriate minimum cell
volume, but with a max refine level that is too small such that the min cell volume is never
reached.
‐ Therefore, the user aims for a particular min cell volume, but the max refine level is reached in
some places (e.g. areas of initially coarse mesh) preventing further adaption. The target
resolution is never reached, leading to an inconsistent mesh resolution at the liquid/gas interface
and a poor quality solution.

13
Requirements of mesh adaption for spray breakup

1. Minimise diffusion at the liquid-gas interface, by


refining the mesh. A liquid-gas interface is effectively
a discontinuity. The finer the mesh at the interface,
the more accurate the solution. Help Fluent find the
interface by telling it to refine where the volume
fraction curvature is non-zero.
2. Liquid phase turbulence. The upstream nozzle liquid
flow is essential to predicting breakup later. If the
mesh is initially coarse it will need to meet LES
requirements away from the liquid-gas interface. Do
this by refining cells containing liquid.
3. Gas phase shear layer and turbulence. This
requirement is difficult to quantity, but we hope to
have enough resolution at the interface in order to
capture the shear layer on the gas side. Something
to think about.
14
Tips and tricks

‐ From 2019 R3, activate beta features and in adaption


controls “Refine/Coarsen” choose default criteria-
>Multiphase->VOF-to-DPM[Generic] or VOF-to-
DPM[Advanced] to populate adaption panel
VOF-to-DPM[Generic]
‐ “Generic” will refine the liquid/gas interface and
requires a min cell volume
‐ “Advanced” will refine the interface and the liquid core
to different mesh resolutions. Replace:
‐ X_WATER_REFINE_VOLUME – with volume above which
mesh should be refined in the liquid phase
‐ X_AT_VOF_INTERFACE_REFINE_VOLUME – with volume
above which mesh should be refined at the interface
‐ X_WATER_COARSEN_VOLUME – with volume below
which mesh should be coarsened in the liquid phase VOF-to-DPM[Advanced]
15
Tips and tricks – mesh adaption

‐ The initial mesh in the nozzle can be quite irregular,


meaning cell volume limits can be difficult to get right.
‐ This is especially the case if you intend to have a
different mesh resolutions in the liquid core/nozzle Initial mesh
and at the interface
‐ An alternative is to refine the nozzle at time=0
‐ This has the advantage that the cell refine levels will be
more consistent with the cell size across the domain
‐ Use register in refine/coarsen expression with NOT() to
prevent mesh adaption in nozzle
‐ For this example, we want 25 microns or 1.5e-14 m^3
in nozzle. Refine sizes above 1e-13 m^3 will work well.
‐ 12.5 microns or 2e-15 m^3 at the interface. Refine
sizes above 1e-14 m^3 will work well. Initial mesh after two manual refinement steps
16
Making the most of mesh adaption

17
Tips and tricks – mesh adaption

‐ If you have a structured mesh inside the nozzle, can


define a new cell register “ignore_cells” based on
boundary cell distance, from nozzle inlet.
➢ Use Save/Display to get the number of cells right
➢ Use Display Options->Draw Mesh to display mid-plane
➢ Switch to orthographic projection for more accurate view
‐ Example modified coarsen expression below:

‐ Example modified refine expression below:

18
Tips and tricks – mesh adaption

‐ Choosing appropriate cell volumes can be tricky


‐ Red flags to look out for when the adaption settings are
not working as you intend are:
1. Adapted cell count increases then decreases between Big decreases at beginning (not expected)
adaption steps.
‐ This means the refine and coarsen expressions are in
conflict. Adjust cell volume limits.
Small increases at beginning (as expected)
2. Convergence is poor (or not monotonic)
‐ If using global min cell volume (adaption panel), this is a
bottom limit. Set it to your target.
‐ If using cell volume limits in expressions these are
thresholds above which cells are marked for refinement.
➢ A refined hex cell will have volume 8 times smaller after refinement

19
Solution stability and convergence

‐ Including mesh adaption (i.e. rapidly changing cell volumes), along with modelling phases with
very different densities can be challenging for a CFD solver
‐ Exactly how good convergence will be for your case will depend on how suitable the initial, and
adapted mesh is for the physics and gradients being captured.
‐ Starting with too coarse a mesh can hurt convergence since gradients away from the interface
may still be too large to be captured with a coarse mesh.
‐ Poor convergence can mean your mesh adaption settings are not resulting in what you intended.
Check the adapted mesh for the first timesteps to see what it is actually doing.
‐ As always in CFD, robustness and speed are inversely proportional! Choice of p-v scheme plays a
significant role:
Increasing robustness

SIMPLEC PISO Coupled

Increasing speed
20
Solution stability and convergence

‐ Variable time-stepping, CFL=1 good for stability and accuracy


‐ PRESTO! for pressure, and explicit VOF with geo-reconstruction are good
defaults.
‐ Bounded central differencing for momentum (as per SRS best practice)
➢ Weakly bounded central differencing for momentum has been found to significantly improve
convergence. Activate via TUI command:
➢ solve/set/weakly-bounded-central-difference/enable yes
➢ Note: this is not the default because it is not found to be beneficial for general single-phase SRS
simulations
‐ Initialisation. Patch nozzle with liquid volume fraction speeds up solution
progress.
‐ Try different methods for other variables e.g.
➢ Hybrid initialization (can create high speed regions initially requiring smaller timesteps initially)
➢ Standard initialization
▪ Nozzle velocity, duct velocity (in case of crossflow), 0 m/s…
➢ Ideally you want an initialization that keeps the max velocity within reasonable limits at the beginning,
and thus maximises the timestep to keep runtime down. Monitor the max velocity.

21
Solution stability and convergence

‐ Another factor that helps solution stability and convergence is to convert


under-resolved (tiny) and diffuse VOF lumps
‐ This is done by creating two more VOFtoDPM transition mechanisms, that use
their own DPM injections to store converted under-resolved or diffuse lumps
‐ Requires beta features to be activated in order to specify “max volume
fraction anywhere in the lump” for conversion (diffuse VOF lumps)
‐ This workflow is described in the jet in crossflow tutorial
‐ Minimises amount of geo-reconstruction, since there is less interface area

22
Reducing run time

‐ Key point: timestep size the biggest factor affecting total runtime!
‐ Monitor max velocity, min cell volume and timestep. Check they are as expected.
➢ What timestep would you expect given CFL=1, the maximum velocity and the smallest refined cell? ΔT= ΔX_min/V_max
➢ Maximum velocity may not occur in the smallest cell, but above estimate should be the smallest you can expect
‐ What if they are not as expected?
➢ Check adaption cell volume limits, considering initial mesh size.
➢ Sometimes polyhedra can be subdivided by 20 not 8, resulting in smaller volumes than you expect. Be aware polyhedral may be
created in the initial mesh at size transitions.
‐ What if timestep is still too small?
➢ Consider increasing min droplet size to be captured. Larger min droplet size means a larger min cell volume and larger timestep.

23
Reducing run time

‐ Set split factor to a large value


‐ Splitting parcels may help when mass/heat transfer is active, but
keeping single droplet parcels for general cases
➢ Creates a more realistic looking spray for the purposes of animations
➢ Reduces parcel count significantly, reducing DPM tracking effort

24
Reducing run time

‐ It is possible to write a transcript file after


lump conversion, that is suitable to use in a
separate simulation as a DPM file-based
injection
‐ The same transient spray can then be
created, without mesh adaption or VOF,
with much larger timesteps
‐ Huge reduction in computational effort for
consequent simulations
‐ Also opens up possibility of using full set of
combustion models on the spray

VOFtoDPM simulation

25
Reducing run time

26
Reducing run time

5 ms simulated real time


Full VOF-to-DPM calculation:
900,000 cells (incl. dynamic solution-adaptive PUMA-
adaption)
0.5 µs time steps
40 hours on 28 cores
Pure DPM calculation:
600,000 cells (same mesh, no adaption)
25 µs time steps
40 minutes on just 2 cores!

27
Reducing run time

‐ If the original VOFtoDPM simulation


produces a large number of parcels, “Data File
Reduction” can be used to reduce the size of
the injection file to save DPM tracking effort
➢ A large amount of parcels (e.g. 1,000,000+) may be created if secondary
breakup is active
‐ In the tree under Results->Discrete Phase->Histogram read the transition/injection file
‐ Tick “Data File Reduction” (see top right)
‐ Group parcels into “bins” of similar properties.
‐ Set number of bins and click “reduce”
‐ For more info on usage see the Fluent User guide manual

28
A point on accuracy

‐ Start with a large value for D_min, and repeat simulation with smaller D_min
‐ In many cases the nozzle flow is crucial to predicting breakup accurately. Make sure you are
resolving the turbulent eddies of similar size to the droplet sizes expected.
‐ Consider resolving nozzle with more cells across diameter (40,60->>80) to capture smaller scale
eddies, or anything else that improves accuracy of inlet turbulence.

40 cells across nozzle (too few)


29
Questions…

30
ANSYS Knowledge Database

Structures FAQs

Fluids Demos
17,000+ knowledge
Electromagnetics materials Tips & tricks

Installation/licensing Applications

Highlights Created, reviewed & maintained by ANSYS experts.

Over 500 video demos showcasing pre- and post-processing.

Used by over 40,000 people from around the globe every month.
Further VOFtoDPM resources

‐ ANSYS Help manual


‐ Learning Hub (Jet in crossflow and impinging jet tutorials, training material)
‐ Customer Portal (this webinar, to follow)
‐ “Increasing the Predictive Character of Spray Process Simulation by Multiphase Model
Transitioning”, Schütze et al., ILASS Europe 2019
‐ “Best Practices in the numerical modelling of liquid atomization processes”, Sami et al., ILASS
Americas 2019
‐ Quick reference guide (best practice) – coming very soon! (2019)
‐ How-to video on youtube “Efficient Modeling of Spray Breakup using VOF-to-DPM Transition”

32
Summary

‐ We’ve looked at:


➢ Length and time scales / mesh generation
➢ Making the most of mesh adaption
➢ Solution stability and convergence
➢ Reducing run time
‐ The main points to takeaway should be:
➢ Minimum cell volume should be set to capture the minimum droplet size you intend to resolve, while not exceeding a refine level
of 6 from the initial mesh.
➢ Start with a relatively coarse mesh and use mesh adaption to most efficiently meet the needs of the solution
➢ If initial mesh is coarse, if smaller droplet sizes are needed consider refining the initial mesh before refining to a level of 6
➢ From 2019 R3, use default criteria (beta) to pre-populate adaption controls with recommended settings. Estimate cell volume
limits to use in the liquid core, and at the interface.
➢ Convert diffuse or tiny VOF lumps into different DPM injections, to remove diffuse or under-resolved structures from the
calculation
➢ Parallel repartitioning for VOFtoDPM is more efficient done every X adaption steps, rather than every adaption step

33
Thanks for listening!

• Thanks go to major contributors of VOFtoDPM best practice presented here:


• Jochen Schütze (ANSYS Germany, VOFtoDPM developer)
• Pablo Aguado (ANSYS Spain)
• Vivek Kumar (ANSYS India)
• Mohammed Sami (ANSYS US)
• Amine Benhadjali (ANSYS Germany)
Appendix – other simulations

Impinging jets

Turbulent liquid jet in a low speed crossflow


35

You might also like