Skip to content

Commit

Permalink
TreePiece::adjust(): dEtauDot also limits adiabatic heating. (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
trquinn authored Dec 13, 2021
1 parent ee9fd39 commit bdf58f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TreePiece.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,8 @@ void TreePiece::adjust(int iKickRung, int bEpsAccStep, int bGravStep,
}
#endif

if (dEtauDot > 0.0 && p->PdV() < 0.0) { /* Prevent rapid adiabatic cooling */
if (dEtauDot > 0.0) { /* Prevent rapid adiabatic cooling
or heating */
assert(p->PoverRho2() > 0.0);
// Use P/rho as internal energy estimate since "u" may
// be driven to 0 with cooling.
Expand Down

0 comments on commit bdf58f3

Please sign in to comment.