Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
64f230ae
Commit
64f230ae
authored
May 27, 2011
by
andy
Browse files
ENH: Changed order of parcel property initialisation
parent
062846d7
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
View file @
64f230ae
...
...
@@ -502,14 +502,10 @@ template<class CloudType>
void
Foam
::
KinematicCloud
<
CloudType
>::
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
)
{
if
(
!
fullyDescribed
)
{
parcel
.
rho
()
=
constProps_
.
rho0
();
}
parcel
.
rho
()
=
constProps_
.
rho0
();
}
...
...
src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H
View file @
64f230ae
...
...
@@ -490,8 +490,7 @@ public:
void
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
);
//- Check parcel properties
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
View file @
64f230ae
...
...
@@ -225,20 +225,29 @@ Foam::ReactingCloud<CloudType>::~ReactingCloud()
template
<
class
CloudType
>
void
Foam
::
ReactingCloud
<
CloudType
>::
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
)
{
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
);
parcel
.
pc
()
=
this
->
thermo
().
thermo
().
p
()[
parcel
.
cell
()];
parcel
.
Y
()
=
composition
().
YMixture0
();
}
template
<
class
CloudType
>
void
Foam
::
ReactingCloud
<
CloudType
>::
checkParcelProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
)
{
CloudType
::
set
Parcel
Thermo
Properties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
CloudType
::
check
ParcelProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
if
(
!
fullyDescribed
)
{
parcel
.
pc
()
=
this
->
thermo
().
thermo
().
p
()[
parcel
.
cell
()];
parcel
.
Y
()
=
composition
().
YMixture0
();
}
else
if
(
fullyDescribed
)
{
checkSuppliedComposition
(
...
...
@@ -253,18 +262,6 @@ void Foam::ReactingCloud<CloudType>::setParcelThermoProperties
}
template
<
class
CloudType
>
void
Foam
::
ReactingCloud
<
CloudType
>::
checkParcelProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
)
{
CloudType
::
checkParcelProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
}
template
<
class
CloudType
>
void
Foam
::
ReactingCloud
<
CloudType
>::
storeState
()
{
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H
View file @
64f230ae
...
...
@@ -271,8 +271,7 @@ public:
void
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
);
//- Check parcel properties
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C
View file @
64f230ae
...
...
@@ -158,24 +158,37 @@ template<class CloudType>
void
Foam
::
ReactingMultiphaseCloud
<
CloudType
>::
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
)
{
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
);
label
idGas
=
this
->
composition
().
idGas
();
label
idLiquid
=
this
->
composition
().
idLiquid
();
label
idSolid
=
this
->
composition
().
idSolid
();
if
(
!
fullyDescribed
)
{
parcel
.
YGas
()
=
this
->
composition
().
Y0
(
idGas
);
parcel
.
YLiquid
()
=
this
->
composition
().
Y0
(
idLiquid
);
parcel
.
YSolid
()
=
this
->
composition
().
Y0
(
idSolid
);
}
else
parcel
.
YGas
()
=
this
->
composition
().
Y0
(
idGas
);
parcel
.
YLiquid
()
=
this
->
composition
().
Y0
(
idLiquid
);
parcel
.
YSolid
()
=
this
->
composition
().
Y0
(
idSolid
);
}
template
<
class
CloudType
>
void
Foam
::
ReactingMultiphaseCloud
<
CloudType
>::
checkParcelProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
)
{
CloudType
::
checkParcelProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
if
(
fullyDescribed
)
{
label
idGas
=
this
->
composition
().
idGas
();
label
idLiquid
=
this
->
composition
().
idLiquid
();
label
idSolid
=
this
->
composition
().
idSolid
();
this
->
checkSuppliedComposition
(
parcel
.
YGas
(),
...
...
@@ -198,18 +211,6 @@ void Foam::ReactingMultiphaseCloud<CloudType>::setParcelThermoProperties
}
template
<
class
CloudType
>
void
Foam
::
ReactingMultiphaseCloud
<
CloudType
>::
checkParcelProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
)
{
CloudType
::
checkParcelProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
}
template
<
class
CloudType
>
void
Foam
::
ReactingMultiphaseCloud
<
CloudType
>::
storeState
()
{
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H
View file @
64f230ae
...
...
@@ -244,8 +244,7 @@ public:
void
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
);
//- Check parcel properties
...
...
src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C
View file @
64f230ae
...
...
@@ -237,17 +237,13 @@ template<class CloudType>
void
Foam
::
ThermoCloud
<
CloudType
>::
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
)
{
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
);
if
(
!
fullyDescribed
)
{
parcel
.
T
()
=
constProps_
.
T0
();
parcel
.
Cp
()
=
constProps_
.
Cp0
();
}
parcel
.
T
()
=
constProps_
.
T0
();
parcel
.
Cp
()
=
constProps_
.
Cp0
();
}
...
...
src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H
View file @
64f230ae
...
...
@@ -285,8 +285,7 @@ public:
void
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
);
//- Check parcel properties
...
...
src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
View file @
64f230ae
...
...
@@ -593,7 +593,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
);
// Check/set new parcel thermo properties
cloud
.
setParcelThermoProperties
(
*
pPtr
,
dt
,
fullyDescribed
()
);
cloud
.
setParcelThermoProperties
(
*
pPtr
,
dt
);
// Assign new parcel properties in injection model
setProperties
(
parcelI
,
newParcels
,
timeInj
,
*
pPtr
);
...
...
@@ -702,7 +702,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
);
// Check/set new parcel thermo properties
cloud
.
setParcelThermoProperties
(
*
pPtr
,
0
.
0
,
fullyDescribed
()
);
cloud
.
setParcelThermoProperties
(
*
pPtr
,
0
.
0
);
// Assign new parcel properties in injection model
setProperties
(
parcelI
,
newParcels
,
0
.
0
,
*
pPtr
);
...
...
src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C
View file @
64f230ae
...
...
@@ -161,23 +161,19 @@ template<class CloudType>
void
Foam
::
SprayCloud
<
CloudType
>::
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
)
{
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
,
fullyDescribed
);
CloudType
::
setParcelThermoProperties
(
parcel
,
lagrangianDt
);
if
(
!
fullyDescribed
)
{
const
liquidMixtureProperties
&
liqMix
=
this
->
composition
().
liquids
();
const
liquidMixtureProperties
&
liqMix
=
this
->
composition
().
liquids
();
const
scalarField
&
Y
(
parcel
.
Y
());
scalarField
X
(
liqMix
.
X
(
Y
));
const
scalarField
&
Y
(
parcel
.
Y
());
scalarField
X
(
liqMix
.
X
(
Y
));
// override rho and Cp from constantProperties
parcel
.
Cp
()
=
liqMix
.
Cp
(
parcel
.
pc
(),
parcel
.
T
(),
X
);
parcel
.
rho
()
=
liqMix
.
rho
(
parcel
.
pc
(),
parcel
.
T
(),
X
);
}
// override rho and Cp from constantProperties
parcel
.
Cp
()
=
liqMix
.
Cp
(
parcel
.
pc
(),
parcel
.
T
(),
X
);
parcel
.
rho
()
=
liqMix
.
rho
(
parcel
.
pc
(),
parcel
.
T
(),
X
);
}
...
...
src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H
View file @
64f230ae
...
...
@@ -213,8 +213,7 @@ public:
void
setParcelThermoProperties
(
parcelType
&
parcel
,
const
scalar
lagrangianDt
,
const
bool
fullyDescribed
const
scalar
lagrangianDt
);
//- Check parcel properties
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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