Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
eb3c96fe
Commit
eb3c96fe
authored
Jun 24, 2021
by
Mattijs Janssens
Browse files
Merge branch 'bugfix-fan' into 'develop'
Hot fixes for v2106 See merge request
!474
parents
27cc9143
aaa54692
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
View file @
eb3c96fe
...
...
@@ -48,10 +48,11 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
(
const
fvPatch
&
p
,
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
))
{
if
(
!
isA
<
cyclicFvPatch
>
(
p
))
...
...
@@ -65,7 +66,10 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
<<
exit
(
FatalIOError
);
}
this
->
evaluate
(
Pstream
::
commsTypes
::
blocking
);
if
(
valueRequired
)
{
this
->
evaluate
(
Pstream
::
commsTypes
::
blocking
);
}
}
...
...
src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
View file @
eb3c96fe
...
...
@@ -111,7 +111,8 @@ public:
(
const
fvPatch
&
,
const
DimensionedField
<
Type
,
volMesh
>&
,
const
dictionary
&
const
dictionary
&
,
const
bool
valueRequired
=
true
);
//- Construct by mapping given cyclicFvPatchField onto a new patch
...
...
src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
View file @
eb3c96fe
...
...
@@ -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.
...
...
@@ -59,10 +59,11 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
(
const
fvPatch
&
p
,
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
//this->evaluate(Pstream::commsTypes::blocking);
...
...
src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
View file @
eb3c96fe
...
...
@@ -82,7 +82,8 @@ public:
(
const
fvPatch
&
,
const
DimensionedField
<
Type
,
volMesh
>&
,
const
dictionary
&
const
dictionary
&
,
const
bool
valueRequired
=
true
);
//- Construct by mapping given jumpCyclicFvPatchField onto a new patch
...
...
src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
View file @
eb3c96fe
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2017-202
0
OpenCFD Ltd.
Copyright (C) 2017-202
1
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
);
}
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
View file @
eb3c96fe
...
...
@@ -240,14 +240,6 @@ public:
template
<
>
void
fanFvPatchField
<
scalar
>::
calcFanJump
();
template
<
>
fanFvPatchField
<
scalar
>::
fanFvPatchField
(
const
fvPatch
&
,
const
DimensionedField
<
scalar
,
volMesh
>&
,
const
dictionary
&
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
View file @
eb3c96fe
...
...
@@ -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
...
...
src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
View file @
eb3c96fe
...
...
@@ -69,10 +69,11 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
(
const
fvPatch
&
p
,
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
),
jump0_
(
p
.
size
(),
Zero
),
minJump_
(
dict
.
getOrDefault
<
Type
>
(
"minJump"
,
pTraits
<
Type
>::
min
)),
...
...
@@ -81,7 +82,10 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
{
if
(
this
->
cyclicPatch
().
owner
())
{
jump_
=
Field
<
Type
>
(
"jump"
,
dict
,
p
.
size
());
if
(
valueRequired
)
{
jump_
=
Field
<
Type
>
(
"jump"
,
dict
,
p
.
size
());
}
if
(
dict
.
found
(
"jump0"
))
{
...
...
@@ -89,16 +93,19 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
}
}
if
(
dict
.
found
(
"value"
))
{
fvPatchField
<
Type
>::
operator
=
(
Field
<
Type
>
(
"value"
,
dict
,
p
.
size
())
);
}
else
if
(
valueRequired
)
{
this
->
evaluate
(
Pstream
::
commsTypes
::
blocking
);
if
(
dict
.
found
(
"value"
))
{
fvPatchField
<
Type
>::
operator
=
(
Field
<
Type
>
(
"value"
,
dict
,
p
.
size
())
);
}
else
{
this
->
evaluate
(
Pstream
::
commsTypes
::
blocking
);
}
}
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H
View file @
eb3c96fe
...
...
@@ -127,7 +127,8 @@ public:
(
const
fvPatch
&
,
const
DimensionedField
<
Type
,
volMesh
>&
,
const
dictionary
&
const
dictionary
&
,
const
bool
valueRequired
=
true
);
//- Construct by mapping given fixedJumpFvPatchField onto a
...
...
src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C
View file @
eb3c96fe
...
...
@@ -60,27 +60,31 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
(
const
fvPatch
&
p
,
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_
()
{
if
(
this
->
cyclicPatch
().
owner
())
{
jumpTable_
=
Function1
<
Type
>::
New
(
"jumpTable"
,
dict
);
}
if
(
dict
.
found
(
"value"
))
{
fvPatchField
<
Type
>::
operator
=
(
Field
<
Type
>
(
"value"
,
dict
,
p
.
size
())
);
}
else
if
(
valueRequired
)
{
this
->
evaluate
(
Pstream
::
commsTypes
::
blocking
);
if
(
this
->
cyclicPatch
().
owner
())
{
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
);
}
}
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H
View file @
eb3c96fe
...
...
@@ -117,7 +117,8 @@ public:
(
const
fvPatch
&
,
const
DimensionedField
<
Type
,
volMesh
>&
,
const
dictionary
&
const
dictionary
&
,
const
bool
valueRequired
=
true
);
//- Construct by mapping given uniformJumpFvPatchField onto a
...
...
src/meshTools/AMIInterpolation/AMIInterpolation/faceAreaWeightAMI/faceAreaWeightAMI.C
View file @
eb3c96fe
...
...
@@ -38,6 +38,17 @@ namespace Foam
defineTypeNameAndDebug
(
faceAreaWeightAMI
,
0
);
addToRunTimeSelectionTable
(
AMIInterpolation
,
faceAreaWeightAMI
,
dict
);
addToRunTimeSelectionTable
(
AMIInterpolation
,
faceAreaWeightAMI
,
component
);
// Backwards compatibility for pre v2106 versions
// - partialFaceAreaWeightAMI deprecated in v2106
addNamedToRunTimeSelectionTable
(
AMIInterpolation
,
faceAreaWeightAMI
,
dict
,
partialFaceAreaWeightAMI
);
}
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment