mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'bugfix-fan' into 'develop'
Hot fixes for v2106 See merge request Development/openfoam!474
This commit is contained in:
@ -48,10 +48,11 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool valueRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledFvPatchField<Type>(p, iF, dict, false),
|
coupledFvPatchField<Type>(p, iF, dict, false), // Pass no valueRequired
|
||||||
cyclicPatch_(refCast<const cyclicFvPatch>(p, dict))
|
cyclicPatch_(refCast<const cyclicFvPatch>(p, dict))
|
||||||
{
|
{
|
||||||
if (!isA<cyclicFvPatch>(p))
|
if (!isA<cyclicFvPatch>(p))
|
||||||
@ -65,7 +66,10 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
if (valueRequired)
|
||||||
|
{
|
||||||
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const bool valueRequired = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given cyclicFvPatchField onto a new patch
|
//- Construct by mapping given cyclicFvPatchField onto a new patch
|
||||||
|
|||||||
@ -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.
|
||||||
@ -59,10 +59,11 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
|
|||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool valueRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cyclicFvPatchField<Type>(p, iF, dict)
|
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);
|
||||||
|
|||||||
@ -82,7 +82,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const bool valueRequired = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given jumpCyclicFvPatchField onto a new patch
|
//- Construct by mapping given jumpCyclicFvPatchField onto a new patch
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -240,14 +240,6 @@ public:
|
|||||||
template<>
|
template<>
|
||||||
void fanFvPatchField<scalar>::calcFanJump();
|
void fanFvPatchField<scalar>::calcFanJump();
|
||||||
|
|
||||||
template<>
|
|
||||||
fanFvPatchField<scalar>::fanFvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch&,
|
|
||||||
const DimensionedField<scalar, volMesh>&,
|
|
||||||
const dictionary&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -86,49 +86,6 @@ void Foam::fanFvPatchField<Foam::scalar>::calcFanJump()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<>
|
|
||||||
Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
uniformJumpFvPatchField<scalar>(p, iF, dict),
|
|
||||||
phiName_(dict.getOrDefault<word>("phi", "phi")),
|
|
||||||
rhoName_(dict.getOrDefault<word>("rho", "rho")),
|
|
||||||
uniformJump_(dict.getOrDefault("uniformJump", false)),
|
|
||||||
nonDimensional_(dict.getOrDefault("nonDimensional", false)),
|
|
||||||
rpm_(0),
|
|
||||||
dm_(0)
|
|
||||||
{
|
|
||||||
if (nonDimensional_)
|
|
||||||
{
|
|
||||||
dict.readEntry("rpm", rpm_);
|
|
||||||
dict.readEntry("dm", dm_);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->cyclicPatch().owner())
|
|
||||||
{
|
|
||||||
this->jumpTable_ = Function1<scalar>::New("jumpTable", dict);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict.found("value"))
|
|
||||||
{
|
|
||||||
fvPatchScalarField::operator=
|
|
||||||
(
|
|
||||||
scalarField("value", dict, p.size())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
|||||||
@ -69,10 +69,11 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
|||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool valueRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
jumpCyclicFvPatchField<Type>(p, iF, dict),
|
jumpCyclicFvPatchField<Type>(p, iF, dict, false), // Pass no valueRequired
|
||||||
jump_(p.size(), Zero),
|
jump_(p.size(), Zero),
|
||||||
jump0_(p.size(), Zero),
|
jump0_(p.size(), Zero),
|
||||||
minJump_(dict.getOrDefault<Type>("minJump", pTraits<Type>::min)),
|
minJump_(dict.getOrDefault<Type>("minJump", pTraits<Type>::min)),
|
||||||
@ -81,7 +82,10 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
|||||||
{
|
{
|
||||||
if (this->cyclicPatch().owner())
|
if (this->cyclicPatch().owner())
|
||||||
{
|
{
|
||||||
jump_ = Field<Type>("jump", dict, p.size());
|
if (valueRequired)
|
||||||
|
{
|
||||||
|
jump_ = Field<Type>("jump", dict, p.size());
|
||||||
|
}
|
||||||
|
|
||||||
if (dict.found("jump0"))
|
if (dict.found("jump0"))
|
||||||
{
|
{
|
||||||
@ -89,16 +93,19 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (valueRequired)
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::operator=
|
if (dict.found("value"))
|
||||||
(
|
{
|
||||||
Field<Type>("value", dict, p.size())
|
fvPatchField<Type>::operator=
|
||||||
);
|
(
|
||||||
}
|
Field<Type>("value", dict, p.size())
|
||||||
else
|
);
|
||||||
{
|
}
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
else
|
||||||
|
{
|
||||||
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -127,7 +127,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const bool valueRequired = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given fixedJumpFvPatchField onto a
|
//- Construct by mapping given fixedJumpFvPatchField onto a
|
||||||
|
|||||||
@ -60,27 +60,31 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
|
|||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
const dictionary& dict
|
const dictionary& dict,
|
||||||
|
const bool valueRequired
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedJumpFvPatchField<Type>(p, iF, dict),
|
fixedJumpFvPatchField<Type>(p, iF, dict, false), // Pass no valueRequired
|
||||||
jumpTable_()
|
jumpTable_()
|
||||||
{
|
{
|
||||||
if (this->cyclicPatch().owner())
|
if (valueRequired)
|
||||||
{
|
{
|
||||||
jumpTable_ = Function1<Type>::New("jumpTable", dict);
|
if (this->cyclicPatch().owner())
|
||||||
}
|
{
|
||||||
|
jumpTable_ = Function1<Type>::New("jumpTable", dict);
|
||||||
|
}
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::operator=
|
fvPatchField<Type>::operator=
|
||||||
(
|
(
|
||||||
Field<Type>("value", dict, p.size())
|
Field<Type>("value", dict, p.size())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::commsTypes::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<Type, volMesh>&,
|
const DimensionedField<Type, volMesh>&,
|
||||||
const dictionary&
|
const dictionary&,
|
||||||
|
const bool valueRequired = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given uniformJumpFvPatchField onto a
|
//- Construct by mapping given uniformJumpFvPatchField onto a
|
||||||
|
|||||||
@ -38,6 +38,17 @@ namespace Foam
|
|||||||
defineTypeNameAndDebug(faceAreaWeightAMI, 0);
|
defineTypeNameAndDebug(faceAreaWeightAMI, 0);
|
||||||
addToRunTimeSelectionTable(AMIInterpolation, faceAreaWeightAMI, dict);
|
addToRunTimeSelectionTable(AMIInterpolation, faceAreaWeightAMI, dict);
|
||||||
addToRunTimeSelectionTable(AMIInterpolation, faceAreaWeightAMI, component);
|
addToRunTimeSelectionTable(AMIInterpolation, faceAreaWeightAMI, component);
|
||||||
|
|
||||||
|
// Backwards compatibility for pre v2106 versions
|
||||||
|
// - partialFaceAreaWeightAMI deprecated in v2106
|
||||||
|
addNamedToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
AMIInterpolation,
|
||||||
|
faceAreaWeightAMI,
|
||||||
|
dict,
|
||||||
|
partialFaceAreaWeightAMI
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|||||||
Reference in New Issue
Block a user