Closed jonasmatu closed 2 weeks ago
Hi, thank you for sharing this problem with us.
This error actually happened while raising a different error, which is supposed to say
"Hydrodynamics error: Not able to find vp in matchDeflagOrHyb. Can sometimes be caused by a negative sound speed squared. If that is the case, try decreasing phaseTracerTol or the temperature scale, which will improve the potential's interpolation."
Can you try to decrease phaseTracerTol, either by changing the value in the config file (if you do use a config file) or by changing it manually with manager.config.configThermodynamics.phaseTracerTol = X
just after initializing the manager. In the meantime I'll fix the bug that prevented that error message from being shown.
Hi, now the intended error message WallGo.exceptions.WallGoError: Invalid sound speed at nucleation temperature
appears, thanks!
I decreased the phaseTracerTol
value, without success . So I put a few print statements in HydrodynamicsTemplateModel.__init__()
, to see if the correct minimum is found. It appears that the sound speed is calculated twice for the same values of thermodynamics.phaseLowT, thermodynamics.phaseHighT
and thermodynamics.Tnucl
, and for the second time (I assume after the phase tracing) it becomes negative.
Found phase 1: phi = [[0.]], Veff(phi) = [-2.13551065e+09], T = 218.65003776798793
Found phase 2: phi = [[669.660973]], Veff(phi) = [-2.14234181e+09], T = 218.65003776798793
Calculated sound speed at thermodynamics.Tnucl: 218.65003776798793
thermodynamics.phaseLowT = [[669.660973]]
thermodynamics.phaseHighT = [[0.]]
cb2 = 0.28794985267040807
cs2 = 0.3334743711124421
vwLTE in the template model: 0.49323997645549306
Temperature ranges:
High-T phase: TMin = 206.36505919701867, TMax = 284.69438598573237
Low-T phase: TMin = 174.92320181873708, TMax = 227.40790617634428
Calculated sound speed at thermodynamics.Tnucl: 218.65003776798793
thermodynamics.phaseLowT = [[669.660973]]
thermodynamics.phaseHighT = [[0.]]
cb2 = 0.27313490684868424
cs2 = -0.12086005903796496
I checked the calculation of the sound speed around the nucleation temperature and get a bit of a wired behavior. To me it seems that around the nucleation temperature the sound speed becomes unstable. I attached a plot of the sound speed in the symmetric phase around the nucleation temperature (dashed vertical line) below.
That indeed looks like an issue with the phase tracing. Could you try increasing the temperatureVariationScale (temperatureScale in older version of the code)? If you don't mind, maybe you can send us your code via email? Might be easier to see what's going on.
Thanks for helping us find this funny feature! It turned out that the step size in the phase tracing was too small, and this was fixed in https://github.com/Wall-Go/WallGo/pull/335 Could you let us know if it solves your problem?
Yes this now fixes the problem. Thanks!
In the implementation of a new model I get an AttributeError: