Cfdem 2017

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Improvement to numerical schemes in Caelus

Dr. Darrin Stephens


Dr. Chris Sideroff
Prof. Aleksandar Jemcov
What is Caelus?
• Caelus was forked from OpenFOAM
• Free and open: www.caelus-cml.com
• Supports multiple platforms (Windows, Linux and Mac)
• Robust compilation (Scons: www.scons.org)
• Easy to install
4.10

• Verified and validated turbulence models (conforms to most commonly


used variants published in open literature)
• Documentation and validation cases
• Improving algorithmic robustness on non-”perfect” meshes
• Multi-dimensional interpolation
5.04

• Improved accuracy on non-”perfect” meshes


• Non-orthogonal boundary correction
• Swak, Python wrapping, etc
• New wall functions, new compressible solvers, more numerical
5.10

improvements
What is Caelus? cont’d
• Restructuring of interpolation schemes
• Overhaul of limiters to ensure TVD compliance
6.04

• Updates to pressure and density-based compressible solvers


• New combustion solvers
• New RAS, DES and VLES turbulence models
6.10

• Performance and stability enhancements to linear solvers


• Addition of cfMesh
• New multiphase solvers and algorithm improvements
7.04

• New gradient discretisation schemes


• Multiple rigid body dynamics (nDoF) and mesh motion capabilities
• Virtual Blade Model for high fidelity rotorcraft modelling
What is Caelus? cont’d

Documentation and validation


cases

Easy installation with minimal


dependencies (Python and MPI)
Numerical Issues

• Robustness and Accuracy


• Sensitivity to mesh quality widely reported for OpenFOAM
• Two main metrics used to quantify “quality”
• Skewness
• Non-orthogonality
• Skewness tends to affect face interpolation, i.e. convective terms
• Non-orthogonality tends affect gradient reconstruction, i.e. diffusion terms
• Gradient accuracy
• Speed
• Time per unit of work (e.g. iteration)
• Improvements to linear solvers
• Time to certain level of accuracy
• Improvements to discretisation
Interpolation improvements

• Central-based schemes (linear, limitedLinear) are one dimensional –


very susceptible to skewness.

• Include gradient to get better than 1st order accuracy


𝜕𝜕𝜕𝜕
𝜑𝜑𝑓𝑓 = 𝜑𝜑𝑐𝑐 + 𝜓𝜓(𝑥𝑥𝑓𝑓̅ − 𝑥𝑥̅𝑐𝑐 )
𝜕𝜕𝑥𝑥̅
Interpolation improvements cont’d

• OpenFOAM
• Does not limit the slope
• Attempts to limit the fluxes
• Introduce commonly used slope limiters that adhere to the TVD
condition

Source: M. Berger, M.J. Aftosmis and S.M. Murman, 43rd AIAA Aerospace Sciences Meeting
Interpolation improvements cont’d

• 9 new interpolation schemes


• Barth-Jespersen: linearUpwindBJ
• Monotonic central: linearUpwindMC
• Differential limiter: linearUpwindDL
• Koren limiter: linearUpwindKoren
• MG: linearUpwindMG
• Minmod: linearUpwindMinmod
• UMIST: linearUpwindUMIST
• VanAlbada: linearUpwindVanAlbada
• VanLeer: linearUpwindVanLeer

• 2 new Multidimensional limited schemes


• linearUwindMDBJ
• linearUpwindMDDL
Interpolation improvement cont’d

• 3 implementations
• Fully implicit
• Deferred correction
• Stabilised
• Deferred correction used for more difficult meshes
• Controlled with dictionary:
div(phi,U) deferredCorrection Gauss dcLinearUpwindBJV grad(U) 0.5
• 0.5 explicit relaxation factor that multiplies the explicit (high order) part
of the discretization (0 – 1)
Interpolation improvement cont’d

• Advecting step

Tobias Holzmann, http://www.holzmann-cfd.de/index.php/en/numerical-schemes


Interpolation improvement cont’d
Interpolation improvement cont’d
Interpolation improvement cont’d
Interpolation improvement cont’d
Interpolation improvement cont’d

• Motorbike tutorial
Non-orthogonal Correction

• OpenFOAM shows 1st order accuracy near boundaries


• Talks from 8th and 9th OFWS (H. Noriega and F. Guibault)
• Only when grid is non-orthogonal near boundaries
• Almost always
• No correction applied for all patch types except processor and coupled
• OpenFOAM 5.x and foam-extend 4.x

...
forAll(corrVecs.boundaryField(), patchi)
{
fvsPatchVectorField& patchCorrVecs =
corrVecs.boundaryField()[patchi];

if (!patchCorrVecs.coupled())
{
patchCorrVecs = vector::zero;
}
else
{
...
Non-orthogonal Correction cont’d

• Method of manufactured solutions – fixed value b.c’s

Caelus 4.10 (OpenFOAM, OpenFOAM+, foam-extend)


Non-orthogonal Correction cont’d

• Method of manufactured solutions – fixed value b.c’s

Caelus 5.04 and above


Non-orthogonal Correction cont’d

• Method of manufactured solutions – fixed gradient b.c’s

Caelus 4.10 (OpenFOAM, OpenFOAM+, foam-extend)


Non-orthogonal Correction cont’d

• Method of manufactured solutions – fixed gradient b.c’s

Caelus 5.04 and above


Gradient accuracy

• Nodal-averaged Gauss gradient scheme.


• Slice through a sphere showing the gradient of volume fraction.

Nodal-average
Gauss
Gauss

LSQ
LSQ
extended stencil
Gradient accuracy cont’d

• Testing of solvers using manufactured solutions highlighted an issue


with LSQ gradients at boundaries on unstructured meshes.

Caelus 7.04
Speed

• Improvements from discretisation already covered


• Improvements to linear solvers
• All solvers reviewed and modified to conform with published algorithms
• Modifications for improved stability and robustness
• Modification to overall control (e.g. min iterations)
• Removal of legacy code and non-standard algorithms
• Addition of BiCGStab from Foundation version with modifications
• New smoothers and pre-conditioners
• Specifically designed for large parallel simulations
• Shown to give 30% improvement in simulation run time over previous Caelus
versions.
• On stiff problems demonstrated superior performance compared with
OpenFOAM.
Putting it all together

• All of the incremental improvements in the numerical schemes in


Caelus have resulted in a very fast, accurate, and robust CFD tool.
• Example from our recent paper “Verification and Validation of the
Caelus library – Incompressible Turbulence Models” presented at
ASME Fluid Division Summer meeting, July 31st – August 3rd.

Mesh stats:
• Max. Aspect ratio – 5478
• Max. Orthogonality angle – 89.98°
• Avg. Orthogonality angle – 62.24°
• Min. Included angle – 0.0076°
Putting it all together cont’d
Questions

Applied CCM Pty Ltd Applied CCM Canada


Dr Darrin Stephens Dr Chris Sideroff

Phone: 03 8376 6962 Phone: 613 276 7472


Email: d.stephens@appliedccm.com.au Email: c.sideroff@appliedccm.ca
Web: www.appliedccm.com.au Web: www.appliedccm.ca

www.caelus-cml.com
About Applied CCM

• Specialise in the application, support and development of OpenFOAM-


based computational mechanics
• Main developers of Caelus
• People
• Darrin Stephens, Chris Sideroff and Aleks Jemcov
• Locations
• Australia, Canada and USA
• Engage with customers as their technology partner

You might also like