diff --git a/applications/modules/multiphaseEuler/momentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/modules/multiphaseEuler/momentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H index 7384a1a032..c431c38866 100644 --- a/applications/modules/multiphaseEuler/momentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H +++ b/applications/modules/multiphaseEuler/momentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H @@ -145,6 +145,10 @@ class kineticTheoryModel // and for more than two phases must be specified const phaseModel& continuousPhase() const; + //- Return the phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + tmp pPrime() const; + public: @@ -203,10 +207,6 @@ public: //- Return the stress tensor [m^2/s^2] virtual tmp sigma() const; - //- Return the phase-pressure' - // (derivative of phase-pressure w.r.t. phase-fraction) - virtual tmp pPrime() const; - //- Return the face-phase-pressure' // (derivative of phase-pressure w.r.t. phase-fraction) virtual tmp pPrimef() const; diff --git a/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.C b/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.C index 6b53ce5949..8eae3ed7c3 100644 --- a/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.C +++ b/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.C @@ -174,36 +174,47 @@ Foam::RASModels::phasePressureModel::pPrime() const } +// Foam::tmp +// Foam::RASModels::phasePressureModel::pPrimef() const +// { +// tmp tpPrime +// ( +// surfaceScalarField::New +// ( +// IOobject::groupName("pPrimef", U_.group()), +// g0_ +// *min +// ( +// exp(preAlphaExp_ +// *(fvc::interpolate(alpha_, "hmm") - phase_.alphaMax())), +// expMax_ +// ) +// ) +// ); + +// surfaceScalarField::Boundary& bpPrime = +// tpPrime.ref().boundaryFieldRef(); + +// forAll(bpPrime, patchi) +// { +// if (!bpPrime[patchi].coupled()) +// { +// bpPrime[patchi] == 0; +// } +// } + +// return tpPrime; +// } + + Foam::tmp Foam::RASModels::phasePressureModel::pPrimef() const { - tmp tpPrime + return surfaceScalarField::New ( - surfaceScalarField::New - ( - IOobject::groupName("pPrimef", U_.group()), - g0_ - *min - ( - exp(preAlphaExp_ - *(fvc::interpolate(alpha_) - phase_.alphaMax())), - expMax_ - ) - ) + IOobject::groupName("pPrimef", U_.group()), + fvc::interpolate(pPrime()) ); - - surfaceScalarField::Boundary& bpPrime = - tpPrime.ref().boundaryFieldRef(); - - forAll(bpPrime, patchi) - { - if (!bpPrime[patchi].coupled()) - { - bpPrime[patchi] == 0; - } - } - - return tpPrime; } diff --git a/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.H b/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.H index 7a953712a1..e03b8e29ed 100644 --- a/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.H +++ b/applications/modules/multiphaseEuler/momentumTransportModels/phasePressureModel/phasePressureModel.H @@ -91,6 +91,10 @@ class phasePressureModel void correctNut() {} + //- Return the phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + tmp pPrime() const; + public: @@ -149,10 +153,6 @@ public: //- Return the stress tensor [m^2/s^2] virtual tmp sigma() const; - //- Return the phase-pressure' - // (derivative of phase-pressure w.r.t. phase-fraction) - virtual tmp pPrime() const; - //- Return the face-phase-pressure' // (derivative of phase-pressure w.r.t. phase-fraction) virtual tmp pPrimef() const; diff --git a/applications/modules/multiphaseEuler/phaseSystem/phaseModel/phaseModel.H b/applications/modules/multiphaseEuler/phaseSystem/phaseModel/phaseModel.H index b7f591d294..3a9109c9a0 100644 --- a/applications/modules/multiphaseEuler/phaseSystem/phaseModel/phaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystem/phaseModel/phaseModel.H @@ -381,9 +381,9 @@ public: //- Return the turbulent kinetic energy virtual tmp k() const = 0; - //- Return the phase-pressure' - // (derivative of phase-pressure w.r.t. phase-fraction) - virtual tmp pPrime() const = 0; + //- Return the face-phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrimef() const = 0; }; diff --git a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.C b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.C index 049c339224..21407d0b91 100644 --- a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.C @@ -574,10 +574,10 @@ Foam::MovingPhaseModel::k() const template -Foam::tmp -Foam::MovingPhaseModel::pPrime() const +Foam::tmp +Foam::MovingPhaseModel::pPrimef() const { - return momentumTransport_->pPrime(); + return momentumTransport_->pPrimef(); } diff --git a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.H b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.H index b1e2463087..6091723709 100644 --- a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/MovingPhaseModel/MovingPhaseModel.H @@ -274,9 +274,9 @@ public: //- Return the turbulent kinetic energy virtual tmp k() const; - //- Return the phase-pressure' - // (derivative of phase-pressure w.r.t. phase-fraction) - virtual tmp pPrime() const; + //- Return the face-phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrimef() const; // Thermophysical transport diff --git a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.C b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.C index 5d84e7ff53..80f78be5c1 100644 --- a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.C +++ b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.C @@ -357,14 +357,14 @@ Foam::StationaryPhaseModel::k() const template -Foam::tmp -Foam::StationaryPhaseModel::pPrime() const +Foam::tmp +Foam::StationaryPhaseModel::pPrimef() const { FatalErrorInFunction << "Cannot access the pPrime of a stationary phase" << abort(FatalError); - return volScalarField::null(); + return surfaceScalarField::null(); } diff --git a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.H b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.H index 3d4b7ded34..6bfbb9823c 100644 --- a/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.H +++ b/applications/modules/multiphaseEuler/phaseSystem/phaseModels/StationaryPhaseModel/StationaryPhaseModel.H @@ -166,9 +166,9 @@ public: //- Return the turbulent kinetic energy virtual tmp k() const; - //- Return the phase-pressure' - // (derivative of phase-pressure w.r.t. phase-fraction) - virtual tmp pPrime() const; + //- Return the face-phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrimef() const; // Thermophysical transport diff --git a/applications/modules/multiphaseEuler/phaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/modules/multiphaseEuler/phaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 0e92dac3c4..9c6308af97 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/modules/multiphaseEuler/phaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -256,13 +256,12 @@ Foam::MomentumTransferPhaseSystem::Fs() const forAll(this->movingPhases(), movingPhasei) { const phaseModel& phase = this->movingPhases()[movingPhasei]; - const tmp pPrime(phase.pPrime()); addField ( phase, "F", - fvc::interpolate(pPrime(), pPrime().name()) + phase.pPrimef() *fvc::snGrad(phase)*this->mesh_.magSf(), Fs ); @@ -382,7 +381,7 @@ Foam::MomentumTransferPhaseSystem::Ffs() const ( phase, "Ff", - fvc::interpolate(phase.pPrime()) + phase.pPrimef() *fvc::snGrad(phase)*this->mesh_.magSf(), Ffs ); @@ -983,13 +982,13 @@ Foam::MomentumTransferPhaseSystem::alphaDByAf forAll(this->movingPhases(), movingPhasei) { const phaseModel& phase = this->movingPhases()[movingPhasei]; - const tmp pPrime(phase.pPrime()); addTmpField ( alphaDByAf, fvc::interpolate(max(phase, scalar(0))) - *fvc::interpolate(rAs[phase.index()]*pPrime(), pPrime().name()) + *fvc::interpolate(rAs[phase.index()]) + *phase.pPrimef() ); }