In this tutorial, you’ll learn how to write a custom boundary condition in OpenFOAM using the codedFixedValue
feature. This step-by-step guide walks you through programming a user-defined inlet condition to model fully developed laminar flow in a rectangular channel—a classic Hagen–Poiseuille flow scenario.
The tutorial compares two inlet conditions:
A constant velocity profile
A parabolic velocity profile (representing fully developed flow)
By the end of this lesson, you’ll be equipped to define and program velocity profiles using C++ directly within OpenFOAM, giving you more control over your simulation setups.
See more
Want to receive push notifications for all major on-site activities?