reactingTwoPhaseEulerFoam: Add fvOption handling to the continuity error

correction in MovingPhaseModel<BasePhaseModel>::correct()
This commit is contained in:
Henry Weller
2015-06-25 22:29:08 +01:00
parent d9b186e9d1
commit 5d3d40392f
7 changed files with 9 additions and 15 deletions

View File

@ -1,7 +0,0 @@
phase1.continuityError() =
fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1)
- (fvOptions(alpha1, rho1)&rho1);
phase2.continuityError() =
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2);

View File

@ -89,7 +89,7 @@ tmp<surfaceScalarField> phiF2;
while (pimple.correct()) while (pimple.correct())
{ {
// Update continuity errors due to temperature changes // Update continuity errors due to temperature changes
#include "correctContErrs.H" fluid.correct();
// Correct fixed-flux BCs to be consistent with the velocity BCs // Correct fixed-flux BCs to be consistent with the velocity BCs
MRF.correctBoundaryFlux(U1, phi1); MRF.correctBoundaryFlux(U1, phi1);

View File

@ -93,7 +93,7 @@ tmp<surfaceScalarField> Ff2;
while (pimple.correct()) while (pimple.correct())
{ {
// Update continuity errors due to temperature changes // Update continuity errors due to temperature changes
#include "correctContErrs.H" fluid.correct();
surfaceScalarField rhof1(fvc::interpolate(rho1)); surfaceScalarField rhof1(fvc::interpolate(rho1));
surfaceScalarField rhof2(fvc::interpolate(rho2)); surfaceScalarField rhof2(fvc::interpolate(rho2));

View File

@ -217,8 +217,11 @@ void Foam::MovingPhaseModel<BasePhaseModel>::correct()
this->fluid().MRF().correctBoundaryVelocity(U_); this->fluid().MRF().correctBoundaryVelocity(U_);
volScalarField& rho = this->thermo().rho();
continuityError_ = continuityError_ =
fvc::ddt(*this, this->thermo().rho()) + fvc::div(alphaRhoPhi_); fvc::ddt(*this, rho) + fvc::div(alphaRhoPhi_)
- (this->fluid().fvOptions()(*this, rho)&rho);
} }

View File

@ -179,7 +179,7 @@ protected:
IOMRFZoneList MRF_; IOMRFZoneList MRF_;
//- Optional FV-options //- Optional FV-options
fv::IOoptionList fvOptions_; mutable fv::IOoptionList fvOptions_;
//- Blending methods //- Blending methods
blendingMethodTable blendingMethods_; blendingMethodTable blendingMethods_;
@ -371,7 +371,7 @@ public:
inline const IOMRFZoneList& MRF() const; inline const IOMRFZoneList& MRF() const;
//- Optional FV-options //- Optional FV-options
inline fv::IOoptionList& fvOptions(); inline fv::IOoptionList& fvOptions() const;
//- Access a sub model between a phase pair //- Access a sub model between a phase pair
template <class modelType> template <class modelType>

View File

@ -61,7 +61,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const
} }
inline Foam::fv::IOoptionList& Foam::phaseSystem::fvOptions() inline Foam::fv::IOoptionList& Foam::phaseSystem::fvOptions() const
{ {
return fvOptions_; return fvOptions_;
} }

View File

@ -94,8 +94,6 @@ int main(int argc, char *argv[])
fluid.solve(); fluid.solve();
fluid.correct(); fluid.correct();
#include "correctContErrs.H"
#include "YEqns.H" #include "YEqns.H"
if (faceMomentum) if (faceMomentum)