mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fan bc: more logical initialisation. See #2138.
This commit is contained in:
@ -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
|
|||||||
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 @@
|
|||||||
\\/ 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
|
|||||||
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
|
|||||||
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user