Hi. I am coding for a batch reactor in DWSIM. I require data of specific heat capacity of individual species in order to complete the reactor. Can someone help me out on how to extract the heat capacity data of individual species from ChemSep, CheDL database?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i am designing a batch reactor. I wanted the parameters of Cp value for the adiabatic condition. I am using the equation (Heat of reaction at temperature T)=(Increase in sensible heat of final products) + (Heat taken by products as latent heat). As of now, i am ignoring phase change and want to design for homogenous system. I require the value of parameters of Cp for finding the heat of reaction at temperature T. I am using the formula (Heat of reaction at standard temperature T0) + (integral from T0 to T of ((delta Cp) * dT)) where delta Cp = sum over all components (stoichometry * Cp). To find the integral value, I require the value of Cp parameters. Please suggest if you know a better method to do this. Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Daniel, I just wanted to see how GetTDependentProperty works. So i made just a material stream with only Argon as component in it. I have written the code as:
a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon","mass")
I am getting the result of a as: Arrayfloat. Can u tell me how to input the parameters?
Thank You
I had written the code: from DWSIM.Thermodynamics import
import math
from System import Array
import clr
clr.AddReference('DWSIM.MathOps.DotNumerics')
from DotNumerics.ODE import
feed=[0]
feed[0]=ims1
a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon",None)
Flowsheet.WriteMessage(str(a))
DWSIM is returning an empty array. I think I have written the arguments in wrong format.
The prescribed format suggested in VB code is:
GetTDependentProperty(ByVal props As Object, ByVal temperature As Double, ByVal compIds As Object, ByRef propVals As Object)
Can you tell me in which argument i have committed an error? Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Even after this modification, it is returning an empty array for a. I am using version 5.6 update 12. This version has the values for heat capacities. right?
I accidentally posted the following question in Help (Classic UI):
"I've written a user-defined method for "Density" and "Viscosity" and added it to the NRTL package.
Now how do I get a specific viscosity in a PythonScript unit operation? I'd like to calculate the viscosity and density for some arbitrary point, something similar to
So now I've found this thread. Seems similar, but I can't use GetTDependentProperty, because I want it to depend on the mixture of different liquids in the stream. So I started reading PropertyPackages/FluidProperties.vb . Initially I thought that I could just call AUX_LIQDENS, for example, because it's declared as Overrideable, and I have written overrides in the package. But unfortunately neither the material stream nor the property package knows about AUX_LIQDENS().
So what should I try next?
Thanks for the help!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pp = ims1.PropertyPackage
pp.CurrentMaterialStream = ims1
dens = pp.AUX_LIQDENS(T, P) # T in K, P in Pa
visc = pp.AUX_LIQVISCm(T, P, 1) # T in K, P in Pa
In the above, DWSIM will use the liquid phase composition from ims1 to calculate liquid density and viscosity.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I am coding for a batch reactor in DWSIM. I require data of specific heat capacity of individual species in order to complete the reactor. Can someone help me out on how to extract the heat capacity data of individual species from ChemSep, CheDL database?
Do you require the Cp value itself or the parameters to calculate it?
I require the parameters to solve it. Also is there a way i can extract the appropriate equation for the corresponding phase? Thank you.
Last edit: The One 2019-05-17
What exactly do you need? Describe how and what for you would use these parameters.
i am designing a batch reactor. I wanted the parameters of Cp value for the adiabatic condition. I am using the equation (Heat of reaction at temperature T)=(Increase in sensible heat of final products) + (Heat taken by products as latent heat). As of now, i am ignoring phase change and want to design for homogenous system. I require the value of parameters of Cp for finding the heat of reaction at temperature T. I am using the formula (Heat of reaction at standard temperature T0) + (integral from T0 to T of ((delta Cp) * dT)) where delta Cp = sum over all components (stoichometry * Cp). To find the integral value, I require the value of Cp parameters. Please suggest if you know a better method to do this. Thank you.
You can try the GetTDependentProperty CAPE-OPEN compatible function: https://github.com/DanWBR/dwsim5/blob/windows/DWSIM.Thermodynamics/Property%20Packages/PropertyPackage.vb#L8784
Thank you. Would be great if you could give an example of how to execute this in python.
Hey Daniel, I just wanted to see how GetTDependentProperty works. So i made just a material stream with only Argon as component in it. I have written the code as:
a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon","mass")
I am getting the result of a as: Arrayfloat. Can u tell me how to input the parameters?
Thank You
CAPE-OPEN functions always require and return array parameters. In this case just get the first element of the array.
Last edit: Daniel Medeiros 2019-10-11
I had written the code:
from DWSIM.Thermodynamics import
import math
from System import Array
import clr
clr.AddReference('DWSIM.MathOps.DotNumerics')
from DotNumerics.ODE import
feed=[0]
feed[0]=ims1
a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon",None)
Flowsheet.WriteMessage(str(a))
DWSIM is returning an empty array. I think I have written the arguments in wrong format.
The prescribed format suggested in VB code is:
GetTDependentProperty(ByVal props As Object, ByVal temperature As Double, ByVal compIds As Object, ByRef propVals As Object)
Can you tell me in which argument i have committed an error? Thank you.
compIds must be a string array:
Even after this modification, it is returning an empty array for a. I am using version 5.6 update 12. This version has the values for heat capacities. right?
The returned value will be in kJ/kg.
Last edit: Daniel Medeiros 2019-06-18
Thanks it worked.
I accidentally posted the following question in Help (Classic UI):
"I've written a user-defined method for "Density" and "Viscosity" and added it to the NRTL package.
Now how do I get a specific viscosity in a PythonScript unit operation? I'd like to calculate the viscosity and density for some arbitrary point, something similar to
enthalpy = propertypackage.DW_CalcEnthalpy(mix, temp, press, state)
"
So now I've found this thread. Seems similar, but I can't use GetTDependentProperty, because I want it to depend on the mixture of different liquids in the stream. So I started reading PropertyPackages/FluidProperties.vb . Initially I thought that I could just call AUX_LIQDENS, for example, because it's declared as Overrideable, and I have written overrides in the package. But unfortunately neither the material stream nor the property package knows about AUX_LIQDENS().
So what should I try next?
Thanks for the help!!!
In the above, DWSIM will use the liquid phase composition from ims1 to calculate liquid density and viscosity.