How sayin/openfoam-tutorials works
This repository is a sequence of hands-on OpenFOAM C++ programming tutorials, not a single application. The principal workflow is for a learner to select a tutorial, build and run its example in an OpenFOAM case, and observe the demonstrated behavior. The examples progress from basic executable and case I/O through mesh, field, parallel, and extensibility concepts, then custom boundary conditions, runtime post-processing, and a scalar transport solver. Relationships for sampled internals are shown where supported; other tutorial coverage is based on README descriptions, not inspection of unsampled implementation files.
Main entry points: OFtutorial5.C Custom classes · OFtutorial6.C Library-based solver · OFtutorial4.C Parallel solver · prescribedPipeInletFvPatchVectorField.C Pipe inlet condition
Components 19
OpenFOAM foundations
- Hello world
OFtutorial0_helloWorld/OFtutorial0.C - Dictionary I/O
OFtutorial1_inputOutput/OFtutorial1.C - Mesh interface
OFtutorial2_understandingTheMesh/OFtutorial2.C - Field operations
OFtutorial3_basicFieldOperations/OFtutorial3.C
Parallel and extensions
- Parallel solver
OFtutorial4_basicParallelComputing/OFtutorial4.C - Parallel field setup
OFtutorial4_basicParallelComputing/createFields.H - Custom classes
OFtutorial5_customClasses/OFtutorial5.C - Value and mesh class
OFtutorial5_customClasses/customClass.H - Dictionary subclass
OFtutorial5_customClasses/derivedClass.H - Library-based solver
OFtutorial6_customLibraries/OFtutorial6.C - Library solver fields
OFtutorial6_customLibraries/createFields.H - Field calculations
OFtutorial6_customLibraries/customLibrary/customLibrary.H
Runtime customization
- Pipe inlet condition
OFtutorial7_customBC/prescribedPipeInletFvPatchVectorField.C - Boundary condition type
OFtutorial7_customBC/prescribedPipeInletFvPatchVectorField.H - Pipe flow calculator
OFtutorial8_runtimePostprocessingUtility/pipeCalc.C - Calculator interface
OFtutorial8_runtimePostprocessingUtility/pipeCalc.H - Function-object wrapper
OFtutorial8_runtimePostprocessingUtility/pipeCalcFunctionObject.H
Transport solver
- Scalar transport
OFtutorial9_transportEquation/OFtutorial9.C
Other components
- Learner
Connections 18
- Learner → Hello world: runs example
README.md - Learner → Dictionary I/O: runs example
README.md - Learner → Mesh interface: runs example
README.md - Learner → Field operations: runs example
README.md - Learner → Parallel solver: runs example
README.md - Learner → Custom classes: runs example
README.md - Learner → Library-based solver: runs example
README.md - Learner → Pipe inlet condition: runs case
README.md - Learner → Pipe flow calculator: runs case
README.md - Learner → Scalar transport: runs example
README.md - Parallel solver → Parallel field setup: includes setup
OFtutorial4_basicParallelComputing/OFtutorial4.C - Custom classes → Value and mesh class: uses class
OFtutorial5_customClasses/OFtutorial5.C - Custom classes → Dictionary subclass: uses subclass
OFtutorial5_customClasses/OFtutorial5.C - Library-based solver → Library solver fields: includes setup
OFtutorial6_customLibraries/OFtutorial6.C - Library-based solver → Field calculations: calls calculations
OFtutorial6_customLibraries/OFtutorial6.C - Pipe inlet condition → Boundary condition type: implements type
OFtutorial7_customBC/prescribedPipeInletFvPatchVectorField.C - Pipe flow calculator → Calculator interface: implements type
OFtutorial8_runtimePostprocessingUtility/pipeCalc.C - Function-object wrapper → Calculator interface: wraps calculator
OFtutorial8_runtimePostprocessingUtility/pipeCalcFunctionObject.H