SlideShare a Scribd company logo
1 of 33
Download to read offline
2M
OpenFOAM®: open source
finite volume modelling
framework
Alexey Matveichev, O2M Solutions
2M
This offering is not approved or endorsed
by OpenCFD Limited, producer and
distributor of the OpenFOAM software via
www.openfoam.com, and owner of the
OPENFOAM®  and OpenCFD®  trade
marks.
• What is OpenFOAM® and what can it do for me

• Examples

• Droplet formation and detachment

• Electron beam melting

• Vacuum arc remelting

• Solidification of steel ingots

• OpenFOAM®: idiosyncrasies and annoyances
Outline
3
Short OpenFOAM® history (official one)
• 199x – Weller started development of what will become OpenFOAM®

• 2004 – OpenCFD® is created (Weller, Greenshields, Janssens)

• Aug. 2011 – OpenCFD® is bought by SGI

• Sep. 2012 – OpenCFD® is bought by ESI

• 2014 – Weller & Greeshields left ESI to start CFD Direct
4
OpenFOAM® history (Jasak’s apocryphe)
• 199x – development started by Charlie Hill

• 1993 – Jasak and Weller became primary developers

• 2000 – Jasak and Weller created Nabla Ltd, main developer of FOAM

• 2004 – due to internal conflict Nabla Ltd ceased to exist, OpenFOAM®
released under GPL license
5
OpenFOAM®: shipped capabilities
• Mesh generation/manipulation

• Using dictionary for blocks description

• Generation from STLs

• Import

• Solvers

• Incompressible and compressible Navier-Stokes on arbitrary (moving) meshes

• Combustion

• Heat transfer

• Multi-phase flows (VoF)

• Solid body deformation

• Pre-processing

• Turbulence generation

• Field initialisation

• Post-processing

• Probing and sampling

• Calculations on flow field
6
OpenFOAM®: advantages
• It available, it is free, one can freely modify it

• C++: operator overloading and templates

• Run-time selectable behaviour

• Extensibility

• Lots of readily available physicochemical models

• Steep learning curve

• Community
7
OpenFOAM® advantages: operator overloading and templates
8
{
…
// Updating sources with new temperature
greybody_radiation.Correct();
cooling_circuit.Correct();
fvScalarMatrix temperature_equation(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
+ solidification.latent_heat());
…
// Adding energy brought by the load
load.AddTemperatureSource(temperature_equation);
temperature_equation.relax();
temperature_equation.solve();
rhok = 1.0 - alloy.betaT()*(T - alloy.Tref());
}
OpenFOAM® advantages: operator overloading and templates
9
namespace Foam
{
template<class T>
inline void Swap(T& a, T& b)
{
T tmp = a;
a = b;
b = tmp;
}
} // End namespace Foam
• Express type-independent algorithms (typical example - sort)

• Allow compile time specialisation of the function and data structures,
aka safe alternative to preprocessor

• Avoid certain verbosity
OpenFOAM® advantages: run-time selectable behaviour
10
• Simulation behaviour is described in a set of dictionaries with relatively
documented syntax

• Run-time selection mechanism is well-polished, though could be
verbose
solvers
{
p
{
solver GAMG;
tolerance 1e-08;
relTol 0.1;
smoother DICGaussSeidel;
}
U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-08;
relTol 0.01;
}
}
OpenFOAM® advantages: extensibility and freedom
11
• Well defined API and procedure for extension

• User can start from code stream (coded initial/boundary conditions,
coded post-processing)

• And then proceed with implementation of custom library

• If standard solvers/libraries are completely unsuitable for the purpose,
everything could be rewritten from scratch
OpenFOAM® examples: drop formation and detachment
Ti drop(s) (𝜚 = 4200 kg/m3, 𝛾 = 1.2 N/m)
Flow rate ~ 0.1 mm/s
8M cells, decomposed into 84 subdomains, 0.5 T of data
* P. Chapelle, C. Noël, A. Risacher, J. Jourdan, A.
Jardy, J. Jourdan, Optical investigation of the
behavior of the electric arc and the metal transfer
during vacuum remelting of a Ti alloy, Journal of
Materials Processing Technology, vol. 214,
2268-2275 (2014).
12
OpenFOAM® examples: electron beam melting
Problem
Create a 3D solver for modelling of remelting in
electron beam furnace.

