mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Code clean-up
This commit is contained in:
@ -228,13 +228,6 @@ Foam::functionObjects::pressure::pressure
|
||||
rhoInfInitialised_(false)
|
||||
{
|
||||
read(dict);
|
||||
|
||||
dimensionSet pDims(dimPressure);
|
||||
|
||||
if (calcCoeff_)
|
||||
{
|
||||
pDims /= dimPressure;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -183,48 +183,39 @@ bool Foam::functionObjects::wallShearStress::execute()
|
||||
volVectorField& wallShearStress =
|
||||
mesh_.lookupObjectRef<volVectorField>(type());
|
||||
|
||||
bool ok = false;
|
||||
|
||||
// compressible
|
||||
if (!ok)
|
||||
// Compressible
|
||||
{
|
||||
typedef compressible::turbulenceModel turbType;
|
||||
|
||||
const turbType* modelPtr =
|
||||
findObject<turbType>(turbulenceModel::propertiesName);
|
||||
|
||||
ok = modelPtr;
|
||||
|
||||
if (ok)
|
||||
if (modelPtr)
|
||||
{
|
||||
calcShearStress(modelPtr->devRhoReff(), wallShearStress);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// incompressible
|
||||
if (!ok)
|
||||
// Incompressible
|
||||
{
|
||||
typedef incompressible::turbulenceModel turbType;
|
||||
|
||||
const turbType* modelPtr =
|
||||
findObject<turbType>(turbulenceModel::propertiesName);
|
||||
|
||||
ok = modelPtr;
|
||||
|
||||
if (ok)
|
||||
if (modelPtr)
|
||||
{
|
||||
calcShearStress(modelPtr->devReff(), wallShearStress);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unable to find turbulence model in the "
|
||||
<< "database" << exit(FatalError);
|
||||
}
|
||||
FatalErrorInFunction
|
||||
<< "Unable to find turbulence model in the "
|
||||
<< "database" << exit(FatalError);
|
||||
|
||||
return ok;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user