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
TurTLE
TurTLE
Commits
ab0c50ac
Commit
ab0c50ac
authored
Feb 13, 2020
by
Niklas Schnierstein
Committed by
Cristian Lalescu
Feb 19, 2020
Browse files
added factor for ou correlation time
parent
fa65db24
Changes
3
Hide whitespace changes
Inline
Side-by-side
cpp/full_code/ornstein_uhlenbeck_process.cpp
View file @
ab0c50ac
...
...
@@ -16,6 +16,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process(
double
ou_kmin
,
double
ou_kmax
,
double
ou_energy_amplitude
,
double
ou_gamma_factor
,
double
DKX
,
double
DKY
,
double
DKZ
,
...
...
@@ -44,6 +45,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process(
this
->
ou_kmin_squ
=
pow
(
ou_kmin
,
2
);
this
->
ou_kmax_squ
=
pow
(
ou_kmax
,
2
);
this
->
ou_energy_amplitude
=
ou_energy_amplitude
;
this
->
ou_gamma_factor
=
ou_gamma_factor
;
this
->
epsilon
=
pow
((
this
->
ou_energy_amplitude
/
this
->
kolmogorov_constant
),
3.
/
2.
);
assert
(
this
->
kk
->
kM2
>=
this
->
ou_kmax_squ
);
...
...
cpp/full_code/ornstein_uhlenbeck_process.hpp
View file @
ab0c50ac
...
...
@@ -19,6 +19,7 @@ class ornstein_uhlenbeck_process{
double
ou_kmin_squ
;
double
ou_kmax_squ
;
double
ou_energy_amplitude
;
double
ou_gamma_factor
;
double
kolmogorov_constant
=
2
;
double
epsilon
;
...
...
@@ -38,6 +39,7 @@ class ornstein_uhlenbeck_process{
double
ou_kmin
,
double
ou_kmax
,
double
ou_energy_amplitude
,
double
ou_gamma_factor
,
double
DKX
=
1.0
,
double
DKY
=
1.0
,
double
DKZ
=
1.0
,
...
...
@@ -52,7 +54,7 @@ class ornstein_uhlenbeck_process{
inline
double
gamma
(
double
kabs
)
{
return
pow
(
kabs
,
2.
/
3.
)
*
this
->
kolmogorov_constant
*
sqrt
(
this
->
kolmogorov_constant
/
return
this
->
ou_gamma_factor
*
pow
(
kabs
,
2.
/
3.
)
*
this
->
kolmogorov_constant
*
sqrt
(
this
->
kolmogorov_constant
/
this
->
ou_energy_amplitude
);
}
...
...
cpp/full_code/ou_vorticity_equation.hpp
View file @
ab0c50ac
...
...
@@ -24,6 +24,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be>
double
ou_kmin
,
double
ou_kmax
,
double
ou_energy_amplitude
,
double
ou_gamma_factor
,
double
DKX
=
1.0
,
double
DKY
=
1.0
,
double
DKZ
=
1.0
,
...
...
@@ -34,7 +35,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be>
this
->
ou
=
new
ornstein_uhlenbeck_process
<
rnumber
,
be
>
(
NAME
,
nx
,
ny
,
nz
,
ou_kmin
,
ou_kmax
,
ou_energy_amplitude
,
ou_kmin
,
ou_kmax
,
ou_energy_amplitude
,
ou_gamma_factor
,
DKX
,
DKY
,
DKZ
,
FFTW_PLAN_RIGOR
);
this
->
ou_forcing_type
=
"replace"
;
}
...
...
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