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:
Henry Weller
2022-12-15 14:59:44 +00:00
parent d0b7f7cd47
commit ce42ebc5d7
62 changed files with 207 additions and 136 deletions

View File

@ -123,6 +123,7 @@ int main(int argc, char *argv[])
while (pimple.loop())
{
fvModels.correct();
thermophysicalTransport.predict();
#include "UEqn.H"

View File

@ -173,6 +173,7 @@ int main(int argc, char *argv[])
while (pimple.loop())
{
fvModels.correct();
thermophysicalTransport->predict();
#include "UEqn.H"

View File

@ -157,6 +157,7 @@ int main(int argc, char *argv[])
}
fvModels.correct();
thermophysicalTransport.predict();
#include "UEqn.H"
#include "ftEqn.H"

View File

@ -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));

View File

@ -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"

View File

@ -183,8 +183,7 @@ int main(int argc, char *argv[])
forAll(solvers, i)
{
solvers[i].momentumTransportCorrector();
solvers[i].thermophysicalTransportCorrector();
solvers[i].postCorrector();
}
}

View File

@ -138,8 +138,7 @@ int main(int argc, char *argv[])
solver.momentumPredictor();
solver.thermophysicalPredictor();
solver.pressureCorrector();
solver.momentumTransportCorrector();
solver.thermophysicalTransportCorrector();
solver.postCorrector();
}
solver.postSolve();

View File

@ -215,6 +215,10 @@ Foam::compressibleInterPhaseThermophysicalTransportModel::divq
}
void Foam::compressibleInterPhaseThermophysicalTransportModel::predict()
{}
void Foam::compressibleInterPhaseThermophysicalTransportModel::correct()
{}

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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()
{}

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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

View File

@ -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();

View File

@ -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();

View File

@ -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)

View File

@ -295,9 +295,9 @@ heatTransfer() const
template<class BasePhaseSystem>
void Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
correctEnergyTransport()
correctThermophysicalTransport()
{
BasePhaseSystem::correctEnergyTransport();
BasePhaseSystem::correctThermophysicalTransport();
correctInterfaceThermo();
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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();

View File

@ -180,11 +180,11 @@ void Foam::phaseModel::correctSpecies()
{}
void Foam::phaseModel::correctTurbulence()
void Foam::phaseModel::correctMomentumTransport()
{}
void Foam::phaseModel::correctEnergyTransport()
void Foam::phaseModel::correctThermophysicalTransport()
{}

View File

@ -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();

View File

@ -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();
}
}

View File

@ -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();

View File

@ -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()

View File

@ -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();

View File

@ -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();
}

View File

@ -144,7 +144,7 @@ public:
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
//- Update the diffusion coefficients
virtual void correct();
virtual void predict();
// Mesh changes

View File

@ -50,7 +50,7 @@ FickianFourier
)
{
read();
this->correct();
this->predict();
this->printCoeffs(typeName);
}

View File

@ -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();
}

View File

@ -126,7 +126,7 @@ public:
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
//- Correct the Fourier viscosity
virtual void correct();
virtual void predict();
};

View File

@ -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();

View File

@ -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();
};

View File

@ -50,7 +50,7 @@ MaxwellStefanFourier
)
{
read();
this->correct();
this->predict();
this->printCoeffs(typeName);
}

View File

@ -161,6 +161,16 @@ bool Foam::laminarThermophysicalTransportModel
}
template<class BasicThermophysicalTransportModel>
void Foam::laminarThermophysicalTransportModel
<
BasicThermophysicalTransportModel
>::predict()
{
BasicThermophysicalTransportModel::predict();
}
template<class BasicThermophysicalTransportModel>
void Foam::laminarThermophysicalTransportModel
<

View File

@ -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();

View File

@ -154,12 +154,12 @@ divj(volScalarField& Yi) const
template<class BasicThermophysicalTransportModel>
void unityLewisFourier<BasicThermophysicalTransportModel>::correct()
void unityLewisFourier<BasicThermophysicalTransportModel>::predict()
{
laminarThermophysicalTransportModel
<
BasicThermophysicalTransportModel
>::correct();
>::predict();
}

View File

@ -143,7 +143,7 @@ public:
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
//- Correct the unityLewisFourier viscosity
virtual void correct();
virtual void predict();
};

View File

@ -52,7 +52,7 @@ FickianEddyDiffusivity
Sct_("Sct", dimless, this->coeffDict_)
{
read();
this->correct();
this->predict();
this->printCoeffs(typeName);
}

View File

@ -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()

View File

@ -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();

View File

@ -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()

View File

@ -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();

View File

@ -203,9 +203,9 @@ eddyDiffusivity<TurbulenceThermophysicalTransportModel>::divj
template<class TurbulenceThermophysicalTransportModel>
void eddyDiffusivity<TurbulenceThermophysicalTransportModel>::correct()
void eddyDiffusivity<TurbulenceThermophysicalTransportModel>::predict()
{
TurbulenceThermophysicalTransportModel::correct();
TurbulenceThermophysicalTransportModel::predict();
correctAlphat();
}

View File

@ -183,7 +183,7 @@ public:
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
//- Correct the eddyDiffusivity viscosity
virtual void correct();
virtual void predict();
};

View File

@ -205,9 +205,9 @@ unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::divj
template<class TurbulenceThermophysicalTransportModel>
void unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::
correct()
predict()
{
TurbulenceThermophysicalTransportModel::correct();
TurbulenceThermophysicalTransportModel::predict();
correctAlphat();
}

View File

@ -205,7 +205,7 @@ public:
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
//- Correct the unityLewisEddyDiffusivity viscosity
virtual void correct();
virtual void predict();
};

View File

@ -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();
}

View File

@ -187,7 +187,7 @@ public:
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
//- Correct the anisotropic viscosity
virtual void correct();
virtual void predict();
// Mesh changes

View File

@ -117,9 +117,9 @@ Foam::solidThermophysicalTransportModels::isotropic::divq
}
void Foam::solidThermophysicalTransportModels::isotropic::correct()
void Foam::solidThermophysicalTransportModels::isotropic::predict()
{
solidThermophysicalTransportModel::correct();
solidThermophysicalTransportModel::predict();
}

View File

@ -92,7 +92,7 @@ public:
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
//- Correct the isotropic viscosity
virtual void correct();
virtual void predict();
};

View File

@ -148,6 +148,10 @@ bool Foam::solidThermophysicalTransportModel::read()
}
void Foam::solidThermophysicalTransportModel::predict()
{}
void Foam::solidThermophysicalTransportModel::correct()
{}

View File

@ -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();
};

View File

@ -68,6 +68,10 @@ bool Foam::thermophysicalTransportModel::read()
}
void Foam::thermophysicalTransportModel::predict()
{}
void Foam::thermophysicalTransportModel::correct()
{}

View File

@ -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

View File

@ -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;