Functions
potentialFoam.C File Reference

Potential flow solver. More...

Include dependency graph for potentialFoam.C:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Potential flow solver.

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 velocity potential
-initialiseUBCs : Update the velocity boundaries before solving for Phi

Definition in file potentialFoam.C.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)