|
[Sponsors] |
October 14, 2005, 13:51 |
Sway Motion UDF?
|
#1 |
Guest
Posts: n/a
|
I am trying to do a simple sloshing problem but I'm a bit confused how to perform it. I would like to sway (oscillatory x-motion) a 2D box as so: x = Amplitude * sin(omega * time). The box center is at (0,0) for simplicity. I know the amplitude and omega. I just don't know how to perform this task in Fluent. Any suggestions would rock! Thanks all!
-Brian |
|
October 17, 2005, 02:39 |
Re: Sway Motion UDF?
|
#2 |
Guest
Posts: n/a
|
Hi Brian
You can do this by adding time varying momentum source to the momentum equation using following udf ... #include "udf.h" #define pie 3.141592654 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real source; /* source term */ source =(-Amplitude)*pow((2*pie/time),2)*C_R(cell,thread)*sin((2*pie/time)*CURRENT_TIME); /* derivative of source term w.r.t. x-velocity. */ dS[eqn] = 0.; return source; } You can also use a time varying gravity or a combination of these to simulate real problems. Good luck Manoj |
|
October 17, 2005, 02:51 |
Re: Sway Motion UDF?
|
#3 |
Guest
Posts: n/a
|
Source equation should be
source =(-Amplitude*density)*pow((2*pie/time),2)*C_R(cell,thread)*sin((2*pie/time)*CURRENT_TIME); (N/m3) |
|
October 17, 2005, 05:31 |
Re: Sway Motion UDF?
|
#4 |
Guest
Posts: n/a
|
I think the first version of your source term was correct. Now you have density squared (from Amplitude*density and C_R(c,t)) which is wrong. Although you dont have to define pie, you can use M_PI instead.
Regards RoM |
|
October 17, 2005, 06:51 |
Re: Sway Motion UDF?
|
#5 |
Guest
Posts: n/a
|
You are right.
Thanks Rom |
|
October 18, 2005, 17:27 |
Re: Sway Motion UDF?
|
#6 |
Guest
Posts: n/a
|
Where I do input amplitude and omega ("time" in your example)? Do I define them in the UDF?
|
|
October 18, 2005, 17:28 |
Re: Sway Motion UDF?
|
#7 |
Guest
Posts: n/a
|
NEVERMIND! STUPID QUESTION!!!! HAHAHAHA!!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF problem: incorrect grid motion | Fil | FLUENT | 5 | December 19, 2020 10:16 |
Grid motion with UDF | fivos | Fluent UDF and Scheme Programming | 5 | June 30, 2018 09:50 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Fluent UDF Discontinuous Motion | lequi7 | Fluent UDF and Scheme Programming | 2 | November 4, 2011 00:18 |
UDF error CG Motion | Alex | FLUENT | 0 | March 22, 2006 18:40 |