|
[Sponsors] |
May 5, 2002, 22:08 |
adjusting gravity using UDFs
|
#1 |
Guest
Posts: n/a
|
I need to adjust gravity every time step. Using Scheme this is straight forward but I can find how to do it using UDFs.
Any ideas. |
|
May 6, 2002, 03:31 |
Re: adjusting gravity using UDFs
|
#2 |
Guest
Posts: n/a
|
The M_gravity[ND_ND] array in models.h holds the gravity vector, so you can change gravity by changing the values in this array. I need no "include models.h" statement, I think, since this header file seems to be included through udf.h - but I might be mistaken on this.
ND_ND is 2 for a 2D case and 3 for a 3D case... Regards, Henrik |
|
May 7, 2002, 00:07 |
Re: adjusting gravity using UDFs
|
#3 |
Guest
Posts: n/a
|
Great.
Will that work with interpreted UDF's? I tried referencing M_gravity[0] with and without #include "models.h" and the preprocessor complained. Thanks. |
|
May 7, 2002, 03:01 |
Re: adjusting gravity using UDFs
|
#4 |
Guest
Posts: n/a
|
What version are you using? In FLUENT 6 M_gravity is in models.h, but in FLUENT 5 it is in flow.h - both should be included if you have included udf.h though.
Will it work in interpreted UDFs? To be honest, I don't know - I gave up using the interpreted UDFs long ago, because of all the limitations and bugs. A C compiler isn't that expensive...and it saves me a lot of grief. Henrik |
|
May 8, 2002, 09:09 |
Re: adjusting gravity using UDFs
|
#5 |
Guest
Posts: n/a
|
If that doesn't work, you can always add the gravity as a source term = pg to the momentum equations using your own udf. I haven't done this but I can't see why it wouldn't work.
Of course, modifying the internal gravity vector is a bit better if its possible for your interpreted udfs. I too think compiled udfs are the way to go - interpreted stuff is generally more of a hassle. Also, I've found a unix/linux platform better than a Windows platform. Greg |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady and Flux UDFs for UDSs | tom | FLUENT | 0 | February 13, 2009 11:27 |
how to consider gravity in CFX | shrimp | CFX | 4 | September 8, 2008 21:41 |
Use UDFs to change gravity vector in part ofdomain | Nico | FLUENT | 0 | August 29, 2006 07:15 |
Help: gravity in CFX | Dejun Jing | CFX | 2 | July 22, 2002 09:58 |
On gravity modelling... | Drona | CFX | 7 | November 22, 2001 11:28 |