Skip to content
Snippets Groups Projects
Commit aaa54692 authored by mattijs's avatar mattijs
Browse files

ENH: fan bc: more logical initialisation. See #2138.

parent 3b10cd84
Branches
1 merge request!474Hot fixes for v2106
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2021 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -63,7 +63,7 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField ...@@ -63,7 +63,7 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
const bool valueRequired const bool valueRequired
) )
: :
cyclicFvPatchField<Type>(p, iF, dict, false) // Pass no valueRequired cyclicFvPatchField<Type>(p, iF, dict, valueRequired)
{ {
// Call this evaluation in derived classes // Call this evaluation in derived classes
//this->evaluate(Pstream::commsTypes::blocking); //this->evaluate(Pstream::commsTypes::blocking);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2017-2020 OpenCFD Ltd. Copyright (C) 2017-2021 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -67,7 +67,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField ...@@ -67,7 +67,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const dictionary& dict const dictionary& dict
) )
: :
uniformJumpFvPatchField<Type>(p, iF, dict), uniformJumpFvPatchField<Type>(p, iF, dict, false), // Pass no valueRequired
phiName_(dict.getOrDefault<word>("phi", "phi")), phiName_(dict.getOrDefault<word>("phi", "phi")),
rhoName_(dict.getOrDefault<word>("rho", "rho")), rhoName_(dict.getOrDefault<word>("rho", "rho")),
uniformJump_(dict.getOrDefault("uniformJump", false)), uniformJump_(dict.getOrDefault("uniformJump", false)),
...@@ -75,11 +75,29 @@ Foam::fanFvPatchField<Type>::fanFvPatchField ...@@ -75,11 +75,29 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
rpm_(0), rpm_(0),
dm_(0) dm_(0)
{ {
// Note that we've not read jumpTable_ etc
if (nonDimensional_) if (nonDimensional_)
{ {
dict.readEntry("rpm", rpm_); dict.readEntry("rpm", rpm_);
dict.readEntry("dm", dm_); dict.readEntry("dm", dm_);
} }
if (this->cyclicPatch().owner())
{
this->jumpTable_ = Function1<Type>::New("jumpTable", dict);
}
if (dict.found("value"))
{
fvPatchField<Type>::operator=
(
Field<Type>("value", dict, p.size())
);
}
else
{
this->evaluate(Pstream::commsTypes::blocking);
}
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment