|
[Sponsors] |
September 13, 2006, 06:28 |
problem with very simple ufd
|
#1 |
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, 10:15 |
Re: problem with very simple ufd
|
#2 |
Guest
Posts: n/a
|
are the values of the centroid x correct? they seem very large to be in metres
|
|
September 13, 2006, 10:33 |
Re: problem with very simple ufd
|
#3 |
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, 17:35 |
Re: problem with very simple ufd
|
#4 |
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, 11:38 |
Thats it!
|
#5 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Very simple natural convection problem | Naseem | FLUENT | 19 | December 17, 2020 17:00 |
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 10: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 07:19 |