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

PDF
Simulation of Electrochemical Processes in Aluminum Smelting
PPTX
Multi phase mixture media
PDF
OpenStack Tempest and REST API testing
PDF
Thermoplastic composites for Wind Energy
PDF
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
PPTX
The Use of Finite Element Modeling in Thermal Packaging Design
PPTX
Thesis_presentation1
PDF
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Simulation of Electrochemical Processes in Aluminum Smelting
Multi phase mixture media
OpenStack Tempest and REST API testing
Thermoplastic composites for Wind Energy
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
The Use of Finite Element Modeling in Thermal Packaging Design
Thesis_presentation1
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...

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

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

Recently uploaded (20)

PPTX
perinatal infections 2-171220190027.pptx
PPTX
HAEMATOLOGICAL DISEASES lack of red blood cells, which carry oxygen throughou...
PDF
7.Physics_8_WBS_Electricity.pdfXFGXFDHFHG
PPT
Cell Structure Description and Functions
PPTX
2currentelectricity1-201006102815 (1).pptx
PDF
Integrative Oncology: Merging Conventional and Alternative Approaches (www.k...
PPTX
Understanding the Circulatory System……..
PPTX
Platelet disorders - thrombocytopenia.pptx
PPTX
Presentation1 INTRODUCTION TO ENZYMES.pptx
PDF
Chapter 3 - Human Development Poweroint presentation
PDF
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
PPTX
Introduction to Immunology (Unit-1).pptx
PPT
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
PPTX
ELISA(Enzyme linked immunosorbent assay)
PPT
Mutation in dna of bacteria and repairss
PPT
1. INTRODUCTION TO EPIDEMIOLOGY.pptx for community medicine
PPTX
A powerpoint on colorectal cancer with brief background
PPT
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
PDF
5.Physics 8-WBS_Light.pdfFHDGJDJHFGHJHFTY
PPTX
gene cloning powerpoint for general biology 2
perinatal infections 2-171220190027.pptx
HAEMATOLOGICAL DISEASES lack of red blood cells, which carry oxygen throughou...
7.Physics_8_WBS_Electricity.pdfXFGXFDHFHG
Cell Structure Description and Functions
2currentelectricity1-201006102815 (1).pptx
Integrative Oncology: Merging Conventional and Alternative Approaches (www.k...
Understanding the Circulatory System……..
Platelet disorders - thrombocytopenia.pptx
Presentation1 INTRODUCTION TO ENZYMES.pptx
Chapter 3 - Human Development Poweroint presentation
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
Introduction to Immunology (Unit-1).pptx
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
ELISA(Enzyme linked immunosorbent assay)
Mutation in dna of bacteria and repairss
1. INTRODUCTION TO EPIDEMIOLOGY.pptx for community medicine
A powerpoint on colorectal cancer with brief background
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
5.Physics 8-WBS_Light.pdfFHDGJDJHFGHJHFTY
gene cloning powerpoint for general biology 2
Ad

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