12.07.2015 Views

OpenFOAM: Introduction, Capabilities and HPC Needs - LinkSCEEM

OpenFOAM: Introduction, Capabilities and HPC Needs - LinkSCEEM

OpenFOAM: Introduction, Capabilities and HPC Needs - LinkSCEEM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementing Continuum ModelsEquation Mimicking• Natural language of continuum mechanics: partial differential equations• Example: turbulence kinetic energy equation[ ]∂k1 2∂t +∇•(uk)−∇•[(ν +ν t)∇k] = ν t2 (∇u+∇uT ) − ǫ okk o• Objective: represent differential equations in their natural languagesolve(fvm::ddt(k)+ fvm::div(phi, k)- fvm::laplacian(nu() + nut, k)== nut*magSqr(symm(fvc::grad(U)))- fvm::Sp(epsilon/k, k));• Correspondence between the implementation <strong>and</strong> the original equation is clear• Library-based implementation of custom physical models with full freedom insolution algorithms. New: support for multi-equation implicit couplingCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 4


<strong>OpenFOAM</strong>: Executive OverviewPhysical Modelling Capability Highlights• Basic: Laplace, potential flow, passive scalar/vector/tensor transport• Incompressible <strong>and</strong> compressible flow: segregated pressure-based algorithms• Heat transfer: buoyancy-driven flows, conjugate heat transfer• Multiphase: Euler-Euler, VOF free surface capturing <strong>and</strong> surface tracking• RANS for turbulent flows: 2-equation, RSTM; full LES capability• Pre-mixed <strong>and</strong> Diesel combustion, spray <strong>and</strong> in-cylinder flows• Stress analysis, fluid-structure interaction, electromagnetics, MHD, etc.Cyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 5


Examples of SimulationExample of <strong>Capabilities</strong> of <strong>OpenFOAM</strong> Relevant to Your CFD <strong>Needs</strong>• This is only a part of the <strong>OpenFOAM</strong> capabilities!• Chosen for relevance <strong>and</strong> illustration of the range of capabilities rather thanexhaustive illustration of range of capabilities• In some cases, simplified geometry is used due to confidentiality• Regularly, the work resulted in a new solver; in many cases, it is developed as anextension or combination of existing capabilitiesDescription of Simulation <strong>and</strong> Setup• Physics <strong>and</strong> numerical method setup• St<strong>and</strong>ard or customised solver; details of mesh resolution <strong>and</strong> customisationCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 9


Complex Mesh MotionDynamic Mesh Examples of Complex Combination of Motion <strong>and</strong> SlidingCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 15


Geometric Shape OptimisationGeometric Shape Optimisation with Parametrised Geometry• Specify a desired object of optimisation <strong>and</strong> use the parametrisation of geometryto explore the allowed solution space in order to find the minimum of theoptimisation objectiveobjective = f(shape)1. Parametrisation of Geometry• Computational geometry is complex <strong>and</strong> usually available as thecomputational mesh: a large amount of data• Parametrisation tool: RBF mesh morphing, defining deformation at a smallnumber of mesh-independent points in space2. CFD Flow Solver is used to provide the flow solution on the current geometry, inpreparation for objective evaluation3. Evaluation of Objective: usually a derived property of the flow solution4. Optimiser Algorithm: explores the solution space by providing sets of shapecoordinates <strong>and</strong> receiving the value of objective. The search algorithm iterativelylimits the space of solutions in search of a minimum value of objectiveCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 16


Darwin’s Inspirations: Geology –current features are result ofbillions of years of gradual change


<strong>OpenFOAM</strong> Turbo ToolsGeneral Grid Interface• Turbomachinery CFD requires additional features: implemented in library form• General Grid Interface (GGI) <strong>and</strong> its derived forms◦ Cyclic GGI◦ Partial overlap GGI◦ Mixing plane interface (under testing)• Implementation <strong>and</strong> parallelisation is complete: currently running validation casesin collaboration with commercial clients <strong>and</strong> Turbomachinery Working Group• Other turbo-related components in pipeline: harmonic balance solver solver• Library-level implementation allows re-use of GGI beyond turbomachineryCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 18


