Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy...

Post on 10-Aug-2020

0 views 0 download

transcript

Improvement to numerical schemes in CaelusDr. Darrin StephensDr. Chris SideroffProf. 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• 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• Improved accuracy on non-”perfect” meshes

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

improvements

4.10

5.04

5.10

What is Caelus? cont’d

• Restructuring of interpolation schemes• Overhaul of limiters to ensure TVD compliance• Updates to pressure and density-based compressible solvers• New combustion solvers• New RAS, DES and VLES turbulence models• Performance and stability enhancements to linear solvers• Addition of cfMesh• New multiphase solvers and algorithm improvements• New gradient discretisation schemes• Multiple rigid body dynamics (nDoF) and mesh motion capabilities• Virtual Blade Model for high fidelity rotorcraft modelling

6.04

6.10

7.04

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)

• Advecting step

Interpolation improvement cont’d

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

• Motorbike tutorial

Interpolation improvement cont’d

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

• Nodal-averaged Gauss gradient scheme.• Slice through a sphere showing the gradient of volume fraction.

Gradient accuracy

LSQ extended stencil

Gauss

LSQ

Nodal-averageGauss

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

Applied CCM CanadaDr Chris Sideroff

Phone: 613 276 7472Email: c.sideroff@appliedccm.caWeb: www.appliedccm.ca

Questions

Applied CCM Pty LtdDr Darrin Stephens

Phone: 03 8376 6962Email: d.stephens@appliedccm.com.auWeb: www.appliedccm.com.au

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