|
[Sponsors] |
UDF for specific heat as function of pressure |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 24, 2014, 13:02 |
UDF for specific heat as function of pressure
|
#1 |
New Member
Gustavo
Join Date: Jun 2013
Posts: 26
Rep Power: 12 |
Hello,
I am trying to make an UDF to obtain specific heat as a function of temperature and other state variable (either pressure or density, hopefully). The problem is that the default macro for specific heat DEFINE_SPECIFIC_HEAT passes only temperature as a state variable and does not inform on the cell or thread. This is what I have tried to do in order to obtain the pressure in the cell: Code:
#include "udf.h" const char* FLUID = "CarbonDioxide"; const real gauge = 101325; //operating pressure in pascal (as defined in fluent) double Props (char*, char, double, char, double, char*); /* other macros here */ DEFINE_SPECIFIC_HEAT(cell_specificHeat, temperature, Tref, enthalpy, yi) { real pressure; Domain *domain = Get_Domain(1); Thread *t; cell_t c; thread_loop_c(t, domain) { begin_c_loop(c, t) { pressure = C_P(c, t); }end_c_loop(c, t) } real specificHeat; specificHeat = Props((char*)"C",'T', temperature, 'P', pressure, (char*)FLUID)*1000; *enthalpy = specificHeat*(temperature-Tref); return specificHeat; } Code:
/home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini /home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini /home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini /home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini /home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini /home/ansys_inc/v145/fluent/fluent14.5.7/lnamd64/2ddp_node/fluent_mpi.14.5.7: symbol lookup error: libudf/lnamd64/2ddp_node/libudf.so: undefined symbol: _Z10Get_Domaini MPI Application rank 1 exited before MPI_Finalize() with status 127 999999 (../../src/mpsystem.c@1172): mpt_read: failed: errno = 104 999999: mpt_read: error: read failed trying to read 4 bytes: Connection reset by peer The fluent process could not be started. I'm running Fluent 14.5.7 on Fedora 19, in case that's relevant. |
|
Tags |
coolprop, fluent, pressure, specific heat, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 05:42 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 14:11 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 15:55 |