diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index 61b583298df8c43c3406892ec098f427caeb656f..d7c660adf0ffc2ee4644a7473d0c71584fa2c4ce 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -61,6 +61,7 @@ void Foam::functionObjects::stabilityBlendingFactor::writeFileHeader os << endl; } + bool Foam::functionObjects::stabilityBlendingFactor::calc() { init(false); @@ -511,6 +512,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor { FatalErrorInFunction << " Field : " << nonOrthogonalityName_ << " not found." + << " The function object will no be used" << exit(FatalError); } } @@ -542,6 +544,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor { FatalErrorInFunction << " Field : " << faceWeightName_ << " not found." + << " The function object will no be used" << exit(FatalError); } } @@ -572,6 +575,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor { FatalErrorInFunction << " Field : " << skewnessName_ << " not found." + << " The function object will no be used" << exit(FatalError); } } @@ -582,9 +586,12 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor indicator_.writeOpt() = IOobject::AUTO_WRITE; } - init(true); + if (writeToFile_) + { + writeFileHeader(file()); + } - writeFileHeader(file()); + init(true); } @@ -714,13 +721,17 @@ bool Foam::functionObjects::stabilityBlendingFactor::write() << " blended cells : " << nCellsBlended << nl << endl; - writeTime(file()); - file() - << tab << nCellsScheme1 - << tab << nCellsScheme2 - << tab << nCellsBlended - << endl; + if (writeToFile_) + { + writeTime(file()); + + file() + << tab << nCellsScheme1 + << tab << nCellsScheme2 + << tab << nCellsBlended + << endl; + } return true; } diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.H b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.H index 49bd1dac0eeb344630bbb6c255cf49d7c83452d7..915f13affbeaf52a962693e1cfeb676b8a5cb7a4 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.H +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.H @@ -174,7 +174,10 @@ Usage { type stabilityBlendingFactor; libs ("libfieldFunctionObjects.so"); + log true; + writeToFile false; + switchNonOrtho yes; switchGradCc no; switchResiduals yes; @@ -218,6 +221,7 @@ Usage type residuals; libs ("libutilityFunctionObjects.so"); writeFields true; + writeControl outputTime; fields (p); } @@ -228,8 +232,9 @@ Usage Property | Description | Required | Default value type | Type name: stabilityBlendingFactor | yes | - log | Log to standard output | no | yes + writeToFile | Log to file | no | yes + switchNonOrtho | non-orthogonal method | no | false switchGradCc | cell centre gradient method | no | false switchResiduals | residual evolution method | no | false @@ -274,6 +279,13 @@ Usage \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 Foam::functionObjects::fieldExpression Foam::functionObjects::fvMeshFunctionObject diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun index ede3cb25c2e7600457ba956cec2f35d7bd46dd60..895be49887b69b3744c0d25b20490a00f2f8ba43 100755 --- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun +++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun @@ -22,6 +22,7 @@ restore0Dir -processor runParallel renumberMesh -overwrite runParallel potentialFoam -initialiseUBCs +runParallel checkMesh -writeFields '(nonOrthoAngle)' -constant runParallel $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/stabilizationSchemes b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/stabilizationSchemes index 2de422fd769ba93bed966fd4f7f2ec3294f628a0..7c79baebed9e4edb8bf90aee607c5bbffdf4a292 100644 --- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/stabilizationSchemes +++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/stabilizationSchemes @@ -20,6 +20,9 @@ blendingFactor type stabilityBlendingFactor; libs ("libfieldFunctionObjects.so"); log true; + writeToFile false; + + switchNonOrtho yes; switchGradCc no; switchResiduals yes;