Skip to content
Snippets Groups Projects
Commit 927725f9 authored by Filip Husko's avatar Filip Husko Committed by Matthieu Schaller
Browse files

Fix jet initial velocities

parent d9ec45e2
No related branches found
No related tags found
1 merge request!1764Fix jet initial velocities
...@@ -1014,8 +1014,10 @@ runner_iact_nonsym_bh_gas_feedback( ...@@ -1014,8 +1014,10 @@ runner_iact_nonsym_bh_gas_feedback(
vel_kick_direction[1] = direction * bi->jet_direction[1]; vel_kick_direction[1] = direction * bi->jet_direction[1];
vel_kick_direction[2] = direction * bi->jet_direction[2]; vel_kick_direction[2] = direction * bi->jet_direction[2];
/* Get the initial velocity */ /* Get the initial velocity in the frame of the black hole */
const float v_init[3] = {xpj->v_full[0], xpj->v_full[1], xpj->v_full[2]}; const float v_init[3] = {xpj->v_full[0] - bi->v[0],
xpj->v_full[1] - bi->v[1],
xpj->v_full[2] - bi->v[2]};
/* We compute this final velocity by requiring that the final energy and /* We compute this final velocity by requiring that the final energy and
* the inital one differ by the energy received by the particle, i.e. * the inital one differ by the energy received by the particle, i.e.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment