mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: pressurTools function object - simplified usage
This commit is contained in:
@ -70,7 +70,7 @@ Foam::dimensionedScalar Foam::pressureTools::rhoScale
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return dimensionedScalar("rhoRef", dimDensity, rhoRef_);
|
return dimensionedScalar("rhoRef", dimDensity, rhoInf_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::rho
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
p.mesh(),
|
p.mesh(),
|
||||||
dimensionedScalar("zero", dimDensity, rhoRef_)
|
dimensionedScalar("zero", dimDensity, rhoInf_)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,6 @@ Foam::pressureTools::pressureTools
|
|||||||
pName_("p"),
|
pName_("p"),
|
||||||
UName_("U"),
|
UName_("U"),
|
||||||
rhoName_("rho"),
|
rhoName_("rho"),
|
||||||
rhoRef_(1.0),
|
|
||||||
calcTotal_(false),
|
calcTotal_(false),
|
||||||
pRef_(0.0),
|
pRef_(0.0),
|
||||||
calcCoeff_(false),
|
calcCoeff_(false),
|
||||||
@ -242,7 +241,7 @@ void Foam::pressureTools::read(const dictionary& dict)
|
|||||||
|
|
||||||
if (p.dimensions() != dimPressure)
|
if (p.dimensions() != dimPressure)
|
||||||
{
|
{
|
||||||
dict.lookup("rhoRef") >> rhoRef_;
|
dict.lookup("rhoRef") >> rhoInf_;
|
||||||
}
|
}
|
||||||
|
|
||||||
dict.lookup("calcTotal") >> calcTotal_;
|
dict.lookup("calcTotal") >> calcTotal_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,6 @@ Description
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
type | type name: pressureTools| yes |
|
type | type name: pressureTools| yes |
|
||||||
rhoRef | Reference density for incompressible cases | no | 1
|
|
||||||
calcTotal | Calculate total coefficient | yes |
|
calcTotal | Calculate total coefficient | yes |
|
||||||
pRef | Reference pressure for total pressure | no | 0.0
|
pRef | Reference pressure for total pressure | no | 0.0
|
||||||
calcCoeff | Calculate pressure coefficient | yes |
|
calcCoeff | Calculate pressure coefficient | yes |
|
||||||
@ -150,9 +149,6 @@ class pressureTools
|
|||||||
//- Name of density field, default is "rho"
|
//- Name of density field, default is "rho"
|
||||||
word rhoName_;
|
word rhoName_;
|
||||||
|
|
||||||
//- Reference density employed for incompressible cases
|
|
||||||
scalar rhoRef_;
|
|
||||||
|
|
||||||
|
|
||||||
// Total pressure calculation
|
// Total pressure calculation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user