# problem with very simple ufd

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 September 13, 2006, 05:28 problem with very simple ufd #1 Ralf Schmidt Guest   Posts: n/a Hi! I have a problem with a very simple udf. I have a cuboid volume, and i want about a quater of it to have a very high viscous resistant. I wrote a simple udf that defines the resistant, but it dosn't work... the flow through the cuboid is straight where it should be rederacted by the high resistance zone. That is my udf: #include "udf.h" DEFINE_PROFILE(vis_res,t,i) { real x[ND_ND]; real a; cell_t c; begin_c_loop(c,t) { C_CENTROID(x,c,t); if( x[0] < -150) if( x[1] < 1200) if( x[2] < -250){ a = 10000000000; } else a = 0; F_PROFILE(c,t,i) = a; } end_c_loop(c,t) }

 September 13, 2006, 09:15 Re: problem with very simple ufd #2 cadaei Guest   Posts: n/a are the values of the centroid x correct? they seem very large to be in metres

 September 13, 2006, 09:33 Re: problem with very simple ufd #3 Ralf Schmidt Guest   Posts: n/a the volume is defined in mm. The cuboid is 300(x) by 150(z) by 600(y) mm. Its center is at -150(x), -250(z), 1200 (y) mm. So the values I define are right in the middle of the volume. The grid is also scaled in mm. I noticed now, that even when I change the value for "a" after the else statement, there is no change in the simulation. What is the problem?? Ralf

 September 14, 2006, 16:35 Re: problem with very simple ufd #4 Scott Guest   Posts: n/a The UDF documentation clearly states that all units in UDFs must be in SI, so length is in metres.

 September 15, 2006, 10:38 Thats it! #5 Ralf Schmidt Guest   Posts: n/a Hi! Thanks for that! I think, thats it! The simulation shows more or less the results, i expected, but it is very slow... Thanks anyway... Ralf

 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 Naseem FLUENT 17 December 15, 2015 11:12 newsboost OpenFOAM Running, Solving & CFD 3 January 2, 2009 16:12 Mario FLUENT 4 April 18, 2003 09:52 bobby Main CFD Forum 1 December 26, 2000 00:20 Davy Main CFD Forum 0 August 21, 1998 06:19

All times are GMT -4. The time now is 19:37.

 Contact Us - CFD Online - Top