Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dg
dg
Commits
890353f1
Commit
890353f1
authored
Dec 01, 2016
by
Jonathan Lambrechts
Browse files
fix flat rate particle mortality
parent
d496ef2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/slimParticles/dgParticleTracker2D.cpp
View file @
890353f1
...
...
@@ -843,7 +843,7 @@ int dgParticleTracker2D::isDead(double t)
case
0
:
return
0
;
case
1
:
/* Const. mortality rate */
mortRatePerDt
=
_dt
*
_mortRate_max
/
(
3600
.0
*
24
.0
);
mortRatePerDt
=
1
-
pow
(
1
-
_mortRate_max
,
_dt
/
(
3600
*
24
)
);
if
(
((
randoraw
()
/
2
)
+
0.5
)
<
mortRatePerDt
)
return
1
;
else
return
0
;
case
2
:
/* Weibull mortality rate */
...
...
modules/slimParticles/dgParticleTracker2D.h
View file @
890353f1
...
...
@@ -370,6 +370,9 @@ public:
void
addMortality
(
int
type
,
double
rateMax
,
double
weibullLambda
=
0
,
double
weibullNu
=
0
)
{
_mortFlag
=
true
;
_mortType
=
type
;
if
(
type
!=
1
)
{
Msg
::
Warning
(
"Weibull mortality implementation may be wrong
\n
"
);
}
_mortRate_max
=
rateMax
;
_mortLambda
=
weibullLambda
;
//(Connolly & Baird 2010)lambda = 1/b(Pinder et al. 1978)
_mortNu
=
weibullNu
;
//(Connolly & Baird 2010)nu = c(Pinder et al. 1978)
...
...
Write
Preview
Supports
Markdown
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