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
eb013de3
Commit
eb013de3
authored
Jan 27, 2011
by
andy
Browse files
ENH: using constant pressure approx for particle cell source update
parent
07e35657
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C
View file @
eb013de3
...
...
@@ -50,16 +50,19 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
if
(
pc_
<
td
.
cloud
().
constProps
().
pMin
())
{
WarningIn
(
"void Foam::ReactingParcel<ParcelType>::setCellValues"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed pressure in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
pMin
()
<<
nl
<<
endl
;
if
(
debug
)
{
WarningIn
(
"void Foam::ReactingParcel<ParcelType>::setCellValues"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed pressure in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
pMin
()
<<
nl
<<
endl
;
}
pc_
=
td
.
cloud
().
constProps
().
pMin
();
}
...
...
@@ -86,54 +89,50 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
return
;
}
scalar
massCell
=
this
->
massCell
(
cellI
);
const
scalar
massCell
=
this
->
massCell
(
cellI
);
const
scalar
V
=
td
.
cloud
().
pMesh
().
cellVolumes
()[
cellI
];
this
->
rhoc_
+=
addedMass
/
V
;
this
->
rhoc_
+=
addedMass
/
td
.
cloud
().
pMesh
().
cellVolumes
()[
cellI
];
scalar
massCellNew
=
massCell
+
addedMass
;
const
scalar
massCellNew
=
massCell
+
addedMass
;
this
->
Uc_
+=
td
.
cloud
().
UTrans
()[
cellI
]
/
massCellNew
;
scalar
CpEff
=
0
.
0
;
scalar
CsEff
=
0
.
0
;
scalar
Csc
=
0
.
0
;
if
(
addedMass
>
ROOTVSMALL
)
{
forAll
(
td
.
cloud
().
rhoTrans
(),
i
)
{
scalar
Y
=
td
.
cloud
().
rhoTrans
(
i
)[
cellI
]
/
addedMass
;
CpEff
+=
Y
*
td
.
cloud
().
composition
().
carrier
().
Cp
(
i
,
this
->
Tc_
);
scalar
W
=
td
.
cloud
().
composition
().
carrier
().
W
(
i
);
CsEff
+=
td
.
cloud
().
rhoTrans
(
i
)[
cellI
]
/
V
*
Y
/
W
;
scalar
Yc
=
td
.
cloud
().
composition
().
carrier
().
Y
(
i
)[
cellI
];
Csc
+=
massCell
/
V
*
Yc
/
W
;
}
}
CsEff
=
(
massCell
*
Csc
+
addedMass
*
CsEff
)
/
massCellNew
;
const
scalar
Cpc
=
td
.
CpInterp
().
psi
()[
cellI
];
this
->
Cpc_
=
(
massCell
*
Cpc
+
addedMass
*
CpEff
)
/
massCellNew
;
this
->
Tc_
+=
td
.
cloud
().
hsTrans
()[
cellI
]
/
(
this
->
Cpc_
*
massCellNew
);
if
(
this
->
Tc_
<
td
.
cloud
().
constProps
().
TMin
())
if
(
debug
&&
(
this
->
Tc_
<
td
.
cloud
().
constProps
().
TMin
())
)
{
WarningIn
(
"void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
if
(
debug
)
{
WarningIn
(
"void Foam::ReactingParcel<ParcelType>::"
"cellValueSourceCorrection"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
}
this
->
Tc_
=
td
.
cloud
().
constProps
().
TMin
();
}
this
->
pc_
=
CsEff
*
specie
::
RR
*
this
->
Tc_
;
// constant pressure
// this->pc_ = this->pc_;
}
...
...
src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
View file @
eb013de3
...
...
@@ -49,16 +49,19 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
if
(
Tc_
<
td
.
cloud
().
constProps
().
TMin
())
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::setCellValues"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
if
(
debug
)
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::setCellValues"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
}
Tc_
=
td
.
cloud
().
constProps
().
TMin
();
}
...
...
@@ -81,16 +84,19 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
if
(
Tc_
<
td
.
cloud
().
constProps
().
TMin
())
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
if
(
debug
)
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection"
"("
"TrackData&, "
"const scalar, "
"const label"
")"
)
<<
"Limiting observed temperature in cell "
<<
cellI
<<
" to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
}
Tc_
=
td
.
cloud
().
constProps
().
TMin
();
}
...
...
@@ -116,21 +122,24 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
if
(
Ts
<
td
.
cloud
().
constProps
().
TMin
())
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::calcSurfaceValues"
"("
"TrackData&, "
"const label, "
"const scalar, "
"scalar&, "
"scalar&, "
"scalar&, "
"scalar&, "
"scalar&"
") const"
)
<<
"Limiting parcel surface temperature to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
if
(
debug
)
{
WarningIn
(
"void Foam::ThermoParcel<ParcelType>::calcSurfaceValues"
"("
"TrackData&, "
"const label, "
"const scalar, "
"scalar&, "
"scalar&, "
"scalar&, "
"scalar&, "
"scalar&"
") const"
)
<<
"Limiting parcel surface temperature to "
<<
td
.
cloud
().
constProps
().
TMin
()
<<
nl
<<
endl
;
}
Ts
=
td
.
cloud
().
constProps
().
TMin
();
}
...
...
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