Jump to content

# user defined enthalpy and Cp

## Recommended Posts

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.

methaneEnthalpyCpData.txt

#### Share this post

##### Share on other sites

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.

#### Share this post

##### Share on other sites

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.

#### Share this post

##### Share on other sites

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.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×
×
• Create New...