momentumTransportModels: Added a new predict() function in addition to the existing correct() function

Some momentumTransportModels like the laminar Stokes and generalisedNewtonian
models do no solve transport equations and the transport coefficients they
provide can be predicted at the beginning of the time-step rather than corrected
at the end, after conservative fluxes are available.  A particular advantage of
this approach is that complex data cached in the momentumTransportModels
can now be deleted following mesh topology changes and recreated in the
predict() call which is more efficient than attempting to register and map the
data.

Currently the predict() function is only used for the Stokes and
generalisedNewtonian models but it will be extended in the future to cover many
LES models which also do not require the solution of transport equations.

All solvers and solver modules have been update to call the
momentumTransportModel::predict() function at the beginning of the time-step,
controlled by the new PIMPLE transportPredictionFirst control as appropriate.
This commit is contained in:
Henry Weller
2022-12-16 10:12:22 +00:00
parent 96974f8914
commit d9ba28b427
47 changed files with 276 additions and 53 deletions

View File

@ -644,6 +644,24 @@ void Foam::phaseSystem::correctSpecies()
}
void Foam::phaseSystem::predictMomentumTransport()
{
forAll(phaseModels_, phasei)
{
phaseModels_[phasei].predictMomentumTransport();
}
}
void Foam::phaseSystem::predictThermophysicalTransport()
{
forAll(phaseModels_, phasei)
{
phaseModels_[phasei].predictThermophysicalTransport();
}
}
void Foam::phaseSystem::correctMomentumTransport()
{
forAll(phaseModels_, phasei)

View File

@ -635,6 +635,12 @@ public:
//- Correct the species mass fractions
virtual void correctSpecies();
//- Predict the momentumTransport
virtual void predictMomentumTransport();
//- Predict the energy transport e.g. alphat
virtual void predictThermophysicalTransport();
//- Correct the momentumTransport
virtual void correctMomentumTransport();