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
Tags
1 merge request!474Hot fixes for v2106
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -63,7 +63,7 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
const bool valueRequired
)
:
cyclicFvPatchField<Type>(p, iF, dict, false) // Pass no valueRequired
cyclicFvPatchField<Type>(p, iF, dict, valueRequired)
{
// Call this evaluation in derived classes
//this->evaluate(Pstream::commsTypes::blocking);
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -67,7 +67,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const dictionary& dict
)
:
uniformJumpFvPatchField<Type>(p, iF, dict),
uniformJumpFvPatchField<Type>(p, iF, dict, false), // Pass no valueRequired
phiName_(dict.getOrDefault<word>("phi", "phi")),
rhoName_(dict.getOrDefault<word>("rho", "rho")),
uniformJump_(dict.getOrDefault("uniformJump", false)),
......@@ -75,11 +75,29 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
rpm_(0),
dm_(0)
{
// Note that we've not read jumpTable_ etc
if (nonDimensional_)
{
dict.readEntry("rpm", rpm_);
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