# udf

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 13, 2009, 12:34 udf #1 New Member   songok Join Date: Jul 2009 Posts: 4 Rep Power: 10 Hello experts, Below is a short UDF i wrote to calculate the density of supercritical CO2, however it does not run, it gives a floating point error. If firstly,I replace the C_P(c,t) with a value say 2 bars it calculates the correct density though constant throughout. Secondly, if I initialize the gauge pressure in the solve menu, it uses that value as C_P(c,t) which results to constant density in the bed... does not depict any pressure drop or change. I just wandering and wondering where the problem could be. inlet boundary condition- mass inflow and pressure outlet BC. regards mmoja #include "udf.h" #define B 1.1 #define Q 0.2 #define D 0.01 #define R 188.90 #define K 1.330 DEFINE_PROPERTY(superfluid_density, c, t) { real rho; real press; real p_operating; real temp= C_T(c,t); press = C_P(c,t); rho = D*pow(press,B)/pow(temp,Q); return rho; } DEFINE_PROPERTY(sound_speed, c, t) { real a; real temp = C_T(c,t); a = sqrt(R*K*temp); return a;

 July 23, 2009, 02:17 #2 Member   Byron Smith R J Join Date: Mar 2009 Location: India Posts: 46 Rep Power: 10 The macro for density is C_R(c,t) in mem.h try using the macro instead of the variable rho

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Qureshi FLUENT 7 March 23, 2017 08:37 kim FLUENT 3 October 26, 2011 21:38 S.Whitney FLUENT 0 October 15, 2007 11:29 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 14:18.