-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running multiple separate offdesign calculations in same script #268
Comments
Hi, that's a somewhat "ever green", which you can stumble over when using TESPy more in detail. By specification of the init_path parameter when resetting the variables to the design case the starting values are reset to the design state. Due to the nature of the solver it is always favorable to perform smaller steps in changing parameters to preserve a good initial guess (starting values) for the solution. Change line 268 to nw.solve('offdesign', design_path='./srinath_char', init_path='./srinath_char') On top of that, allow me two remarks on your code. Since v0.4.2 results are available in DataFrames. You can access them by the class names and apply all pandas DataFrame methods further, e.g. calculate the total power of the turbines. total_power = nw.results['Turbine']['P'].sum() Or, you could use a
Best regards |
Hi @fwitte , Thank you once again :) |
You might be able to use the data from the Network |
This issue strongly correlates with #551, closing it here. |
Hi @fwitte ,
The idea that I wish to establish through this code is to check multiple cases one after the other and produce a compiled documentation for the result.
Cases that I wish to establish:
The error that I am facing is the order in which to conduct them. If I do 1, then 2 then 3 then I get the following error after 1:
ValueError: unable to calculate melting line T(p) for polynomial_in_Theta curve for p=611.655; bounds are 611.657,2.18447e+09 Pa
However, if I run 1 in the end, I do not get this error and the program runs smoothly and I get consistent results. I have attached both scripts below in a zip file. They are named with _fail and _work to indicate working code or the one giving the above error.
Between two offdesign calculations I manually try resetting values to the design case. For example, if I change the flow rate of the feedwater input during the simulation, I change it back before running the second case as I could not find a function provided in TesPy to do the same.
Please advise. Thanks!
Offdesign.zip
The text was updated successfully, but these errors were encountered: