mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
reactingEulerFoam: Mixture properties for moving phases only
The calculations for mixture rho and U have been changed so that they represent phase-averaged quantities over the moving phases only. The mixture density is used as part of the pressure solution to calculate buoyancy forces. The pressure within a stationary phase is considered to be decoupled from the moving phases; i.e., it is considered self-supporting. Therefore the stationary phase density should not form a part of buoyancy calculations. This change to the definition of mixture density ensures this.
This commit is contained in:
@ -237,33 +237,55 @@ Foam::phaseSystem::~phaseSystem()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::phaseSystem::rho() const
|
||||
{
|
||||
tmp<volScalarField> tmpRho
|
||||
(
|
||||
phaseModels_[0]*phaseModels_[0].rho()
|
||||
);
|
||||
const label nMovingPhases = movingPhaseModels_.size();
|
||||
|
||||
for (label phasei=1; phasei<phaseModels_.size(); phasei++)
|
||||
volScalarField rho(movingPhaseModels_[0]*movingPhaseModels_[0].rho());
|
||||
for (label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
|
||||
{
|
||||
tmpRho.ref() += phaseModels_[phasei]*phaseModels_[phasei].rho();
|
||||
rho +=
|
||||
movingPhaseModels_[movingPhasei]
|
||||
*movingPhaseModels_[movingPhasei].rho();
|
||||
}
|
||||
|
||||
return tmpRho;
|
||||
if (stationaryPhaseModels_.empty())
|
||||
{
|
||||
return rho;
|
||||
}
|
||||
|
||||
volScalarField alpha(movingPhaseModels_[0]);
|
||||
for (label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
|
||||
{
|
||||
alpha += movingPhaseModels_[movingPhasei];
|
||||
}
|
||||
|
||||
return rho/alpha;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::phaseSystem::U() const
|
||||
{
|
||||
tmp<volVectorField> tmpU
|
||||
(
|
||||
phaseModels_[0]*phaseModels_[0].U()
|
||||
);
|
||||
const label nMovingPhases = movingPhaseModels_.size();
|
||||
|
||||
for (label phasei=1; phasei<phaseModels_.size(); phasei++)
|
||||
volVectorField U(movingPhaseModels_[0]*movingPhaseModels_[0].U());
|
||||
for (label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
|
||||
{
|
||||
tmpU.ref() += phaseModels_[phasei]*phaseModels_[phasei].U();
|
||||
U +=
|
||||
movingPhaseModels_[movingPhasei]
|
||||
*movingPhaseModels_[movingPhasei].U();
|
||||
}
|
||||
|
||||
return tmpU;
|
||||
if (stationaryPhaseModels_.empty())
|
||||
{
|
||||
return U;
|
||||
}
|
||||
|
||||
volScalarField alpha(movingPhaseModels_[0]);
|
||||
for (label movingPhasei = 1; movingPhasei < nMovingPhases; ++ movingPhasei)
|
||||
{
|
||||
alpha += movingPhaseModels_[movingPhasei];
|
||||
}
|
||||
|
||||
return U/alpha;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user