Skip to content

Commit 2e89451

Browse files
committed
BUG: Only use ".group" if internalField is not null
1 parent 5277cd3 commit 2e89451

File tree

5 files changed

+38
-4
lines changed

5 files changed

+38
-4
lines changed

src/thermodynamicModels/derivedFvPatchFields/dynamicThermoPressure/dynamicThermoPressureFvPatchScalarField.C

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ Foam::dynamicThermoPressureFvPatchScalarField::dynamicThermoPressureFvPatchScala
9797
)
9898
:
9999
fixedValueFvPatchScalarField(tppsf, iF),
100-
thermoBasePatchField(tppsf, this->patch(), iF.group()),
100+
thermoBasePatchField
101+
(
102+
tppsf,
103+
this->patch(),
104+
isNull(iF) ? tppsf.phaseName_ : iF.group()
105+
),
101106
p0_(tppsf.p0_)
102107
{}
103108

src/thermodynamicModels/derivedFvPatchFields/pressureWaveTransmissive/pressureWaveTransmissiveFvPatchField.C

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ pressureWaveTransmissiveFvPatchField
8585
)
8686
:
8787
advectiveFvPatchField<Type>(ptpsf, iF),
88-
thermoBasePatchField(ptpsf, ptpsf.patch(), iF.group())
88+
thermoBasePatchField
89+
(
90+
ptpsf,
91+
ptpsf.patch(),
92+
isNull(iF) ? ptpsf.phaseName_ : iF.group()
93+
)
8994
{}
9095

9196

src/thermodynamicModels/derivedFvPatchFields/thermoBasePatchField/thermoBasePatchField.C

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,23 @@ Foam::thermoBasePatchField::thermoBasePatchField
4242
)
4343
:
4444
patch_(p),
45-
determinePhase_(true),
45+
determinePhase_(false),
4646
phaseName_(defaultGroup)
4747
{}
4848

4949

50+
Foam::thermoBasePatchField::thermoBasePatchField
51+
(
52+
const thermoBasePatchField& tbpf,
53+
const fvPatch& p
54+
)
55+
:
56+
patch_(p),
57+
determinePhase_(false),
58+
phaseName_(tbpf.phaseName_)
59+
{}
60+
61+
5062
Foam::thermoBasePatchField::thermoBasePatchField
5163
(
5264
const thermoBasePatchField& tbpf,

src/thermodynamicModels/derivedFvPatchFields/thermoBasePatchField/thermoBasePatchField.H

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ public:
8787
const word&
8888
);
8989

90+
//- Construct from copy and patch
91+
thermoBasePatchField
92+
(
93+
const thermoBasePatchField&,
94+
const fvPatch&
95+
);
96+
9097
//- Construct from patch and internal field
9198
thermoBasePatchField
9299
(

src/thermodynamicModels/derivedFvPatchFields/totalThermoTemperature/totalThermoTemperatureFvPatchScalarField.C

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ totalThermoTemperatureFvPatchScalarField
113113
)
114114
:
115115
fixedValueFvPatchScalarField(tppsf, iF),
116-
thermoBasePatchField(tppsf, this->patch(), iF.group()),
116+
thermoBasePatchField
117+
(
118+
tppsf,
119+
this->patch(),
120+
isNull(iF) ? tppsf.phaseName_ : iF.group()
121+
),
117122
UName_(tppsf.UName_),
118123
phiName_(tppsf.phiName_),
119124
T0_(tppsf.T0_)

0 commit comments

Comments
 (0)