Solver should be capable of describing the
following phenomena:

• Electron beam energy deposition.

• Phase change.

• Momentum and heat transfer inside
specimen.

• Turbulence development in the liquid pool.

• Cooling through radiation and water
cooling circuit.

• Evaporation of solutes.
Electron beam
Radiative
heat transfer
Water cooling
13
OpenFOAM® examples: electron beam melting
Specimen geometry
Beam pattern
14
OpenFOAM® examples: electron beam melting
15
OpenFOAM® examples: vacuum arc remelting
Problem
Create a 3D solver for modelling of vacuum arc
remelting process.
Solver should address the following phenomena:
• Ingot growth.
• Electric arc energy deposition.
• Electric current and induced magnetic field,
volumetric forces created by interaction between
them.
• External magnetic field
• Phase change.
• Momentum, heat, and mass transfer inside
ingot.
• Turbulence development in the liquid pool.
• Cooling through radiation and water cooling
circuit.
• Evaporation of solutes.
• Macrosegregation.
DC
Pump
Water in
Water out
Electrode
Solid ingot
Liquid pool
Copper crucible
Arc
Gas
16
OpenFOAM® examples: vacuum arc remelting
Mesh
growth
Crucible
cooling
Crucible
cooling
Load matter
Arc
Radiation
17
OpenFOAM® examples: vacuum arc remelting
18
OpenFOAM® examples: vacuum arc remelting
19
OpenFOAM® examples: vacuum arc remelting
20
OpenSolid: modelling steel ingot solidification
• Static solid

• Binary eutectic alloy

• Constant phase-dependent
thermophysical properties (heat
diffusivity and conductivity)

• Single domain – ingot

• Laminar flow
21
In collaboration with
OpenSolid: SMACS benchmark
• H=6 cm, W/2 = 5 cm

• Alloy: Pb-18%wt-Sn

• fully liquid

• at Tliquidus

• hc = 400 W·m-2·K-1

• Text = 25 °C
Solid, 600 s OpenSolid, 600 s22
OpenSolid: SMACS benchmark, from 20x24 to 1600x1920
23
OpenSolid: A&D octogonal ingot
24
H: 1,96 m

D: 0.65 m
OpenSolid: A&D octogonal ingot, mesh convergence
25
7 mm 5 mm 2 mm 1 mm 0.5 mm
OpenFOAM®: idiosyncrasies and annoyances
• Fragmentation, versioning, packaging

• C++: heavy use of preprocessor and templates

• Weight

• Documentation or lack of

• License

• Community
26
OpenFOAM®: fragmentation, versioning, packaging
OpenFOAM
(Weller & Co)
foam-extend
(Jasak & Co)
OpenFOAM+
(ESI)
Caelus-CML
(Applied CCM)
HelyxOS
(ENGYS)
27
OpenFOAM®: fragmentation, versioning, packaging
OpenFOAM OpenFOAM+ foam-extend
6 v1812 4.0
Ubuntu, Docker, sources
Ubuntu, Docker,
Windows, sources
Ubuntu, Windows,
macOS, Fedora,
sources
28
OpenFOAM®: C++: heavy use of preprocessor and templates
error-example.C: Dans la fonction « int main(int, char**) »:
error-example.C:44:37: error: pas de fonction correspondant à l'appel
« gSum(Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>
>) »
Info<< gSum(fvc::grad(T)) << endl;
In file included from $FOAM_SRC/OpenFOAM/lnInclude/Field.C:87
from $FOAM_SRC/OpenFOAM/lnInclude/Field.H:40
from $FOAM_SRC/OpenFOAM/lnInclude/scalarFiel
from $FOAM_SRC/OpenFOAM/lnInclude/dimensionS
from $FOAM_SRC/OpenFOAM/lnInclude/dimensione
from $FOAM_SRC/OpenFOAM/lnInclude/dimensione
from $FOAM_SRC/OpenFOAM/lnInclude/TimeState.
from $FOAM_SRC/OpenFOAM/lnInclude/Time.H:47,
from $FOAM_SRC/finiteVolume/lnInclude/fvCFD.
from error-example.C:18:
$FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:543:24: note: c
G_UNARY_FUNCTION(Type, gSum, sum, sum)
^
$FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:533:12: note: d
ReturnType gFunc(const UList<Type>& f, const label comm) 
^~~~~
$FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:543:24: note:
G_UNARY_FUNCTION(Type, gSum, sum, sum)
^
[— several pages later —]
$FOAM_SRC/OpenFOAM/lnInclude/FieldFieldFunctions.C:400:12: no
returnType func(const tmp<FieldField<Field, Type>>& tf1) 
^~~~
$FOAM_SRC/OpenFOAM/lnInclude/FieldFieldFunctions.C:559:1: not
G_UNARY_FUNCTION(Type, gSum, sum, sum)
^~~~~~~~~~~~~~~~
error-example.C:44:37: note: types « Foam::FieldField<Field, Type> » et « Foam::Geometri
Info<< gSum(fvc::grad(T)) << endl;
^ 29
OpenFOAM®: weight
$ pwd
/Users/alexey/OpenFOAM/OpenFOAM-6/src
$ ls
Allwmake* finiteVolume/ rigidBodyDynamics/
ODE/ functionObjects/ rigidBodyMeshMotion/
OSspecific/ fvAgglomerationMethods/ sampling/
OpenFOAM/ fvMotionSolver/ semiPermeableBaffle/
Pstream/ fvOptions/ sixDoFRigidBodyMotion/
TurbulenceModels/ genericPatchFields/sixDoFRigidBodyState/
atmosphericModels/ lagrangian/ surfMesh/
combustionModels/ mesh/ thermophysicalModels/
conversion/ meshTools/ topoChangerFvMesh/
dummyThirdParty/ parallel/ transportModels/
dynamicFvMesh/ randomProcesses/ triSurface/
dynamicMesh/ regionCoupled/ waves/
engine/ regionModels/
fileFormats/ renumber/
30
OpenFOAM®: documentation
• OpenFOAMUseGuide-(A4|USletter).pdf in distribution

• Doxygen generated API reference

• Due to fast evolution OpenFOAMProgrammerGuide was removed from
distribution (becomes outdated too fast)

• « Source code is documentation » philosophy

• Dictionary syntax is usually documented in headers of models, often
comments are misleading/outdated
31
• Office 1-008

• OpenFOAM® consulting

• On-demand development

• Transform PDEs into OpenFOAM® C++ code

• Transform process into a set of PDE/ODEs and transform them
OpenFOAM® C++ code
O2M Solutions
32
2M
Thank you!

More Related Content

Similar to Using open source software to manage your janitorial inventory

Multi-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhaseMulti-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhaseDaniel Wheeler
 
Multi-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhaseMulti-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhasePFHub PFHub
 
DSD-INT 2015 - validation of delft3 d fm - van dam
DSD-INT 2015 - validation of delft3 d fm - van damDSD-INT 2015 - validation of delft3 d fm - van dam
DSD-INT 2015 - validation of delft3 d fm - van damDeltares
 
Introdcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwareIntrodcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwarepengding2
 
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)Chemical Engineering Guy
 
Modelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdfModelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdfCarlos Paredes
 
Edward Sung Resume 2016
Edward Sung Resume 2016Edward Sung Resume 2016
Edward Sung Resume 2016Edward Sung
 
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...Obeo
 
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforNumerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforRomain Boman
 
CFD Analysis with AcuSolve and ultraFluidX
CFD Analysis with AcuSolve and ultraFluidXCFD Analysis with AcuSolve and ultraFluidX
CFD Analysis with AcuSolve and ultraFluidXAltair
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulationModelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation智哉 今西
 

Similar to Using open source software to manage your janitorial inventory (20)

Multi-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhaseMulti-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhase
 
Multi-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhaseMulti-phase-field simulations with OpenPhase
Multi-phase-field simulations with OpenPhase
 
DSD-INT 2015 - validation of delft3 d fm - van dam
DSD-INT 2015 - validation of delft3 d fm - van damDSD-INT 2015 - validation of delft3 d fm - van dam
DSD-INT 2015 - validation of delft3 d fm - van dam
 
Introdcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwareIntrodcution to Openfoam--working with free software
Introdcution to Openfoam--working with free software
 
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)
Aspen Plus - Intermediate Process Modeling (3 of 3) (Slideshare)
 
OpenFOAM Training v5-1-en
OpenFOAM Training v5-1-enOpenFOAM Training v5-1-en
OpenFOAM Training v5-1-en
 
java Statements
java Statementsjava Statements
java Statements
 