Lagrangian Phase ModelLagrangian Particle Modelling• Particles are modelled in Lagrangian framework: tracked through fluid domain• Equation of motion for a Lagrangian particle:m pdv pdt= 1 2 ρ|v −v P|(v −v P ) d2 pπ4 C D +m p g ρ l −ρρ l+F ∇pwhere◦ m p is the particle mass◦ v p is the particle velocity◦ v is fluid velocity◦ d p is particle diameter◦ C D is the drag coefficient◦ g is the gravitational acceleration◦ ρ l is the particle (liquid) density◦ ρ is the fluid density◦ F ∇p is the force on the particle due to the fluid pressure gradientCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 21


Lagrangian Phase ModelIntegration of Motion Equation• Motion equation for a particle is an Ordinary Differential Equation (ODE)• During integration, particle traverses a number of cells <strong>and</strong> continuous phaseproperties are updated based on its position• For accurate integration, motion equation is formulated as an ODE <strong>and</strong> solverusing an ODE solverParticle Tracking• Cell-to-face-to-cell tracking: no inverted Jacobians, no lost particles• If more accurate integration is necessary, sub-cycling is usedIntegration stencilUCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 22


Lagrangian Phase ModelSolid Particles with Wall Interaction• Using particle tracking code with physics equations attached to a particles• Particle-to-particle interaction: proximity model with correction• Wall interaction model: bounce with energy lossDiesel Spray Model• Consists of a parcel, injector, spray <strong>and</strong> a set of sub-models• parcel class: a particle represents a population of droplets: mean diameter <strong>and</strong>statistical distribution of particle size <strong>and</strong> other properties• Cloud of parcels = Diesel spray: spray• Example: Junwei Su, Imperial College <strong>and</strong> Xi’an Jiaotong University, ChinaCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 23


Finite Area MethodFinite Area Discretisation• Finite Area Method discretised equations on a curved surface in 3-D• Surface is discretised using polygonal faces. Discretisation takes into accountsurface curvature. A level of smoothness is assumed in calculation of curvatureterms• Surface motion is allowed: decomposed into normal <strong>and</strong> tangential motion• Nomenclature for a surface element P <strong>and</strong> its neighbour Nn fjn PeL enNee’mPid eNS P<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 24Cyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012


Thin Liquid Film ModelModelling Assumptions: 2-D Approximation of a Free Surface Flow• Isothermal incompressible laminar flow• Boundary layer approximation:◦ Tangential derivatives are negligible compared to normal◦ Normal velocity component is negligible compared to tangential◦ Pressure is constant across the film depth• Similitude of the flow variables in the direction normal to the substrate◦ Prescribed cubic velocity profilehS fsp gv gm d,iDependent variables: h <strong>and</strong> ¯vS w¯vσvnv fsv d,i¯v = 1 hh∫0vdhv(η) = v fs •diag(aη +bη 2 +cη 3 )η = n h , 0 ≤ n ≤ hCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 25


Thin Liquid Film ModelValidation: Droplet Spreading Under Surface Tension• Liquid film equations governing the flow; self-similar velocity profile• Droplet spread driven by gravity <strong>and</strong> counteracted by surface tension• Equation set possesses an (axi-symmetric) analytical solution: validation ofimplementation <strong>and</strong> numerics4e-053.5e-053e-05t = 0.000 st = 0.015 sAnalytical solution2.5e-05h, m2e-051.5e-051e-055e-0600 0.0005 0.001 0.0015 0.002r, mImplementation of Liquid Film Model Volume-Surface-Lagrangian Coupling• Full second order in space <strong>and</strong> time on curved moving surfaces• Parallelisation bound to volumetric FVM• Shared matrix <strong>and</strong> discretisation: possibility of close coupling with FVMCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 26


Coupling Wall Film with SprayVolume-Surface-Lagrangian Coupling• Coupling a volumetric flow model with Lagrangian particles for a dispersed phaseto a thin liquid film model on the solid wall Custom solver• In terms of numerics, coupling of volumetric, surface <strong>and</strong> Lagrangian models iseasy to h<strong>and</strong>le: different modelling paradigms• Main coupling challenge is to implement all components side-by-side <strong>and</strong> controltheir interaction: volumetric-to-particle-to-surface data exchange• Close coupling is achieved by sub-cycling or iterations over the system for eachtime-stepCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 27


