File size: 974 Bytes
5a600cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | // Description
// Calculates skin friction coefficient (Cf) from the wallShearStress
libs ("libutilityFunctionObjects.so");
type coded;
writeControl writeTime;
magU ${${FOAM_CASE}/0/U!Uinlet};
M ${${FOAM_CASE}/constant/physicalProperties!mixture/specie/molWeight};
pInf ${${FOAM_CASE}/0/p!pInlet};
TInf ${${FOAM_CASE}/0/T!Tinlet};
codeInclude
#{
#include "constants.H"
using namespace Foam::constant::thermodynamic;
#};
codeOptions
#{
-I$(LIB_SRC)/finiteVolume/lnInclude
#};
codeFields
#{
fields.append("wallShearStress");
#};
codeWrite
#{
const scalar R = RR / $M;
const scalar rhoInf = $pInf / (R*$TInf);
const volVectorField& wallShearStress =
mesh().lookupObject<volVectorField>("wallShearStress");
volScalarField Cf
(
"Cf",
(wallShearStress & vector(-1, 0, 0))
/dimensionedScalar(wallShearStress.dimensions(), 0.5*rhoInf*sqr($magU))
);
Cf.write();
#};
|