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
|
// and for more than two phases must be specified
|
||||||
const phaseModel& continuousPhase() const;
|
const phaseModel& continuousPhase() const;
|
||||||
|
|
||||||
|
//- Return the phase-pressure'
|
||||||
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
|
tmp<volScalarField> pPrime() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -203,10 +207,6 @@ public:
|
|||||||
//- Return the stress tensor [m^2/s^2]
|
//- Return the stress tensor [m^2/s^2]
|
||||||
virtual tmp<volSymmTensorField> sigma() const;
|
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'
|
//- Return the face-phase-pressure'
|
||||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
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::tmp<Foam::surfaceScalarField>
|
||||||
Foam::RASModels::phasePressureModel::pPrimef() const
|
Foam::RASModels::phasePressureModel::pPrimef() const
|
||||||
{
|
{
|
||||||
tmp<surfaceScalarField> tpPrime
|
return surfaceScalarField::New
|
||||||
(
|
|
||||||
surfaceScalarField::New
|
|
||||||
(
|
(
|
||||||
IOobject::groupName("pPrimef", U_.group()),
|
IOobject::groupName("pPrimef", U_.group()),
|
||||||
g0_
|
fvc::interpolate(pPrime())
|
||||||
*min
|
|
||||||
(
|
|
||||||
exp(preAlphaExp_
|
|
||||||
*(fvc::interpolate(alpha_) - phase_.alphaMax())),
|
|
||||||
expMax_
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
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()
|
void correctNut()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//- Return the phase-pressure'
|
||||||
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
|
tmp<volScalarField> pPrime() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -149,10 +153,6 @@ public:
|
|||||||
//- Return the stress tensor [m^2/s^2]
|
//- Return the stress tensor [m^2/s^2]
|
||||||
virtual tmp<volSymmTensorField> sigma() const;
|
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'
|
//- Return the face-phase-pressure'
|
||||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
virtual tmp<surfaceScalarField> pPrimef() const;
|
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||||
|
|||||||
@ -381,9 +381,9 @@ public:
|
|||||||
//- Return the turbulent kinetic energy
|
//- Return the turbulent kinetic energy
|
||||||
virtual tmp<volScalarField> k() const = 0;
|
virtual tmp<volScalarField> k() const = 0;
|
||||||
|
|
||||||
//- Return the phase-pressure'
|
//- Return the face-phase-pressure'
|
||||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
// (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>
|
template<class BasePhaseModel>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::surfaceScalarField>
|
||||||
Foam::MovingPhaseModel<BasePhaseModel>::pPrime() const
|
Foam::MovingPhaseModel<BasePhaseModel>::pPrimef() const
|
||||||
{
|
{
|
||||||
return momentumTransport_->pPrime();
|
return momentumTransport_->pPrimef();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -274,9 +274,9 @@ public:
|
|||||||
//- Return the turbulent kinetic energy
|
//- Return the turbulent kinetic energy
|
||||||
virtual tmp<volScalarField> k() const;
|
virtual tmp<volScalarField> k() const;
|
||||||
|
|
||||||
//- Return the phase-pressure'
|
//- Return the face-phase-pressure'
|
||||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
virtual tmp<volScalarField> pPrime() const;
|
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||||
|
|
||||||
|
|
||||||
// Thermophysical transport
|
// Thermophysical transport
|
||||||
|
|||||||
@ -357,14 +357,14 @@ Foam::StationaryPhaseModel<BasePhaseModel>::k() const
|
|||||||
|
|
||||||
|
|
||||||
template<class BasePhaseModel>
|
template<class BasePhaseModel>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::surfaceScalarField>
|
||||||
Foam::StationaryPhaseModel<BasePhaseModel>::pPrime() const
|
Foam::StationaryPhaseModel<BasePhaseModel>::pPrimef() const
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Cannot access the pPrime of a stationary phase"
|
<< "Cannot access the pPrime of a stationary phase"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
return volScalarField::null();
|
return surfaceScalarField::null();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -166,9 +166,9 @@ public:
|
|||||||
//- Return the turbulent kinetic energy
|
//- Return the turbulent kinetic energy
|
||||||
virtual tmp<volScalarField> k() const;
|
virtual tmp<volScalarField> k() const;
|
||||||
|
|
||||||
//- Return the phase-pressure'
|
//- Return the face-phase-pressure'
|
||||||
// (derivative of phase-pressure w.r.t. phase-fraction)
|
// (derivative of phase-pressure w.r.t. phase-fraction)
|
||||||
virtual tmp<volScalarField> pPrime() const;
|
virtual tmp<surfaceScalarField> pPrimef() const;
|
||||||
|
|
||||||
|
|
||||||
// Thermophysical transport
|
// Thermophysical transport
|
||||||
|
|||||||
@ -256,13 +256,12 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
|
|||||||
forAll(this->movingPhases(), movingPhasei)
|
forAll(this->movingPhases(), movingPhasei)
|
||||||
{
|
{
|
||||||
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
||||||
const tmp<volScalarField> pPrime(phase.pPrime());
|
|
||||||
|
|
||||||
addField
|
addField
|
||||||
(
|
(
|
||||||
phase,
|
phase,
|
||||||
"F",
|
"F",
|
||||||
fvc::interpolate(pPrime(), pPrime().name())
|
phase.pPrimef()
|
||||||
*fvc::snGrad(phase)*this->mesh_.magSf(),
|
*fvc::snGrad(phase)*this->mesh_.magSf(),
|
||||||
Fs
|
Fs
|
||||||
);
|
);
|
||||||
@ -382,7 +381,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ffs() const
|
|||||||
(
|
(
|
||||||
phase,
|
phase,
|
||||||
"Ff",
|
"Ff",
|
||||||
fvc::interpolate(phase.pPrime())
|
phase.pPrimef()
|
||||||
*fvc::snGrad(phase)*this->mesh_.magSf(),
|
*fvc::snGrad(phase)*this->mesh_.magSf(),
|
||||||
Ffs
|
Ffs
|
||||||
);
|
);
|
||||||
@ -983,13 +982,13 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::alphaDByAf
|
|||||||
forAll(this->movingPhases(), movingPhasei)
|
forAll(this->movingPhases(), movingPhasei)
|
||||||
{
|
{
|
||||||
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
const phaseModel& phase = this->movingPhases()[movingPhasei];
|
||||||
const tmp<volScalarField> pPrime(phase.pPrime());
|
|
||||||
|
|
||||||
addTmpField
|
addTmpField
|
||||||
(
|
(
|
||||||
alphaDByAf,
|
alphaDByAf,
|
||||||
fvc::interpolate(max(phase, scalar(0)))
|
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