applyBoundaryLayer |
Source Code: OpenFOAM-dev/applications/utilities/preProcessing/applyBoundaryLayer
Description
Apply a simplified boundary-layer model to the velocity and turbulence fields based on the 1/7th power-law.The uniform boundary-layer thickness is either provided via the -ybl option or calculated as the average of the distance to the wall scaled with the thickness coefficient supplied via the option -Cbl. If both options are provided -ybl is used.
The velocity profile is initialized based on the 1/7th power law turbulent velocity profile:
\begin{equation}
\boldsymbol{u} = \boldsymbol{U} \left( \frac{y_w}{\delta} \right)^{\frac{1}{7}}, \tag{1}
\end{equation}
where \(\boldsymbol{U}\) is the main flow velocity, \(y_w\) is the distance to the wall and \(\delta\) is the boundary-layer thickness.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
// Modify velocity by applying a 1/7th power law boundary-layer // u/U0 = (y/ybl)^(1/7) // assumes U0 is the same as the current cell velocity Info<< "Setting boundary layer velocity" << nl << endl; scalar yblv = ybl.value(); forAll(U, celli) { if (y[celli] <= yblv) { mask[celli] = 1; U[celli] *= ::pow(y[celli]/yblv, (1.0/7.0)); } } mask.correctBoundaryConditions(); Info<< "Writing U\n" << endl; U.write(); // Update/re-write phi #include "createPhi.H" phi.write(); |