-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Limit velocity and temperature in Kinetic jet injection region #75
Conversation
src/pgen/cluster/agn_feedback.cpp
Outdated
cons(IM1, k, j, i) += vceil/v; | ||
cons(IM2, k, j, i) += vceil/v; | ||
cons(IM3, k, j, i) += vceil/v; | ||
prim(IV1, k, j, i) += vceil/v; | ||
prim(IV2, k, j, i) += vceil/v; | ||
prim(IV3, k, j, i) += vceil/v; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be *=
, don't they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/pgen/cluster/agn_feedback.cpp
Outdated
//Apply internal energy ceiling as a pressure ceiling | ||
const Real internal_e = prim(IPR, k, j, i)/( gm1 * prim(IDN, k, j, i) ); | ||
if( internal_e > eceil){ | ||
cons(IEN, k, j, i) -= (internal_e - eceil); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing density factor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@par-hermes format |
@pgrete Since this fix seems to be working fine for the current suite of simulations, we can merge this into the other PR if it's alright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment to consistency between debug and non-debug builds.
src/pgen/cluster.cpp
Outdated
|
||
if (va2 > vAceil2) { | ||
//Increase the density to match the alfven velocity ceiling | ||
const Real rho_new = std::sqrt(vAceil2/B2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const Real rho_new = std::sqrt(vAceil2/B2); | |
const Real rho_new = std::sqrt(B2/vAceil2); |
vAceil2 also has the density in the denominator, doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, that's a pretty big mistake
Co-authored-by: Philipp Grete <[email protected]>
I think this has been tested enough over the past weeks. I'm merging this and closing the alternative #76 |
* Move cluster pgen to MeshPgen to allow for reductions * Prepare hse test case for init pert * Git add sigma_v plus test for cluster pgen * Fix index error in cooling test * Move iFT to utils from turb driver * Isolate fmft construtor * Separate OU and FT parts from turbulence pgen * Make FMFT smooth and consistent for mesh refinement runs * Fix update of internal RNG state * Remove restriction on unit domain dims * Fix k_vec check on device * Add init perturb for velocity field * Move construction of modes to shared util * Allow ghost zones filling in FMFT * Add initial magnetic field perturbations * Add doc for cluster init perturb * Fix typo for using host view * Fixed entropy for ASCENT output * Clarified feedback efficiency error * WIP: Limit velocity and temperature in Kinetic jet injection region (#75) * Velocity and temperature ceilings * Added ceilings to velocity and temperature within AGN region * Fixed to apply only to kinetic jet injection zone * Fixed missing magnetic energy from temperature ceil * Fixed typos in ceilings * Fixed arguments for EOS constructor * cpp-py-formatter * Added V, V_a, T, D clipping within defined radius * Check kinetic feedback in release builds * Fixed Va ceiling typo * Fixed cluster/clips -> problem/cluster/clips * Update src/pgen/cluster.cpp Co-authored-by: Philipp Grete <[email protected]> * Fix comments * Fix formattin --------- Co-authored-by: Forrest Glines <[email protected]> Co-authored-by: Forrest Glines <[email protected]> Co-authored-by: par-hermes <[email protected]> Co-authored-by: Philipp Grete <[email protected]> * Enable first order flux correct for non-vl2 integrators * Fix comments * Fix weird missing header for non-mpi non-hdf5 builds --------- Co-authored-by: Forrest Glines <[email protected]> Co-authored-by: Forrest Glines <[email protected]> Co-authored-by: forrestglines <[email protected]> Co-authored-by: Forrest Glines <[email protected]> Co-authored-by: par-hermes <[email protected]>
Limits the velocity and temperature within the kinetic jet injection zone to below specified ceilings. In the current state of this PR, this will enforce the ceiling whether or not hitting the ceiling was due to kinetic jet injection or not. If this ceiling fixes the issue we could explore less aggressive ceilings.