Skip to content

Commit

Permalink
fix driving normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Mar 4, 2024
1 parent 1ff3999 commit 96ff9be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions inputs/precipitator_lowres.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ perturb_exponent = 1 # P(k) ~ k^{-2}
#sigma_v = 0
sigma_v = 0.0001 # kpc Myr^{-1}
k_peak = 2
#num_modes = 40
#vertical_driving_only = false
num_modes = 12
vertical_driving_only = true
sol_weight = 1.0
Expand Down
4 changes: 2 additions & 2 deletions src/pgen/precipitator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ void TurbSrcTerm(MeshData<Real> *md, const parthenon::SimTime /*time*/, const Re
Real dv_x = 0;
Real dv_y = 0;
if (!vertical_driving_only) {
dv_x = perturb_pack(b, 0, k, j, i);
dv_y = perturb_pack(b, 1, k, j, i);
dv_x = perturb_pack(b, 0, k, j, i) / v_norm;
dv_y = perturb_pack(b, 1, k, j, i) / v_norm;
}
const Real dv_z = perturb_pack(b, 2, k, j, i) / v_norm;

Expand Down

0 comments on commit 96ff9be

Please sign in to comment.