Conversation
Create a new StateFlooded class derived from CoolProp State class
|
In FloodState, you should almost never be calling PropsSI, you should always try to call self.pAS.keyed_output instead |
PDSim/core/StateFlooded.pyx
Outdated
There was a problem hiding this comment.
Should not do it like this, you should call
self.pAS.keyed_output(iTcrit)
|
You need to implement all the methods of the base class - get_T, get_p, etc. You'll notice that in the pdsim code, we call the get_T, get_rho.. methods in order to not need to pass at all into the python layer. If you don't implement these functions, it will call the base class function, which is not what you want at all. |
PDSim/core/StateFlooded.pxd
Outdated
There was a problem hiding this comment.
MUST(!) derive from State class. That is the whole point.
There was a problem hiding this comment.
Also, better to name StateFlooded - that is more standard. Class definitions should be CamelCase, without underscores.
|
You should try to get your code to compile now. You will need to add your file in setup.py (in the list of pyx files). |
PDSim/core/StateFlooded.pyx
Outdated
There was a problem hiding this comment.
Don't do it like this - in the init function for the class you need to create the pointer to the AbstractState as is done in the State class in CoolProp. Otherwise this makes a local definition for HEOS which is definitely not what you want.
There was a problem hiding this comment.
Not sure if it is necessary to define p_crit and T_crit within StateFlooded class, since it can be called from PDSim directly from AbstractState class.
This reverts commit 4b9761d.
matplotlib.nxutils has been removed after v1.2
No description provided.