multiphaseEuler: Replaced pPrime() with pPrimef()
to provide greater flexibility in the treatment of the face pPrime for particle phase pressure models.
This commit is contained in:
@ -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<volScalarField> pPrime() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -203,10 +207,6 @@ public:
|
||||
//- Return the stress tensor [m^2/s^2]
|
||||
virtual tmp<volSymmTensorField> sigma() const;
|
||||
|
||||
//- Return the phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<volScalarField> pPrime() const;
|
||||
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
@ -174,36 +174,47 @@ Foam::RASModels::phasePressureModel::pPrime() const
|
||||
}
|
||||
|
||||
|
||||
// Foam::tmp<Foam::surfaceScalarField>
|
||||
// Foam::RASModels::phasePressureModel::pPrimef() const
|
||||
// {
|
||||
// tmp<surfaceScalarField> 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::surfaceScalarField>
|
||||
Foam::RASModels::phasePressureModel::pPrimef() const
|
||||
{
|
||||
tmp<surfaceScalarField> tpPrime
|
||||
(
|
||||
surfaceScalarField::New
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
IOobject::groupName("pPrimef", U_.group()),
|
||||
g0_
|
||||
*min
|
||||
(
|
||||
exp(preAlphaExp_
|
||||
*(fvc::interpolate(alpha_) - phase_.alphaMax())),
|
||||
expMax_
|
||||
)
|
||||
)
|
||||
fvc::interpolate(pPrime())
|
||||
);
|
||||
|
||||
surfaceScalarField::Boundary& bpPrime =
|
||||
tpPrime.ref().boundaryFieldRef();
|
||||
|
||||
forAll(bpPrime, patchi)
|
||||
{
|
||||
if (!bpPrime[patchi].coupled())
|
||||
{
|
||||
bpPrime[patchi] == 0;
|
||||
}
|
||||
}
|
||||
|
||||
return tpPrime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -91,6 +91,10 @@ class phasePressureModel
|
||||
void correctNut()
|
||||
{}
|
||||
|
||||
//- Return the phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
tmp<volScalarField> pPrime() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -149,10 +153,6 @@ public:
|
||||
//- Return the stress tensor [m^2/s^2]
|
||||
virtual tmp<volSymmTensorField> sigma() const;
|
||||
|
||||
//- Return the phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<volScalarField> pPrime() const;
|
||||
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
@ -381,9 +381,9 @@ public:
|
||||
//- Return the turbulent kinetic energy
|
||||
virtual tmp<volScalarField> k() const = 0;
|
||||
|
||||
//- Return the phase-pressure'
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<volScalarField> pPrime() const = 0;
|
||||
virtual tmp<surfaceScalarField> pPrimef() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -574,10 +574,10 @@ Foam::MovingPhaseModel<BasePhaseModel>::k() const
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::MovingPhaseModel<BasePhaseModel>::pPrime() const
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::MovingPhaseModel<BasePhaseModel>::pPrimef() const
|
||||
{
|
||||
return momentumTransport_->pPrime();
|
||||
return momentumTransport_->pPrimef();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -274,9 +274,9 @@ public:
|
||||
//- Return the turbulent kinetic energy
|
||||
virtual tmp<volScalarField> k() const;
|
||||
|
||||
//- Return the phase-pressure'
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<volScalarField> pPrime() const;
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
|
||||
// Thermophysical transport
|
||||
|
||||
@ -357,14 +357,14 @@ Foam::StationaryPhaseModel<BasePhaseModel>::k() const
|
||||
|
||||
|
||||
template<class BasePhaseModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::StationaryPhaseModel<BasePhaseModel>::pPrime() const
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::StationaryPhaseModel<BasePhaseModel>::pPrimef() const
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot access the pPrime of a stationary phase"
|
||||
<< abort(FatalError);
|
||||
|
||||
return volScalarField::null();
|
||||
return surfaceScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -166,9 +166,9 @@ public:
|
||||
//- Return the turbulent kinetic energy
|
||||
virtual tmp<volScalarField> k() const;
|
||||
|
||||
//- Return the phase-pressure'
|
||||
//- Return the face-phase-pressure'
|
||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||
virtual tmp<volScalarField> pPrime() const;
|
||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||
|
||||
|
||||
// Thermophysical transport
|
||||
|
||||
@ -256,13 +256,12 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
|
||||
forAll(this->movingPhases(), movingPhasei)
|
||||
{
|
||||
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
||||
const tmp<volScalarField> 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<BasePhaseSystem>::Ffs() const
|
||||
(
|
||||
phase,
|
||||
"Ff",
|
||||
fvc::interpolate(phase.pPrime())
|
||||
phase.pPrimef()
|
||||
*fvc::snGrad(phase)*this->mesh_.magSf(),
|
||||
Ffs
|
||||
);
|
||||
@ -983,13 +982,13 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::alphaDByAf
|
||||
forAll(this->movingPhases(), movingPhasei)
|
||||
{
|
||||
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
||||
const tmp<volScalarField> 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()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user