Work integral

Bug/problem reports for any of the GYRE executables (gyre_ad, gyre_nad, etc)
ehsan
Posts: 88
Joined: Sun Jun 16, 2013 11:31 am

Re: Work integral

Post by ehsan » Sat Oct 04, 2014 10:38 am

Solved!
You were right Rich. The problem was with few lines before my plotting command, where I was fiddling around with dic['dW_dx'] array stored in the dictionary. Since dictionaries more and less act like pointers in Python, they come with their own danger.
In other words, my old line was:

Code: Select all

      yvals = np.sign(dic['dW_dx']) * np.log10(np.abs(dic['dW_dx']))
but now it looks more and less like:

Code: Select all

      yvals = np.sign(copy.deepcopy(dic['dW_dx'])) * np.log10(np.abs(copy.deepcopy(dic['dW_dx'])))
and problem is solved. Now my integrations are unaffected by the former lines. Please consider the attached plot.

Sorry about bothering you with my mistakes. Now, at least I'm sure I can externally reproduce the net cumulative work.

Best regards
Ehsan.
Attachments
dW_dx-n_pg-38.png
dW_dx-n_pg-38.png (89.29 KiB) Viewed 1593 times

Post Reply