dimensionSets: Added dimFlux (volumetric flux) and dimMassFlux (mass flux)

This commit is contained in:
Henry Weller
2021-06-22 16:56:40 +01:00
parent fac831df42
commit 3168d93a38
30 changed files with 76 additions and 70 deletions

View File

@ -174,7 +174,7 @@ while (pimple.correct())
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh, mesh,
dimensionedScalar(dimArea*dimVelocity, 0) dimensionedScalar(dimFlux, 0)
); );
forAll(phases, phasei) forAll(phases, phasei)

View File

@ -165,7 +165,7 @@ while (pimple.correct())
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh, mesh,
dimensionedScalar(dimArea*dimVelocity, 0) dimensionedScalar(dimFlux, 0)
); );
forAll(phases, phasei) forAll(phases, phasei)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,7 +115,7 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs()
scalarField Un(phip/patch().magSf()); scalarField Un(phip/patch().magSf());
if (phi.dimensions() == dimDensity*dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
Un /= patch().lookupPatchField<volScalarField, scalar>(rhoName_); Un /= patch().lookupPatchField<volScalarField, scalar>(rhoName_);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -165,6 +165,9 @@ const Foam::dimensionSet Foam::dimSpecificHeatCapacity(dimGasConstant);
const Foam::dimensionSet Foam::dimViscosity(dimArea/dimTime); const Foam::dimensionSet Foam::dimViscosity(dimArea/dimTime);
const Foam::dimensionSet Foam::dimDynamicViscosity(dimDensity*dimViscosity); const Foam::dimensionSet Foam::dimDynamicViscosity(dimDensity*dimViscosity);
const Foam::dimensionSet Foam::dimFlux(dimArea*dimVelocity);
const Foam::dimensionSet Foam::dimMassFlux(dimDensity*dimFlux);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,6 +75,9 @@ extern const dimensionSet dimSpecificHeatCapacity;
extern const dimensionSet dimViscosity; extern const dimensionSet dimViscosity;
extern const dimensionSet dimDynamicViscosity; extern const dimensionSet dimDynamicViscosity;
extern const dimensionSet dimFlux;
extern const dimensionSet dimMassFlux;
class dimensionSets class dimensionSets
{ {

View File

@ -151,7 +151,7 @@ Foam::advectiveFvPatchField<Type>::advectionSpeed() const
phiName_ phiName_
); );
if (phi.dimensions() == dimDensity*dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
const fvPatchScalarField& rhop = const fvPatchScalarField& rhop =
this->patch().template lookupPatchField<volScalarField, scalar> this->patch().template lookupPatchField<volScalarField, scalar>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -122,13 +122,13 @@ void Foam::fanPressureFvPatchScalarField::updateCoeffs()
// Get the volumetric flow rate // Get the volumetric flow rate
scalar volFlowRate = 0; scalar volFlowRate = 0;
if (phip.internalField().dimensions() == dimVelocity*dimArea) if (phip.internalField().dimensions() == dimFlux)
{ {
volFlowRate = sign*gSum(phip); volFlowRate = sign*gSum(phip);
} }
else if else if
( (
phip.internalField().dimensions() == dimVelocity*dimArea*dimDensity phip.internalField().dimensions() == dimMassFlux
) )
{ {
const scalarField& rhop = const scalarField& rhop =

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,13 +43,13 @@ void Foam::fanPressureJumpFvPatchScalarField::calcFanJump()
scalar volFlowRate = 0; scalar volFlowRate = 0;
if (phip.internalField().dimensions() == dimVelocity*dimArea) if (phip.internalField().dimensions() == dimFlux)
{ {
volFlowRate = gSum(phip); volFlowRate = gSum(phip);
} }
else if else if
( (
phip.internalField().dimensions() == dimVelocity*dimArea*dimDensity phip.internalField().dimensions() == dimMassFlux
) )
{ {
const scalarField& rhop = const scalarField& rhop =
@ -75,13 +75,13 @@ void Foam::fanPressureJumpFvPatchScalarField::calcFanJump()
scalarField Un(max(sign*phip/patch().magSf(), scalar(0))); scalarField Un(max(sign*phip/patch().magSf(), scalar(0)));
if (phip.internalField().dimensions() == dimVelocity*dimArea) if (phip.internalField().dimensions() == dimFlux)
{ {
// Do nothing // Do nothing
} }
else if else if
( (
phip.internalField().dimensions() == dimVelocity*dimArea*dimDensity phip.internalField().dimensions() == dimMassFlux
) )
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =

View File

@ -111,11 +111,11 @@ void Foam::fluxCorrectedVelocityFvPatchVectorField::evaluate
const vectorField n(patch().nf()); const vectorField n(patch().nf());
const Field<scalar>& magS = patch().magSf(); const Field<scalar>& magS = patch().magSf();
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
operator==(*this - n*(n & *this) + n*phip/magS); operator==(*this - n*(n & *this) + n*phip/magS);
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -125,12 +125,12 @@ void Foam::mappedFlowRateFvPatchVectorField::updateCoeffs()
vectorField n(patch().nf()); vectorField n(patch().nf());
if (phiName.dimensions() == dimVelocity*dimArea) if (phiName.dimensions() == dimFlux)
{ {
// volumetric flow-rate // volumetric flow-rate
operator==(n*U); operator==(n*U);
} }
else if (phiName.dimensions() == dimDensity*dimVelocity*dimArea) else if (phiName.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -180,7 +180,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs()
// Calculate the current mass flow rate // Calculate the current mass flow rate
scalar massFlowRate(1.0); scalar massFlowRate(1.0);
if (phi.internalField().dimensions() == dimVelocity*dimArea) if (phi.internalField().dimensions() == dimFlux)
{ {
if (hasRho_) if (hasRho_)
{ {
@ -196,7 +196,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs()
else if else if
( (
phi.internalField().dimensions() phi.internalField().dimensions()
== dimDensity*dimVelocity*dimArea == dimFlux
) )
{ {
if (hasRho_) if (hasRho_)

View File

@ -143,11 +143,11 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs()
tmp<vectorField> n = patch().nf(); tmp<vectorField> n = patch().nf();
tmp<scalarField> ndmagS = (n & inletDir_)*patch().magSf(); tmp<scalarField> ndmagS = (n & inletDir_)*patch().magSf();
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
refValue() = inletDir_*phip/ndmagS; refValue() = inletDir_*phip/ndmagS;
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -134,11 +134,11 @@ void Foam::pressureDirectedInletVelocityFvPatchVectorField::updateCoeffs()
tmp<vectorField> n = patch().nf(); tmp<vectorField> n = patch().nf();
tmp<scalarField> ndmagS = (n & inletDir_)*patch().magSf(); tmp<scalarField> ndmagS = (n & inletDir_)*patch().magSf();
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
operator==(inletDir_*phip/ndmagS); operator==(inletDir_*phip/ndmagS);
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -118,11 +118,11 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs()
vectorField Ut(patchInternalField()); vectorField Ut(patchInternalField());
Ut -= n()*(Ut & n()); Ut -= n()*(Ut & n());
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
refValue() = Ut + n*phip/magSf; refValue() = Ut + n*phip/magSf;
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -103,11 +103,11 @@ void Foam::pressureInletVelocityFvPatchVectorField::updateCoeffs()
tmp<vectorField> n = patch().nf(); tmp<vectorField> n = patch().nf();
const Field<scalar>& magS = patch().magSf(); const Field<scalar>& magS = patch().magSf();
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
operator==(n*phip/magS); operator==(n*phip/magS);
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -114,11 +114,11 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs()
tmp<vectorField> n = patch().nf(); tmp<vectorField> n = patch().nf();
const Field<scalar>& magS = patch().magSf(); const Field<scalar>& magS = patch().magSf();
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
refValue() = n*phip/magS; refValue() = n*phip/magS;
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -150,12 +150,12 @@ void Foam::swirlFlowRateInletVelocityFvPatchVectorField::updateCoeffs()
const surfaceScalarField& phi = const surfaceScalarField& phi =
db().lookupObject<surfaceScalarField>(phiName_); db().lookupObject<surfaceScalarField>(phiName_);
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
// volumetric flow-rate // volumetric flow-rate
operator==(tangentialVelocity + n*avgU); operator==(tangentialVelocity + n*avgU);
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
const fvPatchField<scalar>& rhop = const fvPatchField<scalar>& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -181,11 +181,11 @@ void Foam::syringePressureFvPatchScalarField::updateCoeffs()
const fvsPatchField<scalar>& phip = const fvsPatchField<scalar>& phip =
patch().patchField<surfaceScalarField, scalar>(phi); patch().patchField<surfaceScalarField, scalar>(phi);
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
ams_ = ams0_ + deltaT*sum((*this*psi_)*phip); ams_ = ams0_ + deltaT*sum((*this*psi_)*phip);
} }
else if (phi.dimensions() == dimDensity*dimVelocity*dimArea) else if (phi.dimensions() == dimFlux)
{ {
ams_ = ams0_ + deltaT*sum(phip); ams_ = ams0_ + deltaT*sum(phip);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -150,7 +150,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs()
// Change in zeta due to flux // Change in zeta due to flux
vectorField dZetap(dt*nf()*phi.boundaryField()[patchi]/patch().magSf()); vectorField dZetap(dt*nf()*phi.boundaryField()[patchi]/patch().magSf());
if (phi.dimensions() == dimDensity*dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
const scalarField& rhop = const scalarField& rhop =
patch().lookupPatchField<volScalarField, scalar>(rhoName_); patch().lookupPatchField<volScalarField, scalar>(rhoName_);

View File

@ -108,7 +108,7 @@ Foam::waveTransmissiveFvPatchField<Type>::advectionSpeed() const
lookupPatchField<surfaceScalarField, scalar>(this->phiName_) lookupPatchField<surfaceScalarField, scalar>(this->phiName_)
); );
if (phi.dimensions() == dimDensity*dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
const fvPatchScalarField& rhop = const fvPatchScalarField& rhop =
this->patch().template this->patch().template

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -677,7 +677,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
GeometricField<Type, fvPatchField, volMesh> rhoU0 GeometricField<Type, fvPatchField, volMesh> rhoU0
@ -705,7 +705,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
fluxFieldType phiCorr fluxFieldType phiCorr

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -1370,7 +1370,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 = DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
@ -1427,7 +1427,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 = DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -567,7 +567,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
GeometricField<Type, fvPatchField, volMesh> rhoU0 GeometricField<Type, fvPatchField, volMesh> rhoU0
@ -595,7 +595,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
fluxFieldType phiCorr fluxFieldType phiCorr

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -667,7 +667,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
GeometricField<Type, fvPatchField, volMesh> rhoU0 GeometricField<Type, fvPatchField, volMesh> rhoU0
@ -695,7 +695,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
fluxFieldType phiCorr fluxFieldType phiCorr

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -817,7 +817,7 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
const GeometricField<Type, fvPatchField, volMesh> rhoU0 const GeometricField<Type, fvPatchField, volMesh> rhoU0
@ -848,7 +848,7 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
return fluxFieldType::New return fluxFieldType::New

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -528,7 +528,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
if if
( (
U.dimensions() == dimVelocity U.dimensions() == dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
GeometricField<Type, fvPatchField, volMesh> rhoU0 GeometricField<Type, fvPatchField, volMesh> rhoU0
@ -565,7 +565,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
else if else if
( (
U.dimensions() == rho.dimensions()*dimVelocity U.dimensions() == rho.dimensions()*dimVelocity
&& phi.dimensions() == rho.dimensions()*dimVelocity*dimArea && phi.dimensions() == rho.dimensions()*dimFlux
) )
{ {
fluxFieldType phiCorr fluxFieldType phiCorr

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ Foam::PhiScheme<Type, PhiLimiter>::limiter
tmp<surfaceScalarField> tUflux = this->faceFlux_; tmp<surfaceScalarField> tUflux = this->faceFlux_;
if (this->faceFlux_.dimensions() == dimDensity*dimVelocity*dimArea) if (this->faceFlux_.dimensions() == dimFlux)
{ {
const volScalarField& rho = const volScalarField& rho =
phi.db().objectRegistry::template lookupObject<volScalarField> phi.db().objectRegistry::template lookupObject<volScalarField>
@ -69,7 +69,7 @@ Foam::PhiScheme<Type, PhiLimiter>::limiter
tUflux = this->faceFlux_/fvc::interpolate(rho); tUflux = this->faceFlux_/fvc::interpolate(rho);
} }
else if (this->faceFlux_.dimensions() != dimVelocity*dimArea) else if (this->faceFlux_.dimensions() != dimFlux)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "dimensions of faceFlux are not correct" << "dimensions of faceFlux are not correct"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -187,7 +187,7 @@ public:
const fvMesh& mesh = this->mesh(); const fvMesh& mesh = this->mesh();
tmp<surfaceScalarField> tUflux = faceFlux_; tmp<surfaceScalarField> tUflux = faceFlux_;
if (faceFlux_.dimensions() == dimDensity*dimVelocity*dimArea) if (faceFlux_.dimensions() == dimFlux)
{ {
// Currently assume that the density field // Currently assume that the density field
// corresponding to the mass-flux is named "rho" // corresponding to the mass-flux is named "rho"
@ -197,7 +197,7 @@ public:
tUflux = faceFlux_/fvc::interpolate(rho); tUflux = faceFlux_/fvc::interpolate(rho);
} }
else if (faceFlux_.dimensions() != dimVelocity*dimArea) else if (faceFlux_.dimensions() != dimFlux)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "dimensions of faceFlux are not correct" << "dimensions of faceFlux are not correct"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -197,7 +197,7 @@ public:
const fvMesh& mesh = this->mesh(); const fvMesh& mesh = this->mesh();
tmp<surfaceScalarField> tUflux = faceFlux_; tmp<surfaceScalarField> tUflux = faceFlux_;
if (faceFlux_.dimensions() == dimDensity*dimVelocity*dimArea) if (faceFlux_.dimensions() == dimFlux)
{ {
// Currently assume that the density field // Currently assume that the density field
// corresponding to the mass-flux is named "rho" // corresponding to the mass-flux is named "rho"
@ -207,7 +207,7 @@ public:
tUflux = faceFlux_/fvc::interpolate(rho); tUflux = faceFlux_/fvc::interpolate(rho);
} }
else if (faceFlux_.dimensions() != dimVelocity*dimArea) else if (faceFlux_.dimensions() != dimFlux)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "dimensions of faceFlux are not correct" << "dimensions of faceFlux are not correct"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -128,7 +128,7 @@ Foam::scalar Foam::PatchFlowRateInjection<CloudType>::flowRate() const
const scalarField& phip = phi.boundaryField()[patchId_]; const scalarField& phip = phi.boundaryField()[patchId_];
scalar flowRateIn = 0.0; scalar flowRateIn = 0.0;
if (phi.dimensions() == dimVelocity*dimArea) if (phi.dimensions() == dimFlux)
{ {
flowRateIn = max(0.0, -sum(phip)); flowRateIn = max(0.0, -sum(phip));
} }