Engineering Edge LR
Engineering Edge LREngineering Edge LR
Engineering Edge LR
 
Modelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdfModelica-OpenModelica-slides para aprender.pdf
Modelica-OpenModelica-slides para aprender.pdf
 
Edward Sung Resume 2016
Edward Sung Resume 2016Edward Sung Resume 2016
Edward Sung Resume 2016
 
Heap & thread dump
Heap & thread dumpHeap & thread dump
Heap & thread dump
 
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
CapellaDays2022 | ThermoFisher - ESI TNO | A method for quantitative evaluati...
 
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using MetaforNumerical Simulation of Nonlinear Mechanical Problems using Metafor
Numerical Simulation of Nonlinear Mechanical Problems using Metafor
 
CFD Analysis with AcuSolve and ultraFluidX
CFD Analysis with AcuSolve and ultraFluidXCFD Analysis with AcuSolve and ultraFluidX
CFD Analysis with AcuSolve and ultraFluidX
 
ECMFA 2016 slides
ECMFA 2016 slidesECMFA 2016 slides
ECMFA 2016 slides
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Similateur
SimilateurSimilateur
Similateur
 
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulationModelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
 
Shale & tight reservoir simulation cmg
Shale & tight reservoir simulation cmgShale & tight reservoir simulation cmg
Shale & tight reservoir simulation cmg
 
Engineering Edge LR
Engineering Edge LREngineering Edge LR
Engineering Edge LR
 

Recently uploaded

LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Cytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxCytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxVarshiniMK
 
Gas_Laws_powerpoint_notes.ppt for grade 10
Gas_Laws_powerpoint_notes.ppt for grade 10Gas_Laws_powerpoint_notes.ppt for grade 10
Gas_Laws_powerpoint_notes.ppt for grade 10ROLANARIBATO3
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayZachary Labe
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Masticationvidulajaib
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 

Recently uploaded (20)

LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Cytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptxCytokinin, mechanism and its application.pptx
Cytokinin, mechanism and its application.pptx
 
Gas_Laws_powerpoint_notes.ppt for grade 10
Gas_Laws_powerpoint_notes.ppt for grade 10Gas_Laws_powerpoint_notes.ppt for grade 10
Gas_Laws_powerpoint_notes.ppt for grade 10
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Hauz Khas Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work Day
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Mastication
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 

