Forcing function bug correction.
This commit is contained in:
@@ -607,7 +607,7 @@ forcing(int3 globalVertexIdx, Scalar dt)
|
|||||||
Vector force = helical_forcing(magnitude, k_force, xx, ff_re, ff_im, phase);
|
Vector force = helical_forcing(magnitude, k_force, xx, ff_re, ff_im, phase);
|
||||||
|
|
||||||
// Scaling N = magnitude*cs*sqrt(k*cs/dt) * dt
|
// Scaling N = magnitude*cs*sqrt(k*cs/dt) * dt
|
||||||
const Scalar NN = cs * sqrt(AC_kaver * cs);
|
const Scalar NN = cs * magnitude * sqrt(AC_kaver * cs);
|
||||||
// MV: Like in the Pencil Code. I don't understandf the logic here.
|
// MV: Like in the Pencil Code. I don't understandf the logic here.
|
||||||
force.x = sqrt(dt) * NN * force.x;
|
force.x = sqrt(dt) * NN * force.x;
|
||||||
force.y = sqrt(dt) * NN * force.y;
|
force.y = sqrt(dt) * NN * force.y;
|
||||||
|
@@ -48,7 +48,8 @@ AC_relhel = 0.0
|
|||||||
AC_forcing_magnitude = 1e-5
|
AC_forcing_magnitude = 1e-5
|
||||||
AC_kmin = 0.8
|
AC_kmin = 0.8
|
||||||
AC_kmax = 1.2
|
AC_kmax = 1.2
|
||||||
|
// Switches forcing off and accretion on
|
||||||
|
AC_switch_accretion = 0
|
||||||
|
|
||||||
// Entropy
|
// Entropy
|
||||||
AC_cp_sound = 1.0
|
AC_cp_sound = 1.0
|
||||||
|
@@ -171,11 +171,14 @@ helical_forcing_special_vector(AcReal3* ff_hel_re, AcReal3* ff_hel_im, const AcR
|
|||||||
// k_cross_k_cross_e.z/denominator};
|
// k_cross_k_cross_e.z/denominator};
|
||||||
|
|
||||||
// See PC forcing.f90 forcing_hel_both()
|
// See PC forcing.f90 forcing_hel_both()
|
||||||
*ff_hel_re = (AcReal3){kabs * k_cross_e.x / denominator, kabs * k_cross_e.y,
|
*ff_hel_im = (AcReal3){kabs * k_cross_e.x / denominator,
|
||||||
kabs * k_cross_e.z};
|
kabs * k_cross_e.y / denominator,
|
||||||
|
kabs * k_cross_e.z / denominator};
|
||||||
|
|
||||||
|
*ff_hel_re = (AcReal3){relhel * k_cross_k_cross_e.x / denominator,
|
||||||
|
relhel * k_cross_k_cross_e.y / denominator,
|
||||||
|
relhel * k_cross_k_cross_e.z / denominator};
|
||||||
|
|
||||||
*ff_hel_im = (AcReal3){relhel * k_cross_k_cross_e.x / denominator, relhel * k_cross_k_cross_e.y,
|
|
||||||
relhel * k_cross_k_cross_e.z};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tool for loading forcing vector information into the device memory
|
// Tool for loading forcing vector information into the device memory
|
||||||
|
Reference in New Issue
Block a user