Commit a8604f1e authored by henry's avatar henry
Browse files

Corrected the handling of mass-fluxes.

parent b227d53c
......@@ -30,17 +30,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace fvc
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
tmp<surfaceScalarField> meshPhi
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
(
const volVectorField& vf
)
......@@ -53,13 +43,13 @@ tmp<surfaceScalarField> meshPhi
}
tmp<surfaceScalarField> meshPhi
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
(
const dimensionedScalar& rho,
const volVectorField& vf
)
{
return rho*fv::ddtScheme<vector>::New
return fv::ddtScheme<vector>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
......@@ -67,13 +57,13 @@ tmp<surfaceScalarField> meshPhi
}
tmp<surfaceScalarField> meshPhi
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
(
const volScalarField& rho,
const volVectorField& vf
)
{
return fvc::interpolate(rho)*fv::ddtScheme<vector>::New
return fv::ddtScheme<vector>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
......@@ -81,7 +71,7 @@ tmp<surfaceScalarField> meshPhi
}
void makeRelative
void Foam::fvc::makeRelative
(
surfaceScalarField& phi,
const volVectorField& U
......@@ -93,7 +83,7 @@ void makeRelative
}
}
void makeRelative
void Foam::fvc::makeRelative
(
surfaceScalarField& phi,
const dimensionedScalar& rho,
......@@ -102,11 +92,11 @@ void makeRelative
{
if (phi.mesh().moving())
{
phi -= fvc::meshPhi(rho, U);
phi -= rho*fvc::meshPhi(rho, U);
}
}
void makeRelative
void Foam::fvc::makeRelative
(
surfaceScalarField& phi,
const volScalarField& rho,
......@@ -115,12 +105,12 @@ void makeRelative
{
if (phi.mesh().moving())
{
phi -= fvc::meshPhi(rho, U);
phi -= fvc::interpolate(rho)*fvc::meshPhi(rho, U);
}
}
void makeAbsolute
void Foam::fvc::makeAbsolute
(
surfaceScalarField& phi,
const volVectorField& U
......@@ -132,7 +122,7 @@ void makeAbsolute
}
}
void makeAbsolute
void Foam::fvc::makeAbsolute
(
surfaceScalarField& phi,
const dimensionedScalar& rho,
......@@ -141,11 +131,11 @@ void makeAbsolute
{
if (phi.mesh().moving())
{
phi += fvc::meshPhi(rho, U);
phi += rho*fvc::meshPhi(rho, U);
}
}
void makeAbsolute
void Foam::fvc::makeAbsolute
(
surfaceScalarField& phi,
const volScalarField& rho,
......@@ -154,17 +144,9 @@ void makeAbsolute
{
if (phi.mesh().moving())
{
phi += fvc::meshPhi(rho, U);
phi += fvc::interpolate(rho)*fvc::meshPhi(rho, U);
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace fvc
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
Markdown is supported
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