37 namespace incompressible
42 atmBoundaryLayerInletVelocityFvPatchVectorField::
43 atmBoundaryLayerInletVelocityFvPatchVectorField
49 fixedValueFvPatchVectorField(p, iF),
61 atmBoundaryLayerInletVelocityFvPatchVectorField::
62 atmBoundaryLayerInletVelocityFvPatchVectorField
70 fixedValueFvPatchVectorField(ptf, p, iF, mapper),
78 zGround_(ptf.zGround_)
82 atmBoundaryLayerInletVelocityFvPatchVectorField::
83 atmBoundaryLayerInletVelocityFvPatchVectorField
90 fixedValueFvPatchVectorField(p, iF),
100 if (
mag(n_) < SMALL ||
mag(z_) < SMALL ||
mag(z0_) < SMALL)
104 "atmBoundaryLayerInletVelocityFvPatchVectorField"
107 "const DimensionedField<vector, volMesh>&, "
111 <<
"magnitude of n, z and z0 vectors must be greater than zero"
118 Ustar_ = kappa_*Uref_/(
log((Href_ + z0_)/
max(z0_ , 0.001)));
124 atmBoundaryLayerInletVelocityFvPatchVectorField::
125 atmBoundaryLayerInletVelocityFvPatchVectorField
131 fixedValueFvPatchVectorField(blpvf, iF),
132 Ustar_(blpvf.Ustar_),
136 kappa_(blpvf.kappa_),
139 zGround_(blpvf.zGround_)
145 void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs()
153 if((coord[i] - zGround_) < Href_)
155 Un[i] = (Ustar_/kappa_)*
log((coord[i] - zGround_ + z0_)/
max(z0_ , 0.001));
165 fixedValueFvPatchVectorField::updateCoeffs();
169 void atmBoundaryLayerInletVelocityFvPatchVectorField::write(
Ostream& os)
const
186 writeEntry(
"value", os);