Using open source software to manage your janitorial inventory

  • 1. 2M OpenFOAM®: open source finite volume modelling framework Alexey Matveichev, O2M Solutions
  • 2. 2M This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM®  and OpenCFD®  trade marks.
  • 3. • What is OpenFOAM® and what can it do for me • Examples • Droplet formation and detachment • Electron beam melting • Vacuum arc remelting • Solidification of steel ingots • OpenFOAM®: idiosyncrasies and annoyances Outline 3
  • 4. Short OpenFOAM® history (official one) • 199x – Weller started development of what will become OpenFOAM® • 2004 – OpenCFD® is created (Weller, Greenshields, Janssens) • Aug. 2011 – OpenCFD® is bought by SGI • Sep. 2012 – OpenCFD® is bought by ESI • 2014 – Weller & Greeshields left ESI to start CFD Direct 4
  • 5. OpenFOAM® history (Jasak’s apocryphe) • 199x – development started by Charlie Hill • 1993 – Jasak and Weller became primary developers • 2000 – Jasak and Weller created Nabla Ltd, main developer of FOAM • 2004 – due to internal conflict Nabla Ltd ceased to exist, OpenFOAM® released under GPL license 5
  • 6. OpenFOAM®: shipped capabilities • Mesh generation/manipulation • Using dictionary for blocks description • Generation from STLs • Import • Solvers • Incompressible and compressible Navier-Stokes on arbitrary (moving) meshes • Combustion • Heat transfer • Multi-phase flows (VoF) • Solid body deformation • Pre-processing • Turbulence generation • Field initialisation • Post-processing • Probing and sampling • Calculations on flow field 6
  • 7. OpenFOAM®: advantages • It available, it is free, one can freely modify it • C++: operator overloading and templates • Run-time selectable behaviour • Extensibility • Lots of readily available physicochemical models • Steep learning curve • Community 7
  • 8. OpenFOAM® advantages: operator overloading and templates 8 { … // Updating sources with new temperature greybody_radiation.Correct(); cooling_circuit.Correct(); fvScalarMatrix temperature_equation( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(alphaEff, T) + solidification.latent_heat()); … // Adding energy brought by the load load.AddTemperatureSource(temperature_equation); temperature_equation.relax(); temperature_equation.solve(); rhok = 1.0 - alloy.betaT()*(T - alloy.Tref()); }
  • 9. OpenFOAM® advantages: operator overloading and templates 9 namespace Foam { template<class T> inline void Swap(T& a, T& b) { T tmp = a; a = b; b = tmp; } } // End namespace Foam • Express type-independent algorithms (typical example - sort) • Allow compile time specialisation of the function and data structures, aka safe alternative to preprocessor • Avoid certain verbosity
  • 10. OpenFOAM® advantages: run-time selectable behaviour 10 • Simulation behaviour is described in a set of dictionaries with relatively documented syntax • Run-time selection mechanism is well-polished, though could be verbose solvers { p { solver GAMG; tolerance 1e-08; relTol 0.1; smoother DICGaussSeidel; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-08; relTol 0.01; } }
  • 11. OpenFOAM® advantages: extensibility and freedom 11 • Well defined API and procedure for extension • User can start from code stream (coded initial/boundary conditions, coded post-processing) • And then proceed with implementation of custom library • If standard solvers/libraries are completely unsuitable for the purpose, everything could be rewritten from scratch
  • 12. OpenFOAM® examples: drop formation and detachment Ti drop(s) (𝜚 = 4200 kg/m3, 𝛾 = 1.2 N/m) Flow rate ~ 0.1 mm/s 8M cells, decomposed into 84 subdomains, 0.5 T of data * P. Chapelle, C. Noël, A. Risacher, J. Jourdan, A. Jardy, J. Jourdan, Optical investigation of the behavior of the electric arc and the metal transfer during vacuum remelting of a Ti alloy, Journal of Materials Processing Technology, vol. 214, 2268-2275 (2014). 12
  • 13. OpenFOAM® examples: electron beam melting Problem Create a 3D solver for modelling of remelting in electron beam furnace. Solver should be capable of describing the following phenomena: • Electron beam energy deposition. • Phase change. • Momentum and heat transfer inside specimen. • Turbulence development in the liquid pool. • Cooling through radiation and water cooling circuit. • Evaporation of solutes. Electron beam Radiative heat transfer Water cooling 13
  • 14. OpenFOAM® examples: electron beam melting Specimen geometry Beam pattern 14
  • 15. OpenFOAM® examples: electron beam melting 15
  • 16. OpenFOAM® examples: vacuum arc remelting Problem Create a 3D solver for modelling of vacuum arc remelting process. Solver should address the following phenomena: • Ingot growth. • Electric arc energy deposition. • Electric current and induced magnetic field, volumetric forces created by interaction between them. • External magnetic field • Phase change. • Momentum, heat, and mass transfer inside ingot. • Turbulence development in the liquid pool. • Cooling through radiation and water cooling circuit. • Evaporation of solutes. • Macrosegregation. DC Pump Water in Water out Electrode Solid ingot Liquid pool Copper crucible Arc Gas 16
  • 17. OpenFOAM® examples: vacuum arc remelting Mesh growth Crucible cooling Crucible cooling Load matter Arc Radiation 17
  • 18. OpenFOAM® examples: vacuum arc remelting 18
  • 19. OpenFOAM® examples: vacuum arc remelting 19
  • 20. OpenFOAM® examples: vacuum arc remelting 20
  • 21. OpenSolid: modelling steel ingot solidification • Static solid • Binary eutectic alloy • Constant phase-dependent thermophysical properties (heat diffusivity and conductivity) • Single domain – ingot • Laminar flow 21 In collaboration with
  • 22. OpenSolid: SMACS benchmark • H=6 cm, W/2 = 5 cm • Alloy: Pb-18%wt-Sn • fully liquid • at Tliquidus • hc = 400 W·m-2·K-1 • Text = 25 °C Solid, 600 s OpenSolid, 600 s22
  • 23. OpenSolid: SMACS benchmark, from 20x24 to 1600x1920 23
  • 24. OpenSolid: A&D octogonal ingot 24 H: 1,96 m
 D: 0.65 m
  • 25. OpenSolid: A&D octogonal ingot, mesh convergence 25 7 mm 5 mm 2 mm 1 mm 0.5 mm
  • 26. OpenFOAM®: idiosyncrasies and annoyances • Fragmentation, versioning, packaging • C++: heavy use of preprocessor and templates • Weight • Documentation or lack of • License • Community 26
  • 27. OpenFOAM®: fragmentation, versioning, packaging OpenFOAM (Weller & Co) foam-extend (Jasak & Co) OpenFOAM+ (ESI) Caelus-CML (Applied CCM) HelyxOS (ENGYS) 27
  • 28. OpenFOAM®: fragmentation, versioning, packaging OpenFOAM OpenFOAM+ foam-extend 6 v1812 4.0 Ubuntu, Docker, sources Ubuntu, Docker, Windows, sources Ubuntu, Windows, macOS, Fedora, sources 28
  • 29. OpenFOAM®: C++: heavy use of preprocessor and templates error-example.C: Dans la fonction « int main(int, char**) »: error-example.C:44:37: error: pas de fonction correspondant à l'appel « gSum(Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >) » Info<< gSum(fvc::grad(T)) << endl; In file included from $FOAM_SRC/OpenFOAM/lnInclude/Field.C:87 from $FOAM_SRC/OpenFOAM/lnInclude/Field.H:40 from $FOAM_SRC/OpenFOAM/lnInclude/scalarFiel from $FOAM_SRC/OpenFOAM/lnInclude/dimensionS from $FOAM_SRC/OpenFOAM/lnInclude/dimensione from $FOAM_SRC/OpenFOAM/lnInclude/dimensione from $FOAM_SRC/OpenFOAM/lnInclude/TimeState. from $FOAM_SRC/OpenFOAM/lnInclude/Time.H:47, from $FOAM_SRC/finiteVolume/lnInclude/fvCFD. from error-example.C:18: $FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:543:24: note: c G_UNARY_FUNCTION(Type, gSum, sum, sum) ^ $FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:533:12: note: d ReturnType gFunc(const UList<Type>& f, const label comm) ^~~~~ $FOAM_SRC/OpenFOAM/lnInclude/FieldFunctions.C:543:24: note: G_UNARY_FUNCTION(Type, gSum, sum, sum) ^ [— several pages later —] $FOAM_SRC/OpenFOAM/lnInclude/FieldFieldFunctions.C:400:12: no returnType func(const tmp<FieldField<Field, Type>>& tf1) ^~~~ $FOAM_SRC/OpenFOAM/lnInclude/FieldFieldFunctions.C:559:1: not G_UNARY_FUNCTION(Type, gSum, sum, sum) ^~~~~~~~~~~~~~~~ error-example.C:44:37: note: types « Foam::FieldField<Field, Type> » et « Foam::Geometri Info<< gSum(fvc::grad(T)) << endl; ^ 29
  • 30. OpenFOAM®: weight $ pwd /Users/alexey/OpenFOAM/OpenFOAM-6/src $ ls Allwmake* finiteVolume/ rigidBodyDynamics/ ODE/ functionObjects/ rigidBodyMeshMotion/ OSspecific/ fvAgglomerationMethods/ sampling/ OpenFOAM/ fvMotionSolver/ semiPermeableBaffle/ Pstream/ fvOptions/ sixDoFRigidBodyMotion/ TurbulenceModels/ genericPatchFields/sixDoFRigidBodyState/ atmosphericModels/ lagrangian/ surfMesh/ combustionModels/ mesh/ thermophysicalModels/ conversion/ meshTools/ topoChangerFvMesh/ dummyThirdParty/ parallel/ transportModels/ dynamicFvMesh/ randomProcesses/ triSurface/ dynamicMesh/ regionCoupled/ waves/ engine/ regionModels/ fileFormats/ renumber/ 30
  • 31. OpenFOAM®: documentation • OpenFOAMUseGuide-(A4|USletter).pdf in distribution • Doxygen generated API reference • Due to fast evolution OpenFOAMProgrammerGuide was removed from distribution (becomes outdated too fast) • « Source code is documentation » philosophy • Dictionary syntax is usually documented in headers of models, often comments are misleading/outdated 31
  • 32. • Office 1-008 • OpenFOAM® consulting • On-demand development • Transform PDEs into OpenFOAM® C++ code • Transform process into a set of PDE/ODEs and transform them OpenFOAM® C++ code O2M Solutions 32