Commit ab0c50ac authored by Niklas Schnierstein's avatar Niklas Schnierstein Committed by Cristian Lalescu
Browse files

added factor for ou correlation time

parent fa65db24
...@@ -16,6 +16,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process( ...@@ -16,6 +16,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process(
double ou_kmin, double ou_kmin,
double ou_kmax, double ou_kmax,
double ou_energy_amplitude, double ou_energy_amplitude,
double ou_gamma_factor,
double DKX, double DKX,
double DKY, double DKY,
double DKZ, double DKZ,
...@@ -44,6 +45,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process( ...@@ -44,6 +45,7 @@ ornstein_uhlenbeck_process<rnumber,be>::ornstein_uhlenbeck_process(
this->ou_kmin_squ = pow(ou_kmin,2); this->ou_kmin_squ = pow(ou_kmin,2);
this->ou_kmax_squ = pow(ou_kmax,2); this->ou_kmax_squ = pow(ou_kmax,2);
this->ou_energy_amplitude = ou_energy_amplitude; 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.); this->epsilon = pow((this->ou_energy_amplitude/this->kolmogorov_constant), 3./2.);
assert(this->kk->kM2 >= this->ou_kmax_squ); assert(this->kk->kM2 >= this->ou_kmax_squ);
......
...@@ -19,6 +19,7 @@ class ornstein_uhlenbeck_process{ ...@@ -19,6 +19,7 @@ class ornstein_uhlenbeck_process{
double ou_kmin_squ; double ou_kmin_squ;
double ou_kmax_squ; double ou_kmax_squ;
double ou_energy_amplitude; double ou_energy_amplitude;
double ou_gamma_factor;
double kolmogorov_constant = 2; double kolmogorov_constant = 2;
double epsilon; double epsilon;
...@@ -38,6 +39,7 @@ class ornstein_uhlenbeck_process{ ...@@ -38,6 +39,7 @@ class ornstein_uhlenbeck_process{
double ou_kmin, double ou_kmin,
double ou_kmax, double ou_kmax,
double ou_energy_amplitude, double ou_energy_amplitude,
double ou_gamma_factor,
double DKX = 1.0, double DKX = 1.0,
double DKY = 1.0, double DKY = 1.0,
double DKZ = 1.0, double DKZ = 1.0,
...@@ -52,7 +54,7 @@ class ornstein_uhlenbeck_process{ ...@@ -52,7 +54,7 @@ class ornstein_uhlenbeck_process{
inline double gamma(double kabs) 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); this->ou_energy_amplitude);
} }
......
...@@ -24,6 +24,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be> ...@@ -24,6 +24,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be>
double ou_kmin, double ou_kmin,
double ou_kmax, double ou_kmax,
double ou_energy_amplitude, double ou_energy_amplitude,
double ou_gamma_factor,
double DKX = 1.0, double DKX = 1.0,
double DKY = 1.0, double DKY = 1.0,
double DKZ = 1.0, double DKZ = 1.0,
...@@ -34,7 +35,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be> ...@@ -34,7 +35,7 @@ class ou_vorticity_equation : public vorticity_equation<rnumber, be>
this->ou = new ornstein_uhlenbeck_process<rnumber,be>( this->ou = new ornstein_uhlenbeck_process<rnumber,be>(
NAME, NAME,
nx, ny, nz, 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); DKX, DKY, DKZ, FFTW_PLAN_RIGOR);
this->ou_forcing_type = "replace"; this->ou_forcing_type = "replace";
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment