From e6a41726e2a6b6d498179ceb98fc9c57c2861607 Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Thu, 19 Jul 2012 17:16:03 +0100
Subject: [PATCH] ENH: Updates to BC documentation

---
 .../SRFFreestreamVelocityFvPatchVectorField.H |  7 +-
 .../SRFVelocityFvPatchVectorField.H           | 22 +++++--
 .../basic/mixed/mixedFvPatchField.H           | 17 +++--
 .../zeroGradient/zeroGradientFvPatchField.H   |  4 +-
 .../derived/fan/fanFvPatchField.H             |  2 +-
 .../fanPressureFvPatchScalarField.H           | 33 ++++++----
 ...ppedFixedPushedInternalValueFvPatchField.H |  4 +-
 ...mappedVelocityFluxFixedValueFvPatchField.H |  2 +-
 ...phaseFixedFluxPressureFvPatchScalarField.H |  2 +-
 ...urfaceNormalFixedValueFvPatchVectorField.H |  2 +-
 ...ranslatingWallVelocityFvPatchVectorField.H |  2 +-
 .../gradientEnergyFvPatchScalarField.C        |  6 +-
 .../gradientEnergyFvPatchScalarField.H        | 18 ++++-
 .../alphaContactAngleFvPatchScalarField.H     | 18 +++--
 ...convectiveHeatTransferFvPatchScalarField.H |  2 +-
 ...ayatillekeWallFunctionFvPatchScalarField.H |  2 +-
 .../mutURoughWallFunctionFvPatchScalarField.H |  4 +-
 ...tUSpaldingWallFunctionFvPatchScalarField.H | 15 ++++-
 .../mutkRoughWallFunctionFvPatchScalarField.H |  4 +-
 .../fixedShearStressFvPatchVectorField.H      |  3 +-
 .../porousBafflePressureFvPatchField.H        | 65 +++++++++++++++----
 ...ndaryLayerInletEpsilonFvPatchScalarField.H |  6 +-
 ...entHeatFluxTemperatureFvPatchScalarField.H |  2 +-
 .../nutURoughWallFunctionFvPatchScalarField.H |  2 +-
 ...tUSpaldingWallFunctionFvPatchScalarField.H | 15 ++++-
 .../nutkRoughWallFunctionFvPatchScalarField.H |  2 +-
 26 files changed, 189 insertions(+), 72 deletions(-)

diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H
index fe50e35cac8..58c7ab9ce08 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.H
@@ -48,12 +48,17 @@ Description
 
     \heading Patch usage
 
+    \table
+        Property     | Description             | Required    | Default value
+        UInf         | free stream velocity    | yes         |
+    \endtable
+
     Example of the boundary condition specification:
     \verbatim
     myPatch
     {
         type            SRFFreestreamVelocity;
-        UInf            (0 0 0);            // free stream velocity
+        UInf            (0 0 0);
         value           uniform (0 0 0);    // optional value entry
     }
     \endverbatim
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H
index 71bb989bcd0..32aaa246a76 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H
@@ -41,24 +41,38 @@ Description
         - relative = yes: inlet velocity applied 'as is':
 
         \f[
-            Up = U_in
+            U_p = U_{in}
         \f]
 
         - relative = no : SRF velocity is subtracted from the inlet velocity:
 
         \f[
-            Up = U_in - U_srf
+            U_p = U_{in} - U_{p,srf}
         \f]
 
+    where
+    \vartable
+        U_p     = patch velocity [m/s]
+        U_{in}  = user-specified inlet velocity
+        U_{p,srf} = SRF velocity
+    \endvartable
+
+
     \heading Patch usage
 
