mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Corrected the handling of mass-fluxes.
This commit is contained in:
committed by
graham
parent
80c9f74b64
commit
31b83d862b
@ -30,17 +30,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace fvc
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
tmp<surfaceScalarField> meshPhi
|
|
||||||
(
|
(
|
||||||
const volVectorField& vf
|
const volVectorField& vf
|
||||||
)
|
)
|
||||||
@ -53,13 +43,13 @@ tmp<surfaceScalarField> meshPhi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<surfaceScalarField> meshPhi
|
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
|
||||||
(
|
(
|
||||||
const dimensionedScalar& rho,
|
const dimensionedScalar& rho,
|
||||||
const volVectorField& vf
|
const volVectorField& vf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return rho*fv::ddtScheme<vector>::New
|
return fv::ddtScheme<vector>::New
|
||||||
(
|
(
|
||||||
vf.mesh(),
|
vf.mesh(),
|
||||||
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
|
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 volScalarField& rho,
|
||||||
const volVectorField& vf
|
const volVectorField& vf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return fvc::interpolate(rho)*fv::ddtScheme<vector>::New
|
return fv::ddtScheme<vector>::New
|
||||||
(
|
(
|
||||||
vf.mesh(),
|
vf.mesh(),
|
||||||
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
|
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
|
||||||
@ -81,7 +71,7 @@ tmp<surfaceScalarField> meshPhi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void makeRelative
|
void Foam::fvc::makeRelative
|
||||||
(
|
(
|
||||||
surfaceScalarField& phi,
|
surfaceScalarField& phi,
|
||||||
const volVectorField& U
|
const volVectorField& U
|
||||||
@ -93,7 +83,7 @@ void makeRelative
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeRelative
|
void Foam::fvc::makeRelative
|
||||||
(
|
(
|
||||||
surfaceScalarField& phi,
|
surfaceScalarField& phi,
|
||||||
const dimensionedScalar& rho,
|
const dimensionedScalar& rho,
|
||||||
@ -102,11 +92,11 @@ void makeRelative
|
|||||||
{
|
{
|
||||||
if (phi.mesh().moving())
|
if (phi.mesh().moving())
|
||||||
{
|
{
|
||||||
phi -= fvc::meshPhi(rho, U);
|
phi -= rho*fvc::meshPhi(rho, U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeRelative
|
void Foam::fvc::makeRelative
|
||||||
(
|
(
|
||||||
surfaceScalarField& phi,
|
surfaceScalarField& phi,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -115,12 +105,12 @@ void makeRelative
|
|||||||
{
|
{
|
||||||
if (phi.mesh().moving())
|
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,
|
surfaceScalarField& phi,
|
||||||
const volVectorField& U
|
const volVectorField& U
|
||||||
@ -132,7 +122,7 @@ void makeAbsolute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeAbsolute
|
void Foam::fvc::makeAbsolute
|
||||||
(
|
(
|
||||||
surfaceScalarField& phi,
|
surfaceScalarField& phi,
|
||||||
const dimensionedScalar& rho,
|
const dimensionedScalar& rho,
|
||||||
@ -141,11 +131,11 @@ void makeAbsolute
|
|||||||
{
|
{
|
||||||
if (phi.mesh().moving())
|
if (phi.mesh().moving())
|
||||||
{
|
{
|
||||||
phi += fvc::meshPhi(rho, U);
|
phi += rho*fvc::meshPhi(rho, U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeAbsolute
|
void Foam::fvc::makeAbsolute
|
||||||
(
|
(
|
||||||
surfaceScalarField& phi,
|
surfaceScalarField& phi,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -154,17 +144,9 @@ void makeAbsolute
|
|||||||
{
|
{
|
||||||
if (phi.mesh().moving())
|
if (phi.mesh().moving())
|
||||||
{
|
{
|
||||||
phi += fvc::meshPhi(rho, U);
|
phi += fvc::interpolate(rho)*fvc::meshPhi(rho, U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace fvc
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user