mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -53,10 +53,11 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool valueRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedJumpFvPatchField<scalar>(p, iF),
|
fixedJumpFvPatchField<scalar>(p, iF, dict, false),
|
||||||
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
||||||
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
||||||
D_(Function1<scalar>::New("D", dict, &db())),
|
D_(Function1<scalar>::New("D", dict, &db())),
|
||||||
@ -64,10 +65,20 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
|
|||||||
length_(dict.get<scalar>("length")),
|
length_(dict.get<scalar>("length")),
|
||||||
uniformJump_(dict.getOrDefault("uniformJump", false))
|
uniformJump_(dict.getOrDefault("uniformJump", false))
|
||||||
{
|
{
|
||||||
|
if (valueRequired)
|
||||||
|
{
|
||||||
|
if (dict.found("value"))
|
||||||
|
{
|
||||||
fvPatchField<scalar>::operator=
|
fvPatchField<scalar>::operator=
|
||||||
(
|
(
|
||||||
Field<scalar>("value", dict, p.size())
|
Field<scalar>("value", dict, p.size())
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -178,6 +189,8 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->relax();
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
scalar avePressureJump = gAverage(jump());
|
scalar avePressureJump = gAverage(jump());
|
||||||
|
|||||||
@ -162,7 +162,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<scalar, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const bool valueRequired = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given porousBafflePressureFvPatchField
|
//- Construct by mapping given porousBafflePressureFvPatchField
|
||||||
|
|||||||
Reference in New Issue
Block a user