user defined enthalpy and Cp

Altair Forum User
Altair Forum User
Altair Employee
edited November 2020 in Community Q&A

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

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • acupro
    acupro
    Altair Employee
    edited June 2018

    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.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    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.  

  • acupro
    acupro
    Altair Employee
    edited June 2018

    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.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.