thermophysicalTransportModel: added predict() function
None of the current thermophysicalTransportModels solve transport equations in order to evaluate the thermophysical transport properties so it makes more sense that the evaluation occurs at the beginning of the time-step rather than at the end where conservative fluxes are available for transport solution. To enable this the correct() functions have been renamed predict() and called in the prePredictor() step of foamRun and foamMultiRun and at the beginning of the time-step in the legacy solvers. A particular advantage of this approach is that complex data cached in the thermophysicalTransportModels 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. An empty correct() function is included in addition to the new predict() function in thermophysicalTransportModel to support scalar flux transport closure in the future if needed. Additionally the two transport model corrector function calls in foamRun and foamMultiRun have been combined into a single postCorrector() call to allow greater flexibility in transport property prediction and correction in the modular solvers.
This commit is contained in:
@ -123,6 +123,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
fvModels.correct();
|
||||
thermophysicalTransport.predict();
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
|
||||
@ -173,6 +173,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
fvModels.correct();
|
||||
thermophysicalTransport->predict();
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
|
||||
@ -157,6 +157,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
fvModels.correct();
|
||||
thermophysicalTransport.predict();
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "ftEqn.H"
|
||||
|
||||
@ -200,6 +200,8 @@ int main(int argc, char *argv[])
|
||||
// --- Solve density
|
||||
solve(fvm::ddt(rho) + fvc::div(phi));
|
||||
|
||||
thermophysicalTransport->predict();
|
||||
|
||||
// --- Solve momentum
|
||||
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
|
||||
|
||||
|
||||
@ -64,6 +64,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.userTimeName() << nl << endl;
|
||||
|
||||
thermophysicalTransport->predict();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
||||
@ -183,8 +183,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(solvers, i)
|
||||
{
|
||||
solvers[i].momentumTransportCorrector();
|
||||
solvers[i].thermophysicalTransportCorrector();
|
||||
solvers[i].postCorrector();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -138,8 +138,7 @@ int main(int argc, char *argv[])
|
||||
solver.momentumPredictor();
|
||||
solver.thermophysicalPredictor();
|
||||
solver.pressureCorrector();
|
||||
solver.momentumTransportCorrector();
|
||||
solver.thermophysicalTransportCorrector();
|
||||
solver.postCorrector();
|
||||
}
|
||||
|
||||
solver.postSolve();
|
||||
|
||||
@ -215,6 +215,10 @@ Foam::compressibleInterPhaseThermophysicalTransportModel::divq
|
||||
}
|
||||
|
||||
|
||||
void Foam::compressibleInterPhaseThermophysicalTransportModel::predict()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::compressibleInterPhaseThermophysicalTransportModel::correct()
|
||||
{}
|
||||
|
||||
|
||||
@ -108,6 +108,10 @@ public:
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Predict the transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict();
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the transport coefficients
|
||||
virtual void correct();
|
||||
|
||||
@ -331,22 +331,20 @@ void Foam::solvers::compressibleVoF::prePredictor()
|
||||
fvModels().correct();
|
||||
alphaPredictor();
|
||||
momentumTransport.correctPhasePhi();
|
||||
thermophysicalTransport.predict();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::compressibleVoF::momentumTransportCorrector()
|
||||
void Foam::solvers::compressibleVoF::postCorrector()
|
||||
{
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
momentumTransport.correct();
|
||||
thermophysicalTransport.correct();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::compressibleVoF::thermophysicalTransportCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::compressibleVoF::postSolve()
|
||||
{
|
||||
divU.clear();
|
||||
|
||||
@ -244,12 +244,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector();
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
// Newtonian, non-Newtonian or turbulent
|
||||
virtual void momentumTransportCorrector();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve();
|
||||
|
||||
@ -63,8 +63,17 @@ Foam::solvers::fluid::~fluid()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::solvers::fluid::thermophysicalTransportCorrector()
|
||||
void Foam::solvers::fluid::prePredictor()
|
||||
{
|
||||
isothermalFluid::prePredictor();
|
||||
thermophysicalTransport->predict();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::fluid::postCorrector()
|
||||
{
|
||||
isothermalFluid::postCorrector();
|
||||
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
thermophysicalTransport->correct();
|
||||
|
||||
@ -99,13 +99,16 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Called at the start of the PIMPLE loop
|
||||
virtual void prePredictor();
|
||||
|
||||
//- Construct and solve the energy equation,
|
||||
// convert to temperature
|
||||
// and update thermophysical and transport properties
|
||||
virtual void thermophysicalPredictor();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
@ -215,7 +215,7 @@ void Foam::solvers::incompressibleFluid::pressureCorrector()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::incompressibleFluid::momentumTransportCorrector()
|
||||
void Foam::solvers::incompressibleFluid::postCorrector()
|
||||
{
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
@ -225,10 +225,6 @@ void Foam::solvers::incompressibleFluid::momentumTransportCorrector()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::incompressibleFluid::thermophysicalTransportCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::incompressibleFluid::postSolve()
|
||||
{}
|
||||
|
||||
|
||||
@ -189,12 +189,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector();
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
// Newtonian, non-Newtonian or turbulent
|
||||
virtual void momentumTransportCorrector();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve();
|
||||
|
||||
@ -342,7 +342,7 @@ void Foam::solvers::isothermalFluid::pressureCorrector()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::isothermalFluid::momentumTransportCorrector()
|
||||
void Foam::solvers::isothermalFluid::postCorrector()
|
||||
{
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
@ -351,10 +351,6 @@ void Foam::solvers::isothermalFluid::momentumTransportCorrector()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::isothermalFluid::thermophysicalTransportCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::isothermalFluid::postSolve()
|
||||
{
|
||||
divrhoU.clear();
|
||||
|
||||
@ -251,12 +251,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector();
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
// Newtonian, non-Newtonian or turbulent
|
||||
virtual void momentumTransportCorrector();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve();
|
||||
|
||||
@ -82,8 +82,17 @@ Foam::solvers::multicomponentFluid::~multicomponentFluid()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::solvers::multicomponentFluid::thermophysicalTransportCorrector()
|
||||
void Foam::solvers::multicomponentFluid::prePredictor()
|
||||
{
|
||||
isothermalFluid::prePredictor();
|
||||
thermophysicalTransport->predict();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::multicomponentFluid::postCorrector()
|
||||
{
|
||||
isothermalFluid::postCorrector();
|
||||
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
thermophysicalTransport->correct();
|
||||
|
||||
@ -131,13 +131,16 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Called at the start of the PIMPLE loop
|
||||
virtual void prePredictor();
|
||||
|
||||
//- Construct and solve the energy equation,
|
||||
// convert to temperature
|
||||
// and update thermophysical and transport properties
|
||||
virtual void thermophysicalPredictor();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
@ -248,19 +248,16 @@ void Foam::solvers::multiphaseEuler::prePredictor()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::multiphaseEuler::momentumTransportCorrector()
|
||||
void Foam::solvers::multiphaseEuler::postCorrector()
|
||||
{
|
||||
if (pimple.flow() && pimple.transportCorr())
|
||||
{
|
||||
fluid.correctTurbulence();
|
||||
fluid.correctMomentumTransport();
|
||||
fluid.correctThermophysicalTransport();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::multiphaseEuler::thermophysicalTransportCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::multiphaseEuler::postSolve()
|
||||
{
|
||||
divU.clear();
|
||||
|
||||
@ -233,12 +233,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector();
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
// Newtonian, non-Newtonian or turbulent
|
||||
virtual void momentumTransportCorrector();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector();
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve();
|
||||
|
||||
@ -76,8 +76,6 @@ void Foam::solvers::multiphaseEuler::energyPredictor()
|
||||
{
|
||||
for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
|
||||
{
|
||||
fluid.correctEnergyTransport();
|
||||
|
||||
autoPtr<phaseSystem::heatTransferTable>
|
||||
heatTransferPtr(fluid.heatTransfer());
|
||||
|
||||
@ -120,7 +118,6 @@ void Foam::solvers::multiphaseEuler::thermophysicalPredictor()
|
||||
{
|
||||
if (pimple.thermophysics())
|
||||
{
|
||||
// compositionPredictor();
|
||||
energyPredictor();
|
||||
|
||||
forAll(phases, phasei)
|
||||
|
||||
@ -295,9 +295,9 @@ heatTransfer() const
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
void Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
correctEnergyTransport()
|
||||
correctThermophysicalTransport()
|
||||
{
|
||||
BasePhaseSystem::correctEnergyTransport();
|
||||
BasePhaseSystem::correctThermophysicalTransport();
|
||||
|
||||
correctInterfaceThermo();
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
virtual autoPtr<phaseSystem::heatTransferTable> heatTransfer() const;
|
||||
|
||||
//- Correct the energy transport e.g. alphat and Tf
|
||||
virtual void correctEnergyTransport();
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Correct the interface thermodynamics
|
||||
virtual void correctInterfaceThermo() = 0;
|
||||
|
||||
@ -241,6 +241,7 @@ template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correct()
|
||||
{
|
||||
BasePhaseModel::correct();
|
||||
thermophysicalTransport_->predict();
|
||||
}
|
||||
|
||||
|
||||
@ -269,18 +270,17 @@ void Foam::MovingPhaseModel<BasePhaseModel>::correctKinematics()
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctTurbulence()
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctMomentumTransport()
|
||||
{
|
||||
BasePhaseModel::correctTurbulence();
|
||||
|
||||
BasePhaseModel::correctMomentumTransport();
|
||||
momentumTransport_->correct();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctEnergyTransport()
|
||||
void Foam::MovingPhaseModel<BasePhaseModel>::correctThermophysicalTransport()
|
||||
{
|
||||
BasePhaseModel::correctEnergyTransport();
|
||||
BasePhaseModel::correctThermophysicalTransport();
|
||||
thermophysicalTransport_->correct();
|
||||
}
|
||||
|
||||
|
||||
@ -179,10 +179,10 @@ public:
|
||||
virtual void correctKinematics();
|
||||
|
||||
//- Correct the momentumTransport
|
||||
virtual void correctTurbulence();
|
||||
virtual void correctMomentumTransport();
|
||||
|
||||
//- Correct the energy transport e.g. alphat
|
||||
virtual void correctEnergyTransport();
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Correct the face velocity for moving meshes
|
||||
virtual void correctUf();
|
||||
|
||||
@ -180,11 +180,11 @@ void Foam::phaseModel::correctSpecies()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::phaseModel::correctTurbulence()
|
||||
void Foam::phaseModel::correctMomentumTransport()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::phaseModel::correctEnergyTransport()
|
||||
void Foam::phaseModel::correctThermophysicalTransport()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -216,10 +216,10 @@ public:
|
||||
virtual void correctSpecies();
|
||||
|
||||
//- Correct the momentumTransport
|
||||
virtual void correctTurbulence();
|
||||
virtual void correctMomentumTransport();
|
||||
|
||||
//- Correct the energy transport
|
||||
virtual void correctEnergyTransport();
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Correct the face velocity for moving meshes
|
||||
virtual void correctUf();
|
||||
|
||||
@ -644,20 +644,20 @@ void Foam::phaseSystem::correctSpecies()
|
||||
}
|
||||
|
||||
|
||||
void Foam::phaseSystem::correctTurbulence()
|
||||
void Foam::phaseSystem::correctMomentumTransport()
|
||||
{
|
||||
forAll(phaseModels_, phasei)
|
||||
{
|
||||
phaseModels_[phasei].correctTurbulence();
|
||||
phaseModels_[phasei].correctMomentumTransport();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::phaseSystem::correctEnergyTransport()
|
||||
void Foam::phaseSystem::correctThermophysicalTransport()
|
||||
{
|
||||
forAll(phaseModels_, phasei)
|
||||
{
|
||||
phaseModels_[phasei].correctEnergyTransport();
|
||||
phaseModels_[phasei].correctThermophysicalTransport();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -636,10 +636,10 @@ public:
|
||||
virtual void correctSpecies();
|
||||
|
||||
//- Correct the momentumTransport
|
||||
virtual void correctTurbulence();
|
||||
virtual void correctMomentumTransport();
|
||||
|
||||
//- Correct the energy transport e.g. alphat
|
||||
virtual void correctEnergyTransport();
|
||||
virtual void correctThermophysicalTransport();
|
||||
|
||||
//- Update the fluid properties for mesh changes
|
||||
virtual void meshUpdate();
|
||||
|
||||
@ -156,7 +156,9 @@ bool Foam::solvers::solid::moveMesh()
|
||||
|
||||
|
||||
void Foam::solvers::solid::prePredictor()
|
||||
{}
|
||||
{
|
||||
thermophysicalTransport->predict();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::solid::momentumPredictor()
|
||||
@ -195,12 +197,13 @@ void Foam::solvers::solid::pressureCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::solid::momentumTransportCorrector()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solvers::solid::thermophysicalTransportCorrector()
|
||||
{}
|
||||
void Foam::solvers::solid::postCorrector()
|
||||
{
|
||||
if (pimple.transportCorr())
|
||||
{
|
||||
thermophysicalTransport->correct();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::solid::postSolve()
|
||||
|
||||
@ -143,12 +143,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector();
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
// Newtonian, non-Newtonian or turbulent
|
||||
virtual void momentumTransportCorrector();
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector();
|
||||
virtual void postCorrector();
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve();
|
||||
|
||||
@ -66,9 +66,7 @@ Fickian<BasicThermophysicalTransportModel>::Fickian
|
||||
this->coeffDict_.found("DT")
|
||||
? this->thermo().composition().species().size()
|
||||
: 0
|
||||
),
|
||||
|
||||
Dm_(this->thermo().composition().species().size())
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -437,15 +435,17 @@ tmp<fvScalarMatrix> Fickian<BasicThermophysicalTransportModel>::divj
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Fickian<BasicThermophysicalTransportModel>::correct()
|
||||
void Fickian<BasicThermophysicalTransportModel>::predict()
|
||||
{
|
||||
BasicThermophysicalTransportModel::correct();
|
||||
BasicThermophysicalTransportModel::predict();
|
||||
|
||||
const basicSpecieMixture& composition = this->thermo().composition();
|
||||
const PtrList<volScalarField>& Y = composition.Y();
|
||||
const volScalarField& p = this->thermo().p();
|
||||
const volScalarField& T = this->thermo().T();
|
||||
|
||||
Dm_.setSize(Y.size());
|
||||
|
||||
if (mixtureDiffusionCoefficients_)
|
||||
{
|
||||
forAll(Y, i)
|
||||
@ -519,7 +519,8 @@ void Fickian<BasicThermophysicalTransportModel>::topoChange
|
||||
const polyTopoChangeMap& map
|
||||
)
|
||||
{
|
||||
correct();
|
||||
// Delete the cached Dm, will be re-created in predict
|
||||
Dm_.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -529,7 +530,8 @@ void Fickian<BasicThermophysicalTransportModel>::mapMesh
|
||||
const polyMeshMap& map
|
||||
)
|
||||
{
|
||||
correct();
|
||||
// Delete the cached Dm, will be re-created in predict
|
||||
Dm_.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -539,7 +541,8 @@ void Fickian<BasicThermophysicalTransportModel>::distribute
|
||||
const polyDistributionMap& map
|
||||
)
|
||||
{
|
||||
correct();
|
||||
// Delete the cached Dm, will be re-created in predict
|
||||
Dm_.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -144,7 +144,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Update the diffusion coefficients
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
|
||||
|
||||
// Mesh changes
|
||||
|
||||
@ -50,7 +50,7 @@ FickianFourier
|
||||
)
|
||||
{
|
||||
read();
|
||||
this->correct();
|
||||
this->predict();
|
||||
|
||||
this->printCoeffs(typeName);
|
||||
}
|
||||
|
||||
@ -170,12 +170,12 @@ Fourier<BasicThermophysicalTransportModel>::divj(volScalarField& Yi) const
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Fourier<BasicThermophysicalTransportModel>::correct()
|
||||
void Fourier<BasicThermophysicalTransportModel>::predict()
|
||||
{
|
||||
laminarThermophysicalTransportModel
|
||||
<
|
||||
BasicThermophysicalTransportModel
|
||||
>::correct();
|
||||
>::predict();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Correct the Fourier viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -608,9 +608,9 @@ void MaxwellStefan<BasicThermophysicalTransportModel>::transform
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void MaxwellStefan<BasicThermophysicalTransportModel>::correct()
|
||||
void MaxwellStefan<BasicThermophysicalTransportModel>::predict()
|
||||
{
|
||||
BasicThermophysicalTransportModel::correct();
|
||||
BasicThermophysicalTransportModel::predict();
|
||||
|
||||
const basicSpecieMixture& composition = this->thermo().composition();
|
||||
const label d = composition.defaultSpecie();
|
||||
|
||||
@ -209,7 +209,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Update the diffusion coefficients and flux corrections
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ MaxwellStefanFourier
|
||||
)
|
||||
{
|
||||
read();
|
||||
this->correct();
|
||||
this->predict();
|
||||
|
||||
this->printCoeffs(typeName);
|
||||
}
|
||||
|
||||
@ -161,6 +161,16 @@ bool Foam::laminarThermophysicalTransportModel
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::laminarThermophysicalTransportModel
|
||||
<
|
||||
BasicThermophysicalTransportModel
|
||||
>::predict()
|
||||
{
|
||||
BasicThermophysicalTransportModel::predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::laminarThermophysicalTransportModel
|
||||
<
|
||||
|
||||
@ -186,7 +186,12 @@ public:
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Correct the laminar transport
|
||||
//- Predict the laminar transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict();
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the laminar transport coefficients
|
||||
virtual void correct();
|
||||
|
||||
|
||||
|
||||
@ -154,12 +154,12 @@ divj(volScalarField& Yi) const
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void unityLewisFourier<BasicThermophysicalTransportModel>::correct()
|
||||
void unityLewisFourier<BasicThermophysicalTransportModel>::predict()
|
||||
{
|
||||
laminarThermophysicalTransportModel
|
||||
<
|
||||
BasicThermophysicalTransportModel
|
||||
>::correct();
|
||||
>::predict();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Correct the unityLewisFourier viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ FickianEddyDiffusivity
|
||||
Sct_("Sct", dimless, this->coeffDict_)
|
||||
{
|
||||
read();
|
||||
this->correct();
|
||||
this->predict();
|
||||
|
||||
this->printCoeffs(typeName);
|
||||
}
|
||||
|
||||
@ -174,6 +174,14 @@ bool Foam::LESThermophysicalTransportModel
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::LESThermophysicalTransportModel<BasicThermophysicalTransportModel>::
|
||||
predict()
|
||||
{
|
||||
BasicThermophysicalTransportModel::predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::LESThermophysicalTransportModel<BasicThermophysicalTransportModel>::
|
||||
correct()
|
||||
|
||||
@ -154,7 +154,12 @@ public:
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
|
||||
|
||||
//- Correct the LES transport
|
||||
//- Predict the LES transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict();
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the LES transport coefficients
|
||||
virtual void correct();
|
||||
|
||||
|
||||
|
||||
@ -174,6 +174,14 @@ bool Foam::RASThermophysicalTransportModel
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::RASThermophysicalTransportModel<BasicThermophysicalTransportModel>::
|
||||
predict()
|
||||
{
|
||||
BasicThermophysicalTransportModel::predict();
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermophysicalTransportModel>
|
||||
void Foam::RASThermophysicalTransportModel<BasicThermophysicalTransportModel>::
|
||||
correct()
|
||||
|
||||
@ -154,7 +154,12 @@ public:
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
|
||||
|
||||
//- Correct the RAS transport
|
||||
//- Predict the RAS transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict();
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the RAS transport coefficients
|
||||
virtual void correct();
|
||||
|
||||
|
||||
|
||||
@ -203,9 +203,9 @@ eddyDiffusivity<TurbulenceThermophysicalTransportModel>::divj
|
||||
|
||||
|
||||
template<class TurbulenceThermophysicalTransportModel>
|
||||
void eddyDiffusivity<TurbulenceThermophysicalTransportModel>::correct()
|
||||
void eddyDiffusivity<TurbulenceThermophysicalTransportModel>::predict()
|
||||
{
|
||||
TurbulenceThermophysicalTransportModel::correct();
|
||||
TurbulenceThermophysicalTransportModel::predict();
|
||||
correctAlphat();
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Correct the eddyDiffusivity viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -205,9 +205,9 @@ unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::divj
|
||||
|
||||
template<class TurbulenceThermophysicalTransportModel>
|
||||
void unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::
|
||||
correct()
|
||||
predict()
|
||||
{
|
||||
TurbulenceThermophysicalTransportModel::correct();
|
||||
TurbulenceThermophysicalTransportModel::predict();
|
||||
correctAlphat();
|
||||
}
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
|
||||
|
||||
//- Correct the unityLewisEddyDiffusivity viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -434,9 +434,16 @@ Foam::solidThermophysicalTransportModels::anisotropic::divq
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidThermophysicalTransportModels::anisotropic::correct()
|
||||
void Foam::solidThermophysicalTransportModels::anisotropic::predict()
|
||||
{
|
||||
solidThermophysicalTransportModel::correct();
|
||||
solidThermophysicalTransportModel::predict();
|
||||
|
||||
// Recalculate zonesPatchFaces if they have been deleted
|
||||
// following mesh changes
|
||||
if (!zonesPatchFaces_.size())
|
||||
{
|
||||
setZonesPatchFaces();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -451,7 +458,8 @@ void Foam::solidThermophysicalTransportModels::anisotropic::topoChange
|
||||
const polyTopoChangeMap& map
|
||||
)
|
||||
{
|
||||
setZonesPatchFaces();
|
||||
// Delete the cached zonesPatchFaces, will be re-created in predict
|
||||
zonesPatchFaces_.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -460,7 +468,8 @@ void Foam::solidThermophysicalTransportModels::anisotropic::mapMesh
|
||||
const polyMeshMap& map
|
||||
)
|
||||
{
|
||||
setZonesPatchFaces();
|
||||
// Delete the cached zonesPatchFaces, will be re-created in predict
|
||||
zonesPatchFaces_.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -469,7 +478,8 @@ void Foam::solidThermophysicalTransportModels::anisotropic::distribute
|
||||
const polyDistributionMap& map
|
||||
)
|
||||
{
|
||||
setZonesPatchFaces();
|
||||
// Delete the cached zonesPatchFaces, will be re-created in predict
|
||||
zonesPatchFaces_.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -187,7 +187,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Correct the anisotropic viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
|
||||
|
||||
// Mesh changes
|
||||
|
||||
@ -117,9 +117,9 @@ Foam::solidThermophysicalTransportModels::isotropic::divq
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidThermophysicalTransportModels::isotropic::correct()
|
||||
void Foam::solidThermophysicalTransportModels::isotropic::predict()
|
||||
{
|
||||
solidThermophysicalTransportModel::correct();
|
||||
solidThermophysicalTransportModel::predict();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
|
||||
|
||||
//- Correct the isotropic viscosity
|
||||
virtual void correct();
|
||||
virtual void predict();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -148,6 +148,10 @@ bool Foam::solidThermophysicalTransportModel::read()
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidThermophysicalTransportModel::predict()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::solidThermophysicalTransportModel::correct()
|
||||
{}
|
||||
|
||||
|
||||
@ -158,9 +158,13 @@ public:
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const = 0;
|
||||
|
||||
//- Predict the transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict() = 0;
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the transport coefficients
|
||||
virtual void correct() = 0;
|
||||
virtual void correct();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -68,6 +68,10 @@ bool Foam::thermophysicalTransportModel::read()
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermophysicalTransportModel::predict()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::thermophysicalTransportModel::correct()
|
||||
{}
|
||||
|
||||
|
||||
@ -105,9 +105,13 @@ public:
|
||||
//- Return the source term for the energy equation
|
||||
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const = 0;
|
||||
|
||||
//- Predict the transport coefficients if possible
|
||||
// without solving thermophysical transport model equations
|
||||
virtual void predict() = 0;
|
||||
|
||||
//- Solve the thermophysical transport model equations
|
||||
// and correct the transport coefficients
|
||||
virtual void correct() = 0;
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
@ -162,11 +162,8 @@ public:
|
||||
//- Construct and solve the pressure equation in the PISO loop
|
||||
virtual void pressureCorrector() = 0;
|
||||
|
||||
//- Correct the momentum transport modelling
|
||||
virtual void momentumTransportCorrector() = 0;
|
||||
|
||||
//- Correct the thermophysical transport modelling
|
||||
virtual void thermophysicalTransportCorrector() = 0;
|
||||
//- Correct the momentum and thermophysical transport modelling
|
||||
virtual void postCorrector() = 0;
|
||||
|
||||
//- Called after the PIMPLE loop at the end of the time-step
|
||||
virtual void postSolve() = 0;
|
||||
|
||||
Reference in New Issue
Block a user