pimpleNoLoopControl: added predictTransport() function to control the transport modelling prediction
The new optional PIMPLE control transportPredictionFirst is used to select if the transport modelling predictor is executed ever PIMPLE iteration or only on the first, which is the default. Also the transportCorr() function has been renamed correctTransport() for consistency and the tutorials updated to use the new control name transportCorrectionFinal instead of the previous name turbOnFinalIterOnly; support for turbOnFinalIterOnly is maintained for backwards-compatibility.
This commit is contained in:
@ -74,12 +74,6 @@ public:
|
||||
|
||||
using pimpleSingleRegionControl::run;
|
||||
|
||||
//- Flag to indicate whether to correct the transport properties
|
||||
bool turbCorr() const
|
||||
{
|
||||
return transportCorr();
|
||||
}
|
||||
|
||||
//- Flag to indicate the first iteration
|
||||
bool firstPimpleIter() const
|
||||
{
|
||||
|
||||
@ -53,6 +53,7 @@ Foam::pimpleNoLoopControl::pimpleNoLoopControl
|
||||
),
|
||||
pimpleLoopPtr_(nullptr),
|
||||
simpleRho_(false),
|
||||
transportPredictionFirst_(true),
|
||||
transportCorrectionFinal_(true)
|
||||
{
|
||||
read();
|
||||
@ -92,6 +93,9 @@ bool Foam::pimpleNoLoopControl::read()
|
||||
mesh().schemes().steady()
|
||||
);
|
||||
|
||||
transportPredictionFirst_ =
|
||||
dict().lookupOrDefault<bool>("transportPredictionFirst", true);
|
||||
|
||||
transportCorrectionFinal_ =
|
||||
dict().lookupOrDefaultBackwardsCompatible<bool>
|
||||
(
|
||||
|
||||
@ -82,8 +82,12 @@ protected:
|
||||
// rather than PISO mode
|
||||
bool simpleRho_;
|
||||
|
||||
//- Switch to control whether turbulence is solved just on the final
|
||||
// pimple iteration, or on every pimple iteration
|
||||
//- Switch to control whether transport models are predicted
|
||||
// just on the first pimple iteration, or on every pimple iteration
|
||||
bool transportPredictionFirst_;
|
||||
|
||||
//- Switch to control whether transport models are corrected
|
||||
// just on the final pimple iteration, or on every pimple iteration
|
||||
bool transportCorrectionFinal_;
|
||||
|
||||
|
||||
@ -123,8 +127,11 @@ public:
|
||||
//- Switch to indicate whether to update the density in simple mode
|
||||
inline bool simpleRho() const;
|
||||
|
||||
//- Flag to indicate whether to correct the transport properties
|
||||
inline bool transportCorr() const;
|
||||
//- Flag to indicate whether to predict the transport models
|
||||
inline bool predictTransport() const;
|
||||
|
||||
//- Flag to indicate whether to correct the transport models
|
||||
inline bool correctTransport() const;
|
||||
|
||||
//- Flag to indicate the first iteration
|
||||
inline bool firstIter() const;
|
||||
|
||||
@ -39,7 +39,13 @@ inline bool Foam::pimpleNoLoopControl::simpleRho() const
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleNoLoopControl::transportCorr() const
|
||||
inline bool Foam::pimpleNoLoopControl::predictTransport() const
|
||||
{
|
||||
return !transportPredictionFirst_ || firstIter();
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pimpleNoLoopControl::correctTransport() const
|
||||
{
|
||||
return !transportCorrectionFinal_ || finalIter();
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ PIMPLE
|
||||
}
|
||||
}
|
||||
|
||||
turbOnFinalIterOnly no;
|
||||
transportCorrectionFinal no;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -47,6 +47,7 @@ PIMPLE
|
||||
nOuterCorrectors 5;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
transportPredictionFirst yes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ PIMPLE
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
turbOnFinalIterOnly no;
|
||||
transportCorrectionFinal no;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -52,7 +52,7 @@ PIMPLE
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
turbOnFinalIterOnly no;
|
||||
transportCorrectionFinal no;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -52,7 +52,7 @@ PIMPLE
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
turbOnFinalIterOnly no;
|
||||
transportCorrectionFinal no;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -78,7 +78,7 @@ PIMPLE
|
||||
|
||||
correctPhi yes;
|
||||
moveMeshOuterCorrectors yes;
|
||||
turbOnFinalIterOnly yes;
|
||||
transportCorrectionFinal yes;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -78,7 +78,7 @@ PIMPLE
|
||||
|
||||
correctPhi yes;
|
||||
moveMeshOuterCorrectors yes;
|
||||
turbOnFinalIterOnly yes;
|
||||
transportCorrectionFinal yes;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
@ -78,7 +78,7 @@ PIMPLE
|
||||
|
||||
correctPhi yes;
|
||||
moveMeshOuterCorrectors yes;
|
||||
turbOnFinalIterOnly yes;
|
||||
transportCorrectionFinal yes;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
|
||||
Reference in New Issue
Block a user