potentialFoam.C File Reference

Potential flow solver which solves for the velocity potential, to calculate the flux-field, from which the velocity field is obtained by reconstructing the flux. More...

Go to the source code of this file.

Detailed Description

Potential flow solver which solves for the velocity potential, to calculate the flux-field, from which the velocity field is obtained by reconstructing the flux.

Original source file potentialFoam.C


Solver details The potential flow solution is typically employed to generate initial fields for full Navier-Stokes codes. The flow is evolved using the equation:

\[ \laplacian \Phi = \div(\vec{U}) \]

Where:

\( \Phi \) = Velocity potential [m2/s]
\( \vec{U} \) = Velocity [m/s]

The corresponding pressure field could be calculated from the divergence of the Euler equation:

\[ \laplacian p + \div(\div(\vec{U}\otimes\vec{U})) = 0 \]

but this generates excessive pressure variation in regions of large velocity gradient normal to the flow direction. A better option is to calculate the pressure field corresponding to velocity variation along the stream-lines:

\[ \laplacian p + \div(\vec{F}\cdot\div(\vec{U}\otimes\vec{U})) = 0 \]

where the flow direction tensor \(\vec{F}\) is obtained from

\[ \vec{F} = \hat{\vec{U}}\otimes\hat{\vec{U}} \]


Required fields

U : Velocity [m/s]


Optional fields

p : Kinematic pressure [m2/s2]
Phi : Velocity potential [m2/s]
: Generated from p (if present) or U if not present


Options

-writep : write the Euler pressure
-writephi : Write the final volumetric flux
-writePhi : Write the final velocity potential
-initialiseUBCs : Update the velocity boundaries before solving for Phi

Definition in file potentialFoam.C.