mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fanPressureFvPatchScalarField - adjust compatibility handling
COMP: add missing clone() for fanCurve member STYLE: reduce padding in data members
This commit is contained in:
@ -56,9 +56,9 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
totalPressureFvPatchScalarField(p, iF),
|
totalPressureFvPatchScalarField(p, iF),
|
||||||
fanCurve_(nullptr),
|
fanCurve_(nullptr),
|
||||||
direction_(ffdOut),
|
direction_(ffdOut),
|
||||||
|
nonDimensional_(false),
|
||||||
rpm_(0),
|
rpm_(0),
|
||||||
dm_(0),
|
dm_(0)
|
||||||
nonDimensional_(false)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -71,11 +71,11 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
totalPressureFvPatchScalarField(ptf, p, iF, mapper),
|
totalPressureFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
fanCurve_(ptf.fanCurve_),
|
fanCurve_(ptf.fanCurve_.clone()),
|
||||||
direction_(ptf.direction_),
|
direction_(ptf.direction_),
|
||||||
|
nonDimensional_(ptf.nonDimensional_),
|
||||||
rpm_(ptf.rpm_),
|
rpm_(ptf.rpm_),
|
||||||
dm_(ptf.dm_),
|
dm_(ptf.dm_)
|
||||||
nonDimensional_(ptf.nonDimensional_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -89,13 +89,13 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
totalPressureFvPatchScalarField(p, iF, dict),
|
totalPressureFvPatchScalarField(p, iF, dict),
|
||||||
fanCurve_(nullptr),
|
fanCurve_(nullptr),
|
||||||
direction_(fanFlowDirectionNames_.get("direction", dict)),
|
direction_(fanFlowDirectionNames_.get("direction", dict)),
|
||||||
|
nonDimensional_(dict.getOrDefault("nonDimensional", false)),
|
||||||
rpm_(0),
|
rpm_(0),
|
||||||
dm_(0),
|
dm_(0)
|
||||||
nonDimensional_(dict.getOrDefault("nonDimensional", false))
|
|
||||||
{
|
{
|
||||||
if (dict.found("file") && !dict.found("fanCurve"))
|
// Backwards compatibility
|
||||||
|
if (dict.found("file"))
|
||||||
{
|
{
|
||||||
// Backwards compatibility (2006 and earlier)
|
|
||||||
fanCurve_.reset
|
fanCurve_.reset
|
||||||
(
|
(
|
||||||
new Function1Types::TableFile<scalar>("fanCurve", dict)
|
new Function1Types::TableFile<scalar>("fanCurve", dict)
|
||||||
@ -125,9 +125,9 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
totalPressureFvPatchScalarField(fppsf),
|
totalPressureFvPatchScalarField(fppsf),
|
||||||
fanCurve_(fppsf.fanCurve_.clone()),
|
fanCurve_(fppsf.fanCurve_.clone()),
|
||||||
direction_(fppsf.direction_),
|
direction_(fppsf.direction_),
|
||||||
|
nonDimensional_(fppsf.nonDimensional_),
|
||||||
rpm_(fppsf.rpm_),
|
rpm_(fppsf.rpm_),
|
||||||
dm_(fppsf.dm_),
|
dm_(fppsf.dm_)
|
||||||
nonDimensional_(fppsf.nonDimensional_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ Foam::fanPressureFvPatchScalarField::fanPressureFvPatchScalarField
|
|||||||
totalPressureFvPatchScalarField(fppsf, iF),
|
totalPressureFvPatchScalarField(fppsf, iF),
|
||||||
fanCurve_(fppsf.fanCurve_.clone()),
|
fanCurve_(fppsf.fanCurve_.clone()),
|
||||||
direction_(fppsf.direction_),
|
direction_(fppsf.direction_),
|
||||||
|
nonDimensional_(fppsf.nonDimensional_),
|
||||||
rpm_(fppsf.rpm_),
|
rpm_(fppsf.rpm_),
|
||||||
dm_(fppsf.dm_),
|
dm_(fppsf.dm_)
|
||||||
nonDimensional_(fppsf.nonDimensional_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,13 +56,13 @@ Usage
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
fanCurve | Pressure vs flow-rate | yes |
|
fanCurve | Pressure vs flow-rate | yes |
|
||||||
outOfBounds | out of bounds handling | yes |
|
|
||||||
direction | direction of flow through fan [in/out] | yes |
|
direction | direction of flow through fan [in/out] | yes |
|
||||||
p0 | environmental total pressure | yes |
|
p0 | environmental total pressure | yes |
|
||||||
nonDimensional | uses non-dimensional table | no | false
|
nonDimensional | uses non-dimensional table | no | false
|
||||||
rpm | fan rpm for non-dimensional table | no | 0
|
rpm | fan rpm for non-dimensional table | no | 0
|
||||||
dm | mean diameter for non-dimensional table | no | 0.0
|
dm | mean diameter for non-dimensional table | no | 0.0
|
||||||
file | fan curve file name | legacy |
|
file | fan curve file name | legacy |
|
||||||
|
outOfBounds | out of bounds handling | legacy |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@ -127,11 +127,10 @@ class fanPressureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
public totalPressureFvPatchScalarField
|
public totalPressureFvPatchScalarField
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Fan flow direction
|
//- Fan flow direction
|
||||||
enum fanFlowDirection
|
enum fanFlowDirection : uint8_t
|
||||||
{
|
{
|
||||||
ffdIn,
|
ffdIn,
|
||||||
ffdOut
|
ffdOut
|
||||||
@ -151,15 +150,15 @@ private:
|
|||||||
//- Direction of flow through the fan relative to patch
|
//- Direction of flow through the fan relative to patch
|
||||||
fanFlowDirection direction_;
|
fanFlowDirection direction_;
|
||||||
|
|
||||||
|
//- Use non-dimensional curve
|
||||||
|
bool nonDimensional_;
|
||||||
|
|
||||||
//- Fan rpm (for non-dimensional curve)
|
//- Fan rpm (for non-dimensional curve)
|
||||||
scalar rpm_;
|
scalar rpm_;
|
||||||
|
|
||||||
//- Fan mean diameter (for non-dimensional curve)
|
//- Fan mean diameter (for non-dimensional curve)
|
||||||
scalar dm_;
|
scalar dm_;
|
||||||
|
|
||||||
//- Use non-dimensional curve
|
|
||||||
bool nonDimensional_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user