Better interface to forcing.

This commit is contained in:
Miikka Vaisala
2019-07-02 16:35:14 +08:00
parent 0600790f41
commit d0eb308f17
3 changed files with 13 additions and 6 deletions

View File

@@ -38,6 +38,10 @@ AC_chi = 0.0001
// Forcing
AC_relhel = 0.0
AC_forcing_magnitude = 1e-5
AC_kmin = 0.8
AC_kmax = 1.2
// Entropy
AC_cp_sound = 1.0

View File

@@ -142,7 +142,6 @@ extern "C" {
FUNC(AC_cs_sound), \
FUNC(AC_eta), \
FUNC(AC_mu0), \
FUNC(AC_relhel), \
FUNC(AC_cp_sound), \
FUNC(AC_gamma), \
FUNC(AC_cv_sound), \
@@ -160,6 +159,9 @@ extern "C" {
FUNC(AC_lnrho_out),\
/* Forcing parameters. User configured. */\
FUNC(AC_forcing_magnitude),\
FUNC(AC_relhel), \
FUNC(AC_kmin), \
FUNC(AC_kmax), \
/* Forcing parameters. Set by the generator. */\
FUNC(AC_forcing_phase),\
FUNC(AC_k_forcex),\

View File

@@ -166,6 +166,7 @@ static inline void
helical_forcing_special_vector(AcReal3* ff_hel_re, AcReal3* ff_hel_im, const AcReal3 k_force,
const AcReal3 e_force, const AcReal relhel)
{
// k dot e
AcReal3 kdote;
kdote.x = k_force.x * e_force.x;
@@ -385,11 +386,11 @@ run_simulation(void)
AcReal bin_save_t = mesh_info.real_params[AC_bin_save_t];
AcReal bin_crit_t = bin_save_t;
//Placeholders until determined properly
AcReal magnitude = 1e-5;
AcReal relhel = 0.0;
AcReal kmin = 0.8;
AcReal kmax = 1.2;
//Forcing properties
AcReal relhel = mesh_info.real_params[AC_relhel];
AcReal magnitude = mesh_info.real_params[AC_forcing_magnitude];
AcReal kmin = mesh_info.real_params[AC_kmin];
AcReal kmax = mesh_info.real_params[AC_kmax];
AcReal kaver = (kmax - kmin)/AcReal(2.0);