Pressure Initial Conditions

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

 February 26, 2012, 16:04 Pressure Initial Conditions #1 New Member   OscarD Join Date: Sep 2011 Posts: 4 Rep Power: 13 Hi, I've been trying to set initial values of pressure and temperature in a simple 2d-axisymmetric geometry that generates an enclosed volume, with no inlet/outlet for fluid, steady state. I got the initialization of all the cells' temperature as I wanted by using DEFINE_INIT (coaxial values of same value ), but when it comes to pressure, it starts ok beside the axis, but when it continues radially, the value drops to almost -Pmax!! Am I forgetting to set something within the UDF or in the FLUENT case? Thanks in advance for any help related!!! PS. The 'complex' code I'm using (just omitted the definition and value of the pX and tY constants) ************************************************** ******** #include "udf.h" DEFINE_INIT(init_temp_press,d) { cell_t c; Thread *t; real xc[ND_ND] thread_loop_c(t,d) { begin_c_loop_all(c,t) { C_CENTROID(xc,c,t); if(xc[1] < 4.7e-4) C_T(c,t) = t1*pow(xc[1],9.) + t2*pow(xc[1],8.) + t3*pow(xc[1],7.) + t4*pow(xc[1],6.) + t5*pow(xc[1],5.) + t6*pow(xc[1],4.) + t7*pow(xc[1],3.) + t8*pow(xc[1],2.) + t9*xc[1] + t10; else C_T(c,t) = 293; if(xc[1] < 4e-4) C_P(c,t) = p1*pow(xc[1],8.) + p2*pow(xc[1],7.) + p3*pow(xc[1],6.) + p4*pow(xc[1],5.) + p5*pow(xc[1],4.) + p6*pow(xc[1],3.) + p7*pow(xc[1],2.) + p8*xc[1] + p9; else C_P(c,t) = 6800; end_c_loop_all(c,t) } } } ************************************************** ******

 June 4, 2013, 02:37 with respect to your problem #2 New Member   zhang guoqing Join Date: May 2011 Posts: 10 Rep Power: 13 Dear Sir: Recently I have met the same problem as yours. Have you solved it? Could you tell me the steps to use this UDF in Fluent? Thank you so much for your help. Yours Zhang

 Tags initial conditions, pressure, udf