improvement to numerical schemes in caelus• multi-dimensional interpolation • improved accuracy...

27
Improvement to numerical schemes in Caelus Dr. Darrin Stephens Dr. Chris Sideroff Prof. Aleksandar Jemcov

Upload: others

Post on 10-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Improvement to numerical schemes in CaelusDr. Darrin StephensDr. Chris SideroffProf. Aleksandar Jemcov

Page 2: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Page 3: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Page 4: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

What is Caelus? cont’d

Documentation and validation cases

Easy installation with minimal dependencies (Python and MPI)

Page 5: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Page 6: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Interpolation improvements

• Central-based schemes (linear, limitedLinear) are one dimensional –very susceptible to skewness.

• Include gradient to get better than 1st order accuracy

𝜑𝜑𝑓𝑓 = 𝜑𝜑𝑐𝑐 + 𝜓𝜓(�̅�𝑥𝑓𝑓 − �̅�𝑥𝑐𝑐)𝜕𝜕𝜑𝜑𝜕𝜕�̅�𝑥

δ

Page 7: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Page 8: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Page 9: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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)

Page 10: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

• Advecting step

Interpolation improvement cont’d

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

Page 11: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Interpolation improvement cont’d

Page 12: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Interpolation improvement cont’d

Page 13: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Interpolation improvement cont’d

Page 14: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Interpolation improvement cont’d

Page 15: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

• Motorbike tutorial

Interpolation improvement cont’d

Page 16: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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{

...

Page 17: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Non-orthogonal Correction cont’d

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

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

Page 18: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Non-orthogonal Correction cont’d

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

Caelus 5.04 and above

Page 19: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Non-orthogonal Correction cont’d

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

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

Page 20: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Non-orthogonal Correction cont’d

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

Caelus 5.04 and above

Page 21: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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

Gradient accuracy

LSQ extended stencil

Gauss

LSQ

Nodal-averageGauss

Page 22: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Gradient accuracy cont’d

• Testing of solvers using manufactured solutions highlighted an issue with LSQ gradients at boundaries on unstructured meshes.

Caelus 7.04

Page 23: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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.

Page 24: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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°

Page 25: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Putting it all together cont’d

Page 26: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

Applied CCM CanadaDr Chris Sideroff

Phone: 613 276 7472Email: [email protected]: www.appliedccm.ca

Questions

Applied CCM Pty LtdDr Darrin Stephens

Phone: 03 8376 6962Email: [email protected]: www.appliedccm.com.au

www.caelus-cml.com

Page 27: Improvement to numerical schemes in Caelus• Multi-dimensional interpolation • Improved accuracy on non-”perfect” meshes • Non-orthogonal boundary correction • Swak, Python

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