Flow between plates with different temperatures (working with external programs)

OpenFOAM 4.x

Case directory



We calculate the flow between two plates with different temperatures. It is assumed that there is no fluid flow into or out of the analysis domain, and during the calculation, the temperature condition is dynamically changed by rewriting the reference file under the folder "comms" using the external program "externalSolver". The gravity acceleration is assumed to be in the negative direction on the Y-axis.

Model geometry Model geometry (Hot side: red, Cold side: blue

The magnitude and direction of the gravity acceleration is specified in the file constant/g as follows.

dimensions      [0 1 -2 0 0 0 0];
value           (0 -9.81 0);

The meshes are as follows, and the number of mesh is 78750.

Mesh Meshes
Zoomed meshes Zoomed meshes

The calculation result is as follows.

Flow velocity on YZ-plane (U)) Flow velocity on YZ-plane (U))
Temperature on YZ-plane (T) Temperature on YZ-plane (T)
Flow velocity on XY-plane (U) Flow velocity on XY-plane (U)
Temperature on XY-plane (T) Temperature on XY-plane (T)


cp -r $FOAM_TUTORIALS/heatTransfer/buoyantSimpleFoam/externalCoupledCavity externalCoupledCavity
cd externalCoupledCavity

createExternalCoupledPatchGeometry T

buoyantSimpleFoam &


We run buoyantSimpleFoam and the external program (shell script) externalSolver at the same time. The externalSolver rewrites files under the folder "comms" in sync with buoyantSimpleFoam's cycles to change the temperature conditions dynamically.

Calculation time

45.94 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz