ENH: Adding additional entry to stabilizationSchemes.

Correcting tutorial and expanding documentation
This commit is contained in:
sergio
2018-06-19 11:21:56 -07:00
parent 02f97872ca
commit a3a6768608
4 changed files with 36 additions and 9 deletions

View File

@ -61,6 +61,7 @@ void Foam::functionObjects::stabilityBlendingFactor::writeFileHeader
os << endl; os << endl;
} }
bool Foam::functionObjects::stabilityBlendingFactor::calc() bool Foam::functionObjects::stabilityBlendingFactor::calc()
{ {
init(false); init(false);
@ -511,6 +512,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
{ {
FatalErrorInFunction FatalErrorInFunction
<< " Field : " << nonOrthogonalityName_ << " not found." << " Field : " << nonOrthogonalityName_ << " not found."
<< " The function object will no be used"
<< exit(FatalError); << exit(FatalError);
} }
} }
@ -542,6 +544,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
{ {
FatalErrorInFunction FatalErrorInFunction
<< " Field : " << faceWeightName_ << " not found." << " Field : " << faceWeightName_ << " not found."
<< " The function object will no be used"
<< exit(FatalError); << exit(FatalError);
} }
} }
@ -572,6 +575,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
{ {
FatalErrorInFunction FatalErrorInFunction
<< " Field : " << skewnessName_ << " not found." << " Field : " << skewnessName_ << " not found."
<< " The function object will no be used"
<< exit(FatalError); << exit(FatalError);
} }
} }
@ -582,11 +586,14 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
indicator_.writeOpt() = IOobject::AUTO_WRITE; indicator_.writeOpt() = IOobject::AUTO_WRITE;
} }
init(true); if (writeToFile_)
{
writeFileHeader(file()); writeFileHeader(file());
} }
init(true);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@ -714,6 +721,9 @@ bool Foam::functionObjects::stabilityBlendingFactor::write()
<< " blended cells : " << nCellsBlended << nl << " blended cells : " << nCellsBlended << nl
<< endl; << endl;
if (writeToFile_)
{
writeTime(file()); writeTime(file());
file() file()
@ -721,6 +731,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::write()
<< tab << nCellsScheme2 << tab << nCellsScheme2
<< tab << nCellsBlended << tab << nCellsBlended
<< endl; << endl;
}
return true; return true;
} }

View File

@ -174,7 +174,10 @@ Usage
{ {
type stabilityBlendingFactor; type stabilityBlendingFactor;
libs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
log true; log true;
writeToFile false;
switchNonOrtho yes; switchNonOrtho yes;
switchGradCc no; switchGradCc no;
switchResiduals yes; switchResiduals yes;
@ -218,6 +221,7 @@ Usage
type residuals; type residuals;
libs ("libutilityFunctionObjects.so"); libs ("libutilityFunctionObjects.so");
writeFields true; writeFields true;
writeControl outputTime;
fields (p); fields (p);
} }
@ -228,8 +232,9 @@ Usage
Property | Description | Required | Default value Property | Description | Required | Default value
type | Type name: stabilityBlendingFactor | yes | type | Type name: stabilityBlendingFactor | yes |
log | Log to standard output | no | yes log | Log to standard output | no | yes
writeToFile | Log to file | no | yes
switchNonOrtho | non-orthogonal method | no | false switchNonOrtho | non-orthogonal method | no | false
switchGradCc | cell centre gradient method | no | false switchGradCc | cell centre gradient method | no | false
switchResiduals | residual evolution method | no | false switchResiduals | residual evolution method | no | false
@ -274,6 +279,13 @@ Usage
\endtable \endtable
The 'log' flag true write the number of cells on each scheme, plus it
writes the field name "blendedIndicator".
The 'result' entry is the field which is read by the localBlended scheme
specified in fvSchemes. This name is determined by the localBlended class.
See also See also
Foam::functionObjects::fieldExpression Foam::functionObjects::fieldExpression
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject

View File

@ -22,6 +22,7 @@ restore0Dir -processor
runParallel renumberMesh -overwrite runParallel renumberMesh -overwrite
runParallel potentialFoam -initialiseUBCs runParallel potentialFoam -initialiseUBCs
runParallel checkMesh -writeFields '(nonOrthoAngle)' -constant
runParallel $(getApplication) runParallel $(getApplication)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -20,6 +20,9 @@ blendingFactor
type stabilityBlendingFactor; type stabilityBlendingFactor;
libs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
log true; log true;
writeToFile false;
switchNonOrtho yes; switchNonOrtho yes;
switchGradCc no; switchGradCc no;
switchResiduals yes; switchResiduals yes;