# udf

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

 December 14, 2011, 09:38 udf #1 Senior Member   hamid Join Date: Nov 2010 Posts: 185 Rep Power: 9 Hi all about UDF, when do need to use C_P(c,t) and when F_P(c,t), also the other parameters like U_P(c,t) and F_P(c,t) and so on....

 December 16, 2011, 08:42 #2 Senior Member     Dragos Join Date: Mar 2009 Posts: 649 Rep Power: 13 C_P(t,c) gives the pressure value in the centroid of the cell. F_P(t,f) gives the pressure value in the centroid of the face. I would recommend to read the manual regarding these macros. The face values are not available in the entire domain for all variables!

 December 16, 2011, 09:19 #3 Senior Member   hamid Join Date: Nov 2010 Posts: 185 Rep Power: 9 thanks for the reply, iv actually read already but get confused a bit, im wondering if the following is correct for calculating pressure at outlet: DEFINE_EXECUTE_AT_END(network_calculation) { FILE *flow_rate,*update,*velocity; Domain *d; real force=0.; real NV_VEC(A); face_t f; Thread *t; d = Get_Domain(1); t = Lookup_Thread(d,2); PF = 0.0; area = 0.0; force = 0.0; begin_f_loop(f,t) { F_AREA (A,f,t); force+=F_P(f,t)*NV_MAG(A); area +=NV_MAG(A); PF= force/area; } end_f_loop(f,t) } thank you

 December 16, 2011, 10:07 #4 Senior Member     Dragos Join Date: Mar 2009 Posts: 649 Rep Power: 13 It looks ok if the outlet zone id is 2.

 December 17, 2011, 05:37 #5 Senior Member   hamid Join Date: Nov 2010 Posts: 185 Rep Power: 9 thanks for reply, but the point is, for example when i measure the area in solid work it is a bit different from the area+=NV_MAG(A) computed through this code in fluent, that is why it makes me feel doubt about how correct the code i use is.. please let me know thanks so much again...

 December 17, 2011, 10:42 #6 Senior Member     Dragos Join Date: Mar 2009 Posts: 649 Rep Power: 13 That's easy: Solid Works or any other CAD software keeps the surface as a parametric object (meaning there is an equation describing the surface), whereas fluent keeps the same surface as a triangular surface (meaning a discrete form). The discrete form will always include a discretization error based on the size of the discretization, so there is no surprise that you get a difference. This difference, between the CAD and CFD software should decrease if you have a finer mesh.

 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 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 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 13:00.