orcmkit / ORCmKit

ORC Modeling Kit: Tools for the modeling of ORC power systems in Python, Matlab and EES
MIT License
21 stars 17 forks source link

Python code pressure problem! #4

Open ChuZhenHao-ORC opened 8 years ago

ChuZhenHao-ORC commented 8 years ago

Hi, In the python version of ORCmkit, why the pressure for calculate rho do not need plus 100, while in calculate h or s, the pressure need plus 100? for example in module "Pump_Centrifugal_Kortrijk.py" below here!

    @@#Pump ref parameters
    deltaP_pp_ref = 1000   #kPa
    r_pp_ref = 9
    rho_pp_ref = 1000#Props('D','P',120,'T',15+273.15,'R245FA') #kg/s
    f_pp_ref = 30 #Hz
    #Inlet state
   **** hin=PropsSI('H','T',self.Tin+273.15,'P',self.pin_r*1000+100,self.Ref)/1000
   ****self.s_in = PropsSI('S','T',self.Tin+273.15,'P',self.pin_r*1000+100,self.Ref)/1000

    #Compute the pressure difference between the outlet and the inlet of the pump
    deltaP_pp = (self.pout_r-self.pin_r)  #kPa
    deltaP_pp_star = (deltaP_pp-deltaP_pp_ref)/deltaP_pp_ref
    f_pp = self.f_pp
    f_pp_star= (f_pp- f_pp_ref)/f_pp_ref

    r_pp = self.pout_r/self.pin_r
    r_pp_star = (r_pp-r_pp_ref)/r_pp_ref

   **** rho_su_pp = PropsSI('D','P',self.pin_r*1000,'T',self.Tin+273.15,self.Ref)
    rho_su_pp_star =  (rho_su_pp-rho_pp_ref)/rho_pp_ref
davideziviani commented 8 years ago

The +100 was used to avoid an error call of CoolProp when the calculation was getting close within 1e-4% to saturated conditions. To avoid it, I added a dummy value that does not influence the property calculation, but avoids the error. CoolProp has been updated significantly so I think you can remove it. Let me know if you bump into that CoolProp error.

davideziviani commented 7 years ago

Could you please indicate if that solved/explained the issue? If so, I will close this issue. Thank you!