+    \table
+        Property     | Description             | Required    | Default value
+        relative     | relative motion to the SRF? | yes     |
+        inletValue   | inlet velocity          | yes         |
+    \endtable
+
     Example of the boundary condition specification:
     \verbatim
     myPatch
     {
         type            SRFVelocity;
-        relative        yes;                // relative motion to the SRF?
-        inletValue      uniform (0 0 0);    // inlet velocity
+        relative        yes;
+        inletValue      uniform (0 0 0);
         value           uniform (0 0 0);    // initial value
     }
     \endverbatim
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
index 3b1bc57c27a..7c475c1111e 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
@@ -35,19 +35,28 @@ Description
     The respective contributions from each is determined by a weight field:
 
         \f[
-            x_p = w*A + (1-w)*(x_c + B/\Delta)
+            x_p = w x_p + (1-w) \left(x_c + \frac{\nabla_\perp x}{\Delta}\right)
         \f]
 
     where
     \vartable
         x_p   | patch values
         x_c   | patch internal cell values
-        w     | weight field, \c valueFraction_
-        A     | fixed value, \c refValue_
-        B     | patch normal gradient, \c refGrad_
+        w     | weight field
         \Delta| inverse distance from face centre to internal cell centre
+        w     | weighting (0-1)
     \endvartable
 
+
+    \heading Patch usage
+
+    \table
+        Property     | Description             | Required    | Default value
+        valueFraction | weight field           | yes         |
+        refValue     | fixed value             | yes         |
+        refGrad      | patch normal gradient   | yes         |
+    \endtable
+
     \note
     This condition is not usually applied directly; instead, use a derived
     mixed condition such as \c inletOutlet
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
index 99038a12402..cb238253f1d 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
@@ -28,7 +28,7 @@ Group
     grpGenericBoundaryConditions
 
 Description
-    This boundary condition appies a zero-gradient condition from the patch
+    This boundary condition applies a zero-gradient condition from the patch
     internal field onto the patch faces.
 
     \heading Patch usage
@@ -57,7 +57,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                     Class zeroGradientFvPatch Declaration
+                 Class zeroGradientFvPatchField Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
index be28d244488..9306796d799 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
@@ -28,7 +28,7 @@ Group
     grpCoupledBoundaryConditions
 
 Description
-    This boundary condition supplies a jump condition, using the \c cyclic
+    This boundary condition provides a jump condition, using the \c cyclic
     condition as a base.
 
     The jump is specified as a \c DataEntry type, to enable the use of, e.g.
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H
index a8124bb38b5..022fb48ccb7 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.H
@@ -31,31 +31,36 @@ Description
     This boundary condition can be applied to assign either a pressure inlet
     or outlet total pressure condition for a fan.
 
-    User specifies:
-    \li pressure drop vs volumetric flow rate table (fan curve) file name;
-    \li direction of normal flow through the fan, in or out;
-    \li total pressure of the environment.
+    \heading Patch usage
+
+    \table
+        Property     | Description             | Required    | Default value
+        fileName     | fan curve file name     | yes         |
+        outOfBounds  | out of bounds handling  | yes         |
+        direction    | direction of flow through fan [in/out] | yes |
+        p0           | environmental total pressure | yes    |
+    \endtable
 
     Example of the boundary condition specification:
     \verbatim
     inlet
     {
         type            fanPressure;
-        fileName        "fanCurve"; // Fan curve file name
-        outOfBounds     clamp;      // (error|warn|clamp|repeat)
-        direction       in;         // Direction of flow through fan
-        p0              uniform 0;  // Environmental total pressure
-        value           uniform 0;  // Initial pressure
+        fileName        "fanCurve";
+        outOfBounds     clamp;
+        direction       in;
+        p0              uniform 0;
+        value           uniform 0;
     }
 
     outlet
     {
         type            fanPressure;
-        fileName        "fanCurve"; // Fan curve file name
-        outOfBounds     clamp;      // (error|warn|clamp|repeat)
-        direction       out;        // Direction of flow through fan
-        p0              uniform 0;  // Environmental total pressure
-        value           uniform 0;  // Initial pressure
+        fileName        "fanCurve";
+        outOfBounds     clamp;
+        direction       out;
+        p0              uniform 0;
+        value           uniform 0;
     }
     \endverbatim
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
index 18884da980f..04ec0c4ef7e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
@@ -44,7 +44,7 @@ Description
     \verbatim
     myPatch
     {
-        type            mappedFixedInternalValue;
+        type            mappedFixedPushedInternalValue;
         fieldName       T;
         setAverage      no;
         average         0;
@@ -78,7 +78,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-      Class mappedFixedPushedInternalValueFvPatchField Declaration
+        Class mappedFixedPushedInternalValueFvPatchField Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H
index a160e2c292b..8dac3f6f56d 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.H
@@ -42,7 +42,7 @@ Description
     \verbatim
     myPatch
     {
-        type            mappedFixedInternalValue;
+        type            mappedVelocityFlux;
         phi             phi;
         value           uniform 0;  // place holder
     }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H
index f71feaa1e34..c7f13d7506a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H
@@ -61,7 +61,7 @@ Description
     \verbatim
     myPatch
     {
-        type            externalWallHeatFluxTemperature;
+        type            multiphaseFixedFluxPressure;
         phiHbyA         phiHbyA;
         phi             phi;
         rho             rho;
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
index 5906f790a65..2b6242a42d3 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
@@ -42,7 +42,7 @@ Description
     \verbatim
     myPatch
     {
-        type            inletOutlet;
+        type            surfaceNormalFixedValue;
         refValue        -10;           // 10 INTO the domain
     }
     \endverbatim
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
index d32a1ba4608..c6e9c70b88b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
@@ -42,7 +42,7 @@ Description
     \verbatim
     myPatch
     {
-        type            rotatingWallVelocity;
+        type            translatingWallVelocity;
         U               (100 0 0);
     }
     \endverbatim
diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C
index 42ed096ea60..5f0e009d13c 100644
--- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C
+++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C
@@ -97,10 +97,8 @@ void Foam::gradientEnergyFvPatchScalarField::updateCoeffs()
         return;
     }
 
-    const basicThermo& thermo = db().lookupObject<basicThermo>
-    (
-        "thermophysicalProperties"
-    );
+    const basicThermo& thermo =
+        db().lookupObject<basicThermo>("thermophysicalProperties");
 
     const label patchi = patch().index();
 
diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H
index 2ee94c08cc6..a510d3ac82d 100644
--- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H
+++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H
@@ -28,9 +28,25 @@ Group
     grpThermoBoundaryConditions
 
 Description
-    This boundary condition provides a gradient condition for internal energy
+    This boundary condition provides a gradient condition for internal energy,
+    where the gradient is calculated using:
+
+        \f[
+            \nabla(e_p) = \nabla_\perp C_p(p, T) + \frac{e_p - e_c}{\Delta}
+        \f]
+
+    where
+    \vartable
+        e_p     | energy at patch faces [J]
+        e_c     | energy at patch internal cells [J]
+        p       | pressure [bar]
+        T       | temperature [K]
+        C_p     | specific heat [J/kg/K]
+        \Delta  | distance between patch face and internal cell centres [m]
+    \endvartable
 
     \heading Patch usage
+
     Example of the boundary condition specification:
     \verbatim
     myPatch
diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
index de6086c906f..6d1f65fe73f 100644
--- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ b/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,9 @@ License
 Class
     Foam::alphaContactAngleFvPatchScalarField
 
+Group
+    grpWallBoundaryConditions grpGenericBoundaryConditions
+
 Description
     Abstract base class for alphaContactAngle boundary conditions.
 
@@ -47,11 +50,12 @@ Description
     on p_rgh must set to guarantee that the flux is corrected to be zero at the
     wall e.g.
 
-        walls
-        {
-            type            fixedFluxPressure;
-            adjoint         no;
-        }
+    \verbatim
+    myPatch
+    {
+        type            alphaContactAngle;
+    }
+    \endverbatim
 
     If "limit zeroGradient;" is used the pressure BCs can be left as before.
 
@@ -72,7 +76,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                   Class alphaContactAngleFvPatch Declaration
+             Class alphaContactAngleFvPatchScalarField Declaration
 \*---------------------------------------------------------------------------*/
 
 class alphaContactAngleFvPatchScalarField
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H
index aaaee1c6504..2bc06bb0e47 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.H
@@ -61,7 +61,7 @@ Description
     \verbatim
     myPatch
     {
-        type            turbulentInlet;
+        type            convectiveHeatTransfer;
         L               0.1;
     }
     \endverbatim
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H
index 09981930462..60271aae48a 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.H
@@ -45,7 +45,7 @@ Description
     \verbatim
     myPatch
     {
-        type            alphaSgsJayatillekeWallFunction;
+        type            alphatJayatillekeWallFunction;
         Prt             0.85;
         kappa           0.41;
         E               9.8;
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H
index ee89a45f6cb..479cb18b400 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H
@@ -37,14 +37,14 @@ Description
         Property     | Description             | Required    | Default value
         roughnessHeight | roughness height     | yes         |
         roughnessConstant | roughness constanr | yes         |
-        roughnessFactor | scaling factor       | 
+        roughnessFactor | scaling factor       | yes         |
     \endtable
 
     Example of the boundary condition specification:
     \verbatim
     myPatch
     {
-        type            nutURoughWallFunction;
+        type            mutURoughWallFunction;
         roughnessHeight 1e-5;
         roughnessConstant 0.5;
         roughnessFactor 1;
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H
index 4eeefb74ccf..2501fa5b719 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H
@@ -29,9 +29,22 @@ Group
 
 Description
     This boundary condition provides a turbulent viscosity condition when
-    using wall functions for rough walls, based on velocity,  using  Spaldings
+    using wall functions for rough walls, based on velocity,  using  Spalding's
     law to give a continuous nut profile to the wall (y+ = 0)
 
+        \f[
+            y^+ = u^+ + \frac{1}{E} \left[exp(\kappa u^+) - 1 - \kappa u^+\,
+                - 0.5 (\kappa u^+)^2 - \frac{1}{6} (\kappa u^+)^3\right]
+        \f]
+
+    where
+    \vartable
+        y^+     | non-dimensional position
+        u^+     | non-dimensional velocity
+        \kappa  | Von Karman constant
+    \endvartable
+
+
     \heading Patch usage
 
     Example of the boundary condition specification:
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H
index 8daa978a221..fdf5a0a7d63 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ Description
     \verbatim
     myPatch
     {
-        type            nutkAtmRoughWallFunction;
+        type            mutkRoughWallFunction;
         Ks              uniform 0;
         Cs              uniform 0.5;
     }
diff --git a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H b/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H
index e8d9cc03768..d1ad27977f3 100644
--- a/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H
+++ b/src/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H
@@ -25,7 +25,8 @@ License
 Class
     Foam::fixedShearStressFvPatchVectorField
 
-Group grpWallBoundaryConditions
+Group
+    grpWallBoundaryConditions
 
 Description
     Set a constant shear stress as tau0 = -nuEff dU/dn.
diff --git a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
index 8e0dccd0cc8..b45b7a330c2 100644
--- a/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
+++ b/src/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,18 +24,57 @@ License
 Class
     Foam::porousBafflePressureFvPatchField
 
-Description
-    Foam::porousBafflePressureFvPatchField
-    the porous baffle operates on a cyclic patch and introduce a jump on the p
-    field as follow:
-
-    deltaP = -(I*mu*U + 0.5*D*rho*magSqr(U)*L)
+Group
+    grpCoupledBoundaryConditions
 
-    where:
-
-    I is the inertial coefficient
-    D is the darcy coeafficient
-    L is the porous media lenght in the flow direction
+Description
+    This boundary condition provides a jump condition, using the \cyclic
+    condition as a base.
+
+    The porous baffle introduces a pressure jump defined by:
+
+        \f[
+            \Delta p = -(I \mu U + 0.5 D \rho |U|^2 L)
+        \f]
+
+    where
+
+    \vartable
+        p      | pressure [Pa]
+        \rho   | density [kg/m3]
+        \mu    | viscosity [Pa s]
+        I      | inertial coefficient
+        D      | Darcy coefficient
+        L      | porous media length in the flow direction
+    \endvartable
+
+
+    \heading Patch usage
+
+    \table
+        Property     | Description             | Required    | Default value
+        patchType    | underlying patch type should be \c cyclic| yes |
+        D            | Darcy coefficient       | yes         |
+        I            | inertial coefficient    | yes         |
+        L            | porous media length in the flow direction | yes |
+    \endtable
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            porousBafflePressure;
+        patchType       cyclic;
+        jump            uniform 0;
+        D               1000000;
+        I               0.001;
+        L               0.1;
+        value           uniform 0;
+    }
+    \endverbatim
+
+    \note
+     The underlying \c patchType should be set to \c cyclic
 
 SourceFiles
     porousBafflePressureFvPatchField.C
@@ -63,7 +102,7 @@ class porousBafflePressureFvPatchField
 {
     // Private data
 
-        //- Darcy pressure lost coefficient
+        //- Darcy pressure loss coefficient
         scalar D_;
 
         //- Inertia pressure lost coefficient
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
index 10e6691933f..f52dbac1736 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H
@@ -34,7 +34,7 @@ Description
     \c ABLInletVelocity inlet velocity boundary condition.
 
         \f[
-            \epsilon = \frac{(U^*)^3}{(K(z - z_g + z_0))}
+            \epsilon = \frac{(U^*)^3}{K(z - z_g + z_0)}
         \f]
 
     where
@@ -49,7 +49,7 @@ Description
     and:
 
         \f[
-            U^* = K \frac{U_{ref}}{ln(\frac{Z_{ref} + z_0}{z_0})}
+            U^* = K \frac{U_{ref}}{ln\left(\frac{Z_{ref} + z_0}{z_0}\right)}
         \f]
 
     where:
@@ -74,7 +74,7 @@ Description
     \verbatim
     myPatch
     {
-        type            atmBoundaryLayerInletVelocity;
+        type            atmBoundaryLayerInletEpsilon;
         z               1.0;
         kappa           0.41;
         Uref            1.0;
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H
index 6e686dfbdd5..60d150deb0e 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H
@@ -37,7 +37,7 @@ Description
     \table
         Property     | Description             | Required    | Default value
         heatSource   | heat source type: \c flux [W/m2] or \c power [W]| yes |
-        q            | heat source value       | yea          |
+        q            | heat source value       | yes          |
         alphaEff     | turbulent thermal diffusivity field name | yes |
     \endtable
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H
index c0f8066e974..881752d9f54 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H
@@ -37,7 +37,7 @@ Description
         Property     | Description             | Required    | Default value
         roughnessHeight | roughness height     | yes         |
         roughnessConstant | roughness constanr | yes         |
-        roughnessFactor | scaling factor       | 
+        roughnessFactor | scaling factor       | yes         |
     \endtable
 
     Example of the boundary condition specification:
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H
index ba1dde4514f..b9f75ed1b17 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H
@@ -30,7 +30,20 @@ Group
 Description
     This boundary condition provides a turbulent kinematic viscosity condition
     when using wall functions for rough walls, based on velocity,  using
-    Spaldings law to give a continuous nut profile to the wall (y+ = 0)
+    Spalding's law to give a continuous nut profile to the wall (y+ = 0)
+
+        \f[
+            y^+ = u^+ + \frac{1}{E} \left[exp(\kappa u^+) - 1 - \kappa u^+\,
+                - 0.5 (\kappa u^+)^2 - \frac{1}{6} (\kappa u^+)^3\right]
+        \f]
+
+    where
+    \vartable
+        y^+     | non-dimensional position
+        u^+     | non-dimensional velocity
+        \kappa  | Von Karman constant
+    \endvartable
+
 
     \heading Patch usage
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H
index 8bbe8b16b8c..980f55f3b12 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H
@@ -48,7 +48,7 @@ Description
     \verbatim
     myPatch
     {
-        type            nutkAtmRoughWallFunction;
+        type            nutkRoughWallFunction;
         Ks              uniform 0;
         Cs              uniform 0.5;
     }
-- 
GitLab