Corrected handling of density.

This commit is contained in:
henry
2009-09-10 22:43:48 +01:00
parent a80e2f83cd
commit 5467d69f5b
5 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,7 @@
- p*fvc::div(phi/fvc::interpolate(rho))
);
pZones.addEnthalpySource(thermo, hEqn);
pZones.addEnthalpySource(thermo, rho, hEqn);
hEqn.relax();

View File

@ -73,6 +73,7 @@ Foam::thermalPorousZone::thermalPorousZone
void Foam::thermalPorousZone::addEnthalpySource
(
const basicThermo& thermo,
const volScalarField& rho,
fvScalarMatrix& hEqn
) const
{
@ -85,7 +86,6 @@ void Foam::thermalPorousZone::addEnthalpySource
const scalarField& V = mesh().V();
scalarField& hDiag = hEqn.diag();
scalarField& hSource = hEqn.source();
const scalarField& rho = thermo.rho();
scalarField hZone = thermo.h(scalarField(cells.size(), T_.value()), cells);
scalar rate = 1e6;

View File

@ -138,6 +138,7 @@ public:
void addEnthalpySource
(
const basicThermo& thermo,
const volScalarField& rho,
fvScalarMatrix& hEqn
) const;
};

View File

@ -50,12 +50,13 @@ Foam::thermalPorousZones::thermalPorousZones
void Foam::thermalPorousZones::addEnthalpySource
(
const basicThermo& thermo,
const volScalarField& rho,
fvScalarMatrix& hEqn
) const
{
forAll(*this, i)
{
operator[](i).addEnthalpySource(thermo, hEqn);
operator[](i).addEnthalpySource(thermo, rho, hEqn);
}
}

View File

@ -92,6 +92,7 @@ public:
void addEnthalpySource
(
const basicThermo& thermo,
const volScalarField& rho,
fvScalarMatrix& hEqn
) const;
};