Skip to content

Commit

Permalink
Fix misleading error messages for Bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
AgenttiX committed Dec 3, 2024
1 parent 26dbcba commit 5254976
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pttools/bubble/bubble.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,15 @@ def solve(
self.add_note(msg)
self.negative_entropy_flux = True
if self.va_entropy_density_diff < 0:
msg = "Entropy density should not be negative! Now entropy is decreasing. " \
msg = "Entropy density change should not be negative! Now entropy is decreasing. " \
f"Got: {self.va_entropy_density_diff} with " \
f"model={self.model.label_unicode}, v_wall={self.v_wall}, alpha_n={self.alpha_n}"
if log_negative_entropy:
logger.warning(msg)
self.add_note(msg)
self.negative_net_entropy_change = True
if self.va_thermal_energy_density_diff < 0:
msg = "Thermal energy density is negative. The bubble is therefore working as a heat engine. " \
msg = "Thermal energy density change is negative. The bubble is therefore working as a heat engine. " \
f"Got: {self.va_thermal_energy_density_diff}"
logger.warning(msg)
self.add_note(msg)
Expand Down

0 comments on commit 5254976

Please sign in to comment.