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
38b60d68
Commit
38b60d68
authored
Dec 18, 2014
by
Henry
Browse files
Reduce the stripped parcel mass due to evaporation
Resolves bug-report
http://www.openfoam.org/mantisbt/view.php?id=1295
parent
2cd13e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C
View file @
38b60d68
...
...
@@ -68,42 +68,47 @@ void Foam::SprayParcel<ParcelType>::calc
const
CompositionModel
<
reactingCloudType
>&
composition
=
td
.
cloud
().
composition
();
//
c
heck if parcel belongs to liquid core
//
C
heck if parcel belongs to liquid core
if
(
liquidCore
()
>
0
.
5
)
{
//
l
iquid core parcels should not experience coupled forces
//
L
iquid core parcels should not experience coupled forces
td
.
cloud
().
forces
().
setCalcCoupled
(
false
);
}
//
g
et old mixture composition
//
G
et old mixture composition
const
scalarField
&
Y0
(
this
->
Y
());
scalarField
X0
(
composition
.
liquids
().
X
(
Y0
));
//
c
heck if we have critical or boiling conditions
//
C
heck if we have critical or boiling conditions
scalar
TMax
=
composition
.
liquids
().
Tc
(
X0
);
const
scalar
T0
=
this
->
T
();
const
scalar
pc0
=
this
->
pc_
;
if
(
composition
.
liquids
().
pv
(
pc0
,
T0
,
X0
)
>=
pc0
*
0
.
999
)
{
//
s
et TMax to boiling temperature
//
S
et TMax to boiling temperature
TMax
=
composition
.
liquids
().
pvInvert
(
pc0
,
X0
);
}
//
s
et the maximum temperature limit
//
S
et the maximum temperature limit
td
.
cloud
().
constProps
().
setTMax
(
TMax
);
//
s
tore the parcel properties
//
S
tore the parcel properties
this
->
Cp
()
=
composition
.
liquids
().
Cp
(
pc0
,
T0
,
X0
);
sigma_
=
composition
.
liquids
().
sigma
(
pc0
,
T0
,
X0
);
scalar
rho0
=
composition
.
liquids
().
rho
(
pc0
,
T0
,
X0
);
const
scalar
rho0
=
composition
.
liquids
().
rho
(
pc0
,
T0
,
X0
);
this
->
rho
()
=
rho0
;
const
scalar
mass0
=
this
->
mass
();
mu_
=
composition
.
liquids
().
mu
(
pc0
,
T0
,
X0
);
ParcelType
::
calc
(
td
,
dt
,
cellI
);
if
(
td
.
keepParticle
)
{
// update Cp, sigma, density and diameter due to change in temperature
// Reduce the stripped parcel mass due to evaporation
// assuming the number of particles remains unchanged
this
->
ms
()
-=
this
->
ms
()
*
(
mass0
-
this
->
mass
())
/
mass0
;
// Update Cp, sigma, density and diameter due to change in temperature
// and/or composition
scalar
T1
=
this
->
T
();
const
scalarField
&
Y1
(
this
->
Y
());
...
...
@@ -125,7 +130,7 @@ void Foam::SprayParcel<ParcelType>::calc
{
calcAtomization
(
td
,
dt
,
cellI
);
//
p
reserve the total mass/volume by increasing the number of
//
P
reserve the total mass/volume by increasing the number of
// particles in parcels due to breakup
scalar
d2
=
this
->
d
();
this
->
nParticle
()
*=
pow3
(
d1
/
d2
);
...
...
@@ -136,7 +141,7 @@ void Foam::SprayParcel<ParcelType>::calc
}
}
//
r
estore coupled forces
//
R
estore coupled forces
td
.
cloud
().
forces
().
setCalcCoupled
(
true
);
}
...
...
@@ -163,7 +168,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
scalar
R
=
specie
::
RR
/
Wc
;
scalar
Tav
=
atomization
.
Taverage
(
this
->
T
(),
this
->
Tc
());
//
c
alculate average gas density based on average temperature
//
C
alculate average gas density based on average temperature
scalar
rhoAv
=
this
->
pc
()
/
(
R
*
Tav
);
scalar
soi
=
td
.
cloud
().
injectors
().
timeStart
();
...
...
@@ -171,14 +176,14 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
const
vector
&
pos
=
this
->
position
();
const
vector
&
injectionPos
=
this
->
position0
();
//
d
isregard the continous phase when calculating the relative velocity
//
D
isregard the continous phase when calculating the relative velocity
// (in line with the deactivated coupled assumption)
scalar
Urel
=
mag
(
this
->
U
());
scalar
t0
=
max
(
0
.
0
,
currentTime
-
this
->
age
()
-
soi
);
scalar
t1
=
min
(
t0
+
dt
,
td
.
cloud
().
injectors
().
timeEnd
()
-
soi
);
//
t
his should be the vol flow rate from when the parcel was injected
//
T
his should be the vol flow rate from when the parcel was injected
scalar
volFlowRate
=
td
.
cloud
().
injectors
().
volumeToInject
(
t0
,
t1
)
/
dt
;
scalar
chi
=
0
.
0
;
...
...
@@ -234,7 +239,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
scalar
R
=
specie
::
RR
/
Wc
;
scalar
Tav
=
td
.
cloud
().
atomization
().
Taverage
(
this
->
T
(),
this
->
Tc
());
//
c
alculate average gas density based on average temperature
//
C
alculate average gas density based on average temperature
scalar
rhoAv
=
this
->
pc
()
/
(
R
*
Tav
);
scalar
muAv
=
this
->
muc
();
vector
Urel
=
this
->
U
()
-
this
->
Uc
();
...
...
@@ -316,7 +321,7 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
const
scalarField
&
X
)
const
{
//
m
odifications to take account of the flash boiling on primary break-up
//
M
odifications to take account of the flash boiling on primary break-up
typedef
typename
TrackData
::
cloudType
::
reactingCloudType
reactingCloudType
;
const
CompositionModel
<
reactingCloudType
>&
composition
=
...
...
@@ -333,7 +338,7 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
{
if
(
pv
>=
0
.
999
*
pAmb
)
{
//
l
iquid is boiling - calc boiling temperature
//
L
iquid is boiling - calc boiling temperature
const
liquidProperties
&
liq
=
composition
.
liquids
().
properties
()[
i
];
scalar
TBoil
=
liq
.
pvInvert
(
p0
);
...
...
@@ -368,10 +373,10 @@ void Foam::SprayParcel<ParcelType>::solveTABEq
scalar
r2
=
r
*
r
;
scalar
r3
=
r
*
r2
;
//
i
nverse of characteristic viscous damping time
//
I
nverse of characteristic viscous damping time
scalar
rtd
=
0
.
5
*
TABCmu
*
mu_
/
(
this
->
rho
()
*
r2
);
//
o
scillation frequency (squared)
//
O
scillation frequency (squared)
scalar
omega2
=
TABComega
*
sigma_
/
(
this
->
rho
()
*
r3
)
-
rtd
*
rtd
;
if
(
omega2
>
0
)
...
...
@@ -383,7 +388,7 @@ void Foam::SprayParcel<ParcelType>::solveTABEq
scalar
y1
=
this
->
y
()
-
We
;
scalar
y2
=
this
->
yDot
()
/
omega
;
//
u
pdate distortion parameters
//
U
pdate distortion parameters
scalar
c
=
cos
(
omega
*
dt
);
scalar
s
=
sin
(
omega
*
dt
);
scalar
e
=
exp
(
-
rtd
*
dt
);
...
...
@@ -402,7 +407,7 @@ void Foam::SprayParcel<ParcelType>::solveTABEq
}
else
{
//
r
eset distortion parameters
//
R
eset distortion parameters
this
->
y
()
=
0
;
this
->
yDot
()
=
0
;
}
...
...
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