|
[Sponsors] |
May 27, 2014, 05:08 |
6 DoF Velocity
|
#1 |
New Member
-
Join Date: Nov 2013
Posts: 11
Rep Power: 13 |
Hi,
A few words about my project: I need to reflect a moving objekt, before it 'leaves my mesh'. And therefore i want to negate one component of the velocity. Thats why i want to access the velocity in a 6DoF UDF. Is there any kind of syntax to do so? I have tried to use: SDOF_Get_Motion(dt,vel,omega,theta); ... but i get the error that says something like "This value isn't calculated up right now." My current UDF is: DEFINE_SDOF_PROPERTIES(Stein_6DOF, prop, dt, time, dtime) { real center; real mass; real force; mass = 500.4; prop[SDOF_MASS] = mass; prop[SDOF_IXX] = 50.000192; prop[SDOF_IYY] = 50.000192; prop[SDOF_IZZ] = 50.000192; center = DT_CG(dt)[1]; force = mass * 9.81; if (center > 0.35) { printf ("\nCenter of Gravitation: %f. \n\n",center); prop[SDOF_LOAD_F_Y] = -force; printf ("\nForce: %f N \nCenter of Gravitation: %f.",-force,center); } } This works! But its a VERY smooth (elastic) reflection. Is there some syntax like DT_CG(dt) (which gives the position), that gives me the velocity of a rigid body? |
|
May 27, 2014, 19:25 |
|
#2 |
New Member
-
Join Date: Nov 2013
Posts: 11
Rep Power: 13 |
Update:
Meanwhile, I tried to get the data at the end of the Timestep, using this UDF: #include "udf.h" DEFINE_EXECUTE_AT_END(save_data) { Domain *d; Thread *thread; Dynamic_Thread *dt; d= Get_Domain(1); thread = Lookup_Thread (d,10); dt = THREAD_DT (thread); printf ("Working\n"); real N3V_VEC (vel), N3V_VEC(omega), N3V_VEC(theta); SDOF_Get_Motion(dt,vel,omega,theta); printf ("\n\nVelocity: %f,%f\n",vel[0],vel[1]); } I get the output: Velocity: 0.0000, 0.0000 It seemes that this does not work,too. Does someone have an idea? |
|
June 1, 2014, 07:11 |
|
#3 |
New Member
Linh Tuan The Nguyen
Join Date: Nov 2012
Posts: 9
Rep Power: 14 |
Tried vel = DT_VEL_CG(dt)[i]; for velocity
|
|
June 11, 2014, 06:09 |
|
#4 |
New Member
-
Join Date: Nov 2013
Posts: 11
Rep Power: 13 |
Thank you. I will try it.
|
|
June 10, 2016, 10:12 |
|
#5 |
Senior Member
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12 |
||
December 15, 2017, 08:18 |
|
#6 |
New Member
Lucas Gasparino
Join Date: Jul 2017
Location: Swansea, UK
Posts: 23
Rep Power: 9 |
Hey guys, similar question, but for angular velocity. I'm quite new to UDF usage, and I'm using the Interpreted command to hook it. I'm doing a small wind turbine, so I only need the angular velocity. Thanks!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Condition of Air velocity in Open Channel simulation | wes1204 | OpenFOAM Running, Solving & CFD | 0 | May 9, 2014 06:08 |
NonUniform Velocity Inlet | Paolo.F | OpenFOAM Pre-Processing | 0 | March 3, 2014 09:25 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |