mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Corrected handling of density.
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||||
);
|
);
|
||||||
|
|
||||||
pZones.addEnthalpySource(thermo, hEqn);
|
pZones.addEnthalpySource(thermo, rho, hEqn);
|
||||||
|
|
||||||
hEqn.relax();
|
hEqn.relax();
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,7 @@ Foam::thermalPorousZone::thermalPorousZone
|
|||||||
void Foam::thermalPorousZone::addEnthalpySource
|
void Foam::thermalPorousZone::addEnthalpySource
|
||||||
(
|
(
|
||||||
const basicThermo& thermo,
|
const basicThermo& thermo,
|
||||||
|
const volScalarField& rho,
|
||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -85,7 +86,6 @@ void Foam::thermalPorousZone::addEnthalpySource
|
|||||||
const scalarField& V = mesh().V();
|
const scalarField& V = mesh().V();
|
||||||
scalarField& hDiag = hEqn.diag();
|
scalarField& hDiag = hEqn.diag();
|
||||||
scalarField& hSource = hEqn.source();
|
scalarField& hSource = hEqn.source();
|
||||||
const scalarField& rho = thermo.rho();
|
|
||||||
|
|
||||||
scalarField hZone = thermo.h(scalarField(cells.size(), T_.value()), cells);
|
scalarField hZone = thermo.h(scalarField(cells.size(), T_.value()), cells);
|
||||||
scalar rate = 1e6;
|
scalar rate = 1e6;
|
||||||
|
|||||||
@ -138,6 +138,7 @@ public:
|
|||||||
void addEnthalpySource
|
void addEnthalpySource
|
||||||
(
|
(
|
||||||
const basicThermo& thermo,
|
const basicThermo& thermo,
|
||||||
|
const volScalarField& rho,
|
||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -50,12 +50,13 @@ Foam::thermalPorousZones::thermalPorousZones
|
|||||||
void Foam::thermalPorousZones::addEnthalpySource
|
void Foam::thermalPorousZones::addEnthalpySource
|
||||||
(
|
(
|
||||||
const basicThermo& thermo,
|
const basicThermo& thermo,
|
||||||
|
const volScalarField& rho,
|
||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
operator[](i).addEnthalpySource(thermo, hEqn);
|
operator[](i).addEnthalpySource(thermo, rho, hEqn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,6 +92,7 @@ public:
|
|||||||
void addEnthalpySource
|
void addEnthalpySource
|
||||||
(
|
(
|
||||||
const basicThermo& thermo,
|
const basicThermo& thermo,
|
||||||
|
const volScalarField& rho,
|
||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user