🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

user defined enthalpy and Cp

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

All, 

I am trying to write a user defined function for Cp and enthalpy, but I found the documentation a little confusing.   

 

the enthalpy and Cp data i have is obtained from RefProp (NIST Reference Fluid Properties database) and attached to this post.  

 

from heat transfer/Thermodynamics equations: deltaH = Cp(T) * deltaT.  But, Acusolve's documentation states that for a user defined function, both enthalpy and Cp must be provided:

'acuSolve has no way of calculating the specific heat from the enthalpy, so both must be supplied by the user defined function' - from the Command Reference Manual.

 

from the file I attached, a Cp and H are provided at a given temperature.  However, I do not know if I should just provide those values to Acusolve, or is there a relationship that i'm missing?  I want to stay away from the phase change and address the latent heat issue later.  For now, i want to focus on either all liquid or vapor analysis.  

 

I come from a structural background, and my CFD skills are a little rusty. So far, I've been able to write user defined functions for density, viscosity, and conductivity, which are working.  I have also been staying away from the phase change temperature, so the problems i've been running stay in the liquid phase.  ultimately, I would like to address the phase change, but that is another problem for another day.  

 

hopefully i was clear enough for somebody to help me.  

 

 

 

Unable to find an attachment - read this blog

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "acupro"
    Altair Employee
    Updated by acupro

    Given that you have enthalpy as a function of temperature, you should be able to use piecewise linear enthalpy for the specific heat type rather than user function.  The curve fit variable  will be temperature.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Acupro, 

     

    i considered that, unfortunately, I forgot to mention that I also have temperature dependent data at several pressures.  The ultimate goal was to create a user defined functions to account for the pressure.  

     

    Ideally, I would like to use a user defined function that mimics a piecewise linear relationship, but uses different parameters for different pressures.  

    User: "acupro"
    Altair Employee
    Updated by acupro

    There is an example of a UDF for specific heat in the Command Reference Manual - same chapter to which you referred earlier.  In the element loop it defines both cp[elem] and outvec[elem] which would be the enthalpy.  You may be able to use that as a guide.  You may be better off contacting the support team for assistance.