Recent changes in the basics of the OpenFOAM solvers


Comment by Henry G. Weller:

The boundary conditions of HbyA are now constrained by the new “constrainHbyA” function which applies the velocity boundary values for patches for which the velocity cannot be modified by assignment and pressure extrapolation is not specified via the new

The member function assignable() is defined in the abstract base class of boundary conditions (fvPatchField):

It is overridden in the basic boundary condition classes (fixedValue, mixed, directionMixed and sliced):

fvc::flux and dotInterpolate

Comment by Henry G. Weller:

surfaceInterpolationScheme: Added dotInterpolate member-function

dotInterpolate interpolates the field and “dots” the resulting face-values with the vector field provided which removes the need to create a temporary field for the interpolate. This reduces the peak storage of OpenFOAM caused by the divergence of the gradient of vector fields, improves memory management and under some conditions decreases run-time.

This development is based on a patch contributed by Paul Edwards, Intel.


In the case of compressible flow, the following relation \eqref{eq:1} holds for the velocity on the face:
\rho \boldsymbol{U}_f \cdot \boldsymbol{S}_f = \left(\frac{\rho \boldsymbol{H}}{A_p}\right)_f \cdot \boldsymbol{S}_f\;-\;\left(\frac{\rho}{A_p}\right)_f (\nabla p)_f \cdot \boldsymbol{S}_f. \tag{1} \label{eq:1}
(\nabla p)_f \cdot \boldsymbol{n}_f = \frac{1}{|\boldsymbol{S}_f|\left(\frac{\rho}{A_p}\right)_f} \left(\left(\frac{\rho \boldsymbol{H}}{A_p}\right)_f \cdot \boldsymbol{S}_f\;-\;\rho \boldsymbol{U}_f \cdot \boldsymbol{S}_f \right). \tag{2} \label{eq:2}
The fixedFluxPressure boundary condition calculates the boundary normal gradient of the pressure field using the Eq. \eqref{eq:2} so that the boundary fluxes satisfy the Eq. \eqref{eq:1}.

Author: fumiya

CFD engineer in Japan

Leave a Reply

Your email address will not be published. Required fields are marked *