Commit 9221cd3c authored by Henry Weller's avatar Henry Weller
Browse files

compressibleInterFoam, multiphaseMixtureThermo: Corrected laminar mixture kinematic viscosity

parent 3ba163b5
......@@ -267,6 +267,26 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::CpByCpv
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::nu() const
{
return mu()/(alpha1()*thermo1_->rho() + alpha2()*thermo2_->rho());
}
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::nu
(
const label patchi
) const
{
return
mu(patchi)
/(
alpha1().boundaryField()[patchi]*thermo1_->rho(patchi)
+ alpha2().boundaryField()[patchi]*thermo2_->rho(patchi)
);
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::kappa() const
{
return alpha1()*thermo1_->kappa() + alpha2()*thermo2_->kappa();
......
......@@ -239,6 +239,12 @@ public:
// Fields derived from transport state variables
//- Kinematic viscosity of mixture [m^2/s]
virtual tmp<volScalarField> nu() const;
//- Kinematic viscosity of mixture for patch [m^2/s]
virtual tmp<scalarField> nu(const label patchi) const;
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const;
......
......@@ -303,6 +303,28 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::rho() const
}
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::rho
(
const label patchi
) const
{
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();
tmp<scalarField> trho
(
phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi)
);
for (++phasei; phasei != phases_.end(); ++phasei)
{
trho() +=
phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi);
}
return trho;
}
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cp() const
{
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();
......@@ -501,6 +523,21 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::CpByCpv
}
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::nu() const
{
return mu()/rho();
}
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::nu
(
const label patchi
) const
{
return mu(patchi)/rho(patchi);
}
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::kappa() const
{
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();
......
......@@ -315,6 +315,9 @@ public:
//- Density [kg/m^3]
virtual tmp<volScalarField> rho() const;
//- Density for patch [kg/m^3]
virtual tmp<scalarField> rho(const label patchi) const;
//- Heat capacity at constant pressure [J/kg/K]
virtual tmp<volScalarField> Cp() const;
......@@ -373,6 +376,12 @@ public:
// Fields derived from transport state variables
//- Kinematic viscosity of mixture [m^2/s]
virtual tmp<volScalarField> nu() const;
//- Kinematic viscosity of mixture for patch [m^2/s]
virtual tmp<scalarField> nu(const label patchi) const;
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment