|
|
Creating a UDWSPF C function library is reasonably straightforward:
The following lists the user-defined wet steam property function names and arguments, as well as a short description of their functions. Function inputs from the
ANSYS FLUENT solver consist of one or more of the following variables: T = temperature (
), P = pressure (
), and
= vapor-phase density (
).
This will be called when you load the UDWSPF. You use it to initialize wet steam model constants or your own model constants. It returns nothing.
This is the saturated pressure function, which takes on temperature in K and returns saturation pressure in Pa.
This is the saturated temperature function, which takes on pressure in Pa and a starting guess temperature in K and returns saturation temperature in K.
This is the equation of state, which takes on vapor density in kg/m
and Temperature in K and returns pressure in Pa.
This is the equation of state, which takes on pressure in Pa and temperature in K and returns vapor density in kg/m
.
This is the vapor specific heat at constant pressure, which takes on temperature in K and vapor density in kg/m
and returns specific heat at constant pressure in J/kg/K.
This is the vapor specific heat at constant volume, which takes on temperature in K and vapor density in kg/m
and returns specific heat at constant volume in J/kg/K.
This is the vapor specific enthalpy, which takes on temperature in K and vapor density in kg/m
and returns specific enthalpy in J/Kg.
This is the vapor specific entropy, which takes on temperature in K and vapor density in kg/m
and returns specific entropy in J/Kg/K.
This is the vapor dynamic viscosity, which takes on temperature in K and vapor density in kg/m
and returns viscosity in kg/m/s.
This is the vapor thermal conductivity, which takes on temperature in K and vapor density in kg/m
and returns thermal conductivity in W/m/K.
This is the saturated liquid density, which takes on temperature in K and returns liquid density in kg/m
.
This is the saturated liquid specific heat at constant pressure, which takes on temperature in K and returns liquid specific heat in J/kg/K.
This is the liquid dynamic viscosity, which takes on Temperature in K and returns dynamic viscosity in kg/m/s.
This is the liquid thermal conductivity, which takes on temperature in K and returns thermal conductivity in W/m/K.
This is the liquid surface tension, which takes on Temperature in K and returns surface tension N/m.
At the end of the code you must define a structure of type WS_Functions whose members are pointers to the principle functions listed previously. The structure is of type WS_Functions and its name is WetSteamFunctionList.
UDF_EXPORT WS_Functions WetSteamFunctionList =
{
wetst_init, /*initialization function*/
wetst_satP, /*Saturation pressure*/
wetst_satT, /*Saturation temperature*/
wetst_eosP, /*equation of state*/
wetst_eosRHO, /*equation of state*/
wetst_hv, /*vapor enthalpy*/
wetst_sv, /*vapor entropy*/
wetst_cpv, /*vapor isobaric specific heat*/
wetst_cvv, /*vapor isochoric specific heat*/
wetst_muv, /*vapor dynamic viscosity*/
wetst_ktv, /*vapor thermal conductivity*/
wetst_rhol, /*sat. liquid density*/
wetst_cpl, /*sat. liquid specific heat*/
wetst_mul, /*sat. liquid viscosity*/
wetst_ktl, /*sat. liquid thermal conductivity*/
wetst_surft /*liquid surface tension*/
};
|