Close Coupling: Matrix LevelAssembling a Matrix for Conjugate Heat Transfer Problems• <strong>OpenFOAM</strong> supports multi-region simulations, with possibility of separateaddressing <strong>and</strong> physics for each mesh: multiple meshes, with local fields• Some equations present only locally, while others span multiple meshescoupledFvScalarMatrix TEqns(2);TEqns.hook(fvm::ddt(T) + fvm::div(phi, T)- fvm::laplacian(DT, T));TEqns.hook(fvm::ddt(Tsolid) - fvm::laplacian(DTsolid, Tsolid));TEqns.solve();• Coupled solver h<strong>and</strong>les multiple matrices together in internal solver sweeps:arbitrary matrix-to-matrix <strong>and</strong> domain-to-domain couplingCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 28


Linear Algebra <strong>and</strong> Solver SupportExample: Conjugate Heat Transfer• Coupling may be established geometrically: adjacent surface pairs• Each variable is stored only on a mesh where it is active: (U, p, T)• Choice of conjugate variables is completely arbitrary: e.g. catalytic reactions• Coupling is established only per-variable: h<strong>and</strong>ling a general coupled complexphysics problem rather than conjugate heat transfer problem specifically• Allows additional models to be solved on each region without overhead: structuralstress analysis, turbulence or LESCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 29


Fluid-Structure InteractionFluid-Structure Coupling <strong>Capabilities</strong> in <strong>OpenFOAM</strong>• As a Continuum Mechanics solver, <strong>OpenFOAM</strong> can deal with both fluid <strong>and</strong>structure components: easier setup of coupling• (Parallelised) surface coupling tools implemented in library form: facilitate couplingto external solvers without “coupling libraries” using proxy surface mesh• Structural mechanics in <strong>OpenFOAM</strong> targeted to non-linear phenomena: considerbest combination of tools◦ Large deformation formulation in absolute Lagrangian formulation◦ Independent parallelisation in the fluid <strong>and</strong> solid domain◦ Parallelised data transfer in FSI coupling• Dynamic mesh tools <strong>and</strong> boundary h<strong>and</strong>ling used to manipulate the fluid meshCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 30


Deployment <strong>and</strong> SupportDeployment <strong>and</strong> Support• <strong>OpenFOAM</strong> developed mainly on Linux/Unix: Windows <strong>and</strong> Mac OS X ports alsoexist but are not widely used. This needs to be improved: binary distribution forMac OS X <strong>and</strong> native Microsoft Windows port• Data input/output is in file form: there is no global graphical user interface that canbe tailored to sufficient level of usability (work in progress)• No built-in 3-D graphics; 2-D, graphing <strong>and</strong> sampling tools present• External post-processing with integrated readers: paraFoam (open source)Cyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 31


SummaryProject Status Summary• <strong>OpenFOAM</strong> is a free software, available to all at no charge: GNU Public License• Object-oriented approach facilitates model implementation• Equation mimicking opens new grounds in Computational Continuum Mechanics• Extensive capabilities already implemented; open design for easy customisation• Solvers are validated in detail <strong>and</strong> match the efficiency of commercial codes• Open Source model dramatically drops the cost of industrial CFD<strong>OpenFOAM</strong> in Research <strong>and</strong> Industry• Technical development driven by Special Interest Groups & Birds-of-a-FeatherTurbomachinery Ship Hydrodynamics Simulation of EnginesTurbulence Fluid-Structure Interaction Multiphase FlowsAeroacoustics Combustion <strong>and</strong> explosions Solid MechanicsDocumentation High Performance Computing <strong>OpenFOAM</strong> in Teaching• Sixth <strong>OpenFOAM</strong> Workshop: Penn State University 13-16 June 2011http://www.openfoamworkshop.orgCyprus Advanced <strong>HPC</strong> Workshop Winter 2012. Tracking: FH6190763 Feb/2012<strong>OpenFOAM</strong>: <strong>Introduction</strong>, <strong>Capabilities</strong> <strong>and</strong> <strong>HPC</strong> <strong>Needs</strong> – p. 32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!