Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
physical problem
#2
I added at line 16
print(sigma, n)
and I ran the code with python -W error. The output shows where the warning occurs
Output:
... -0.7000000000000153 -0.6000000000000156 -0.7000000000000153 -0.500000000000016 -0.7000000000000153 -0.40000000000001634 -0.7000000000000153 -0.3000000000000167 -0.7000000000000153 -0.20000000000001705 -0.7000000000000153 -0.10000000000001741 -0.7000000000000153 -1.7763568394002505e-14 Traceback (most recent call last): File "/home/eric/Projets/Scratch/2023-01/paillasse/pf/sophiaphys.py", line 31, in <module> sol=odeint(dSdx, S_0, x) File "/usr/lib/python3/dist-packages/scipy/integrate/_odepack_py.py", line 247, in odeint warnings.warn(warning_msg, ODEintWarning) scipy.integrate._odepack_py.ODEintWarning: Excess work done on this call (perhaps wrong Dfun type). Run with full_output = 1 to get quantitative information. λ
So the error occurs at some point where n is almost equal to 0. This may help find why the solver fails at this point.
Reply


Messages In This Thread
physical problem - by Sofiaphys - Nov-22-2023, 07:58 PM
RE: physical problem - by Gribouillis - Nov-23-2023, 12:23 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020