How to calculate integral and derivative in udf
2 Attachment(s)
Hey guys,
I'm stuck in calculating Derivative and integral in UDF. We have our own discrete Data for our gas properties (like Cp,rho ,...) and by measn of a interpolation (interpolation function) we will have a continuous function for these properties like Cp That means we have our own formulation for these properties. Now my question is: If I have my own function for Cp (for example) then How I can caculate the Enthalpy by means of this integral: Attachment 83521 and also if I want to compute this derivative (the derivative of specific volume with respect to pressure for constant temperature): Attachment 83520 In our Udf code by means of our data for CP, rho and s on, then what should I do? Does anybody have any clue how to write the code in udf to calculate derivative and integral? Thanks in advance All the bests |
You don't calculate derivatives and integrals in UDFs. You open your thermodynamics book, and try to write these integrals and derivatives in a way that you can use in a UDF, in a way that does not involve integrals or derivatives.
|
1 Attachment(s)
Quote:
You are right my question was alittle vague. Actually we have our discrete Data for our gas properties (like Cp,rho ,...) and by measn of a interpolation we will have a continuous function for these properties like Cp That means we have our own formulation for these properties. Now my question is: If I have my own function for Cp (for example) then How I can caculate the Enthalpy by means of this integral: Attachment 83522 And also the same for the derivative. |
Using any software you want (excel works), and write the result in a UDF. You don't need to do the integration in a UDF...
|
All times are GMT -4. The time now is 07:17. |