CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

problem with very simple ufd

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 13, 2006, 05:28
Default 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)

}
  Reply With Quote

Old   September 13, 2006, 09:15
Default 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
  Reply With Quote

Old   September 13, 2006, 09:33
Default 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
  Reply With Quote

Old   September 14, 2006, 16:35
Default 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.
  Reply With Quote

Old   September 15, 2006, 10:38
Default 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
  Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very simple natural convection problem Naseem FLUENT 16 October 19, 2011 02:57
1D thermal stress problem simple barrodbeam newsboost OpenFOAM Running, Solving & CFD 3 January 2, 2009 16:12
Simple Meshing Problem with Gambit Mario FLUENT 4 April 18, 2003 09:52
SIMPLE code for 3_D problem bobby Main CFD Forum 1 December 26, 2000 00:20
? Simple CFD problem Davy Main CFD Forum 0 August 21, 1998 06:19


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