Programming CFD 2-Day Course Modules
Introduction to Programming
- Getting started with C++: creating a C++ program, compilation, scope, namespace, header files
- OpenFOAM core classes: introduction,
- Tools and practice: finding classes & functions, code readability, programming style, file editor, scripts
- Data construction:
fvMesh, fields, dimensioned types, primitives and
- Data access and processing: introduction, references, data access in loops, function styles, data output
- Data input: reading data, keyword lookup, dictionary hierarchy,
labellookup, command line arguments/options
- Data operations: code verification, compound assignment, reduction operations, case statements, error checking, type conversion, efficiency
- Object orientation: model libraries, class files, derived and base classes, run-time linking, inheritance
- Interfaces: library-application interface, model update and delivery, virtual functions, run-time selection
- Class hierarchy: boundary mesh and fields, patch field types, new boundary condition, private data, constructors
- Generic programming: templates, template boundary condition,
pTraits, lookup with default, parameter checking
- Class functions/data: private functions, “
updateCoeffs(), user interface, documentation
- Design/implementation: requirements and specification, merging code,
wallDistclasses, data access
GeometricField, dimensional units, volume and surface fields, flux, mesh regions,
- Equations and algorithms: solver code, iterative solution, pressure equation, pressure-velocity coupling and PISO,
- Derivatives and algebra: tensors, tensor algebra, interpolation, derivative functions, sources, implicitness
Data Analysis (Post-Processing)
- Data processing: creating a new function object, reading parameters, data access / calculation, customizing output
- Data output: output to file, formatting output, output in parallel, extending applicability, default inputs
Who Should Attend
- CFD users working in R&D, academia and method development
- Existing users developing in-house CFD capability
- Programmers required to code to the OpenFOAM standards
- Users needing to manage robust, maintainable code
- A science/engineering/mathematics background is beneficial
- Familiarity with Linux is an advantage
- Working through the OpenFOAM Linux Guide is strongly encouraged
Excellent course & highly recommendable ! https://t.co/D0IdIKzIls
— Bino Maiheu (@binomaiheu) 8 July 2016
Competence in OpenFOAM Programming
- This course has been created over several months, drawing on 2000 hours OpenFOAM training experience, by…
- Chris Greenshields: OpenFOAM project manager and leading trainer, with 1000+ hours of training OpenFOAM programming.
- Henry Weller: OpenFOAM creator and architect, who pioneered C++ for CFD and created the coding practice used in OpenFOAM.
- It enables competency: the confidence to program OpenFOAM to a defined standard.
- Confidence = not freezing at the keyboard.
- Repeatedly = delivering good software, time and again
- Defined standard = understand what good software is and delivering it in a timely manner.
- It addresses the complexity of programming CFD through modular curriculum.
- We have accelerated the learning process by making OpenFOAM easier to use with scripts to generate…
- Template application code and compilation files, that provides a convenient way to set up and start a new application.
- Template boundary condition code, that sets a standard programming methodology for boundary condition coding.
- We add new functions to automate tasks and reduce unnecessary coding, e.g. …
- CFD Direct is able to do this because it includes the architect/co-founders of OpenFOAM.
Learning OpenFOAM Programming through Experience
- The training involves learning through experience.
- We use customization tasks commonly needed across all a range of scientific disciplines and industries.
- … e.g. utility programming, model development, boundary condition, solver development and customized post-processing.
- Programs are written in small, digestible steps with periods of reflection to reinforce new concepts.
- This reflects real programming practice, where trouble-free, complex programs cannot usually be set up in “one go”.