Skip to content
Snippets Groups Projects
Commit c273ee46 authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge remote-tracking branch 'origin/master' into develop

parents aebd79ff 8993af73
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -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 ...@@ -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 ...@@ -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))
{ {
fvPatchField<scalar>::operator= if (valueRequired)
( {
Field<scalar>("value", dict, p.size()) if (dict.found("value"))
); {
fvPatchField<scalar>::operator=
(
Field<scalar>("value", dict, p.size())
);
}
else
{
this->evaluate(Pstream::commsTypes::blocking);
}
}
} }
...@@ -178,6 +189,8 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs() ...@@ -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: ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment