CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

6 DoF Velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2014, 04:08
Exclamation 6 DoF Velocity
  #1
New Member
 
-
Join Date: Nov 2013
Posts: 11
Rep Power: 12
Deepblack is on a distinguished road
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?
Deepblack is offline   Reply With Quote

Old   May 27, 2014, 18:25
Default
  #2
New Member
 
-
Join Date: Nov 2013
Posts: 11
Rep Power: 12
Deepblack is on a distinguished road
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?
Deepblack is offline   Reply With Quote

Old   June 1, 2014, 06:11
Default
  #3
New Member
 
Linh Tuan The Nguyen
Join Date: Nov 2012
Posts: 9
Rep Power: 13
linh nguyen is on a distinguished road
Tried vel = DT_VEL_CG(dt)[i]; for velocity
linh nguyen is offline   Reply With Quote

Old   June 11, 2014, 05:09
Default
  #4
New Member
 
-
Join Date: Nov 2013
Posts: 11
Rep Power: 12
Deepblack is on a distinguished road
Thank you. I will try it.
Deepblack is offline   Reply With Quote

Old   June 10, 2016, 09:12
Default
  #5
Senior Member
 
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 11
HyperNova is on a distinguished road
Quote:
Originally Posted by Deepblack View Post
Thank you. I will try it.
Hello Deepblack, i hope you have managed to solve your problem. as linh suggested does vel = DT_VEL_CG(dt)[i] woks ? thank you if you answer my question
HyperNova is offline   Reply With Quote

Old   December 15, 2017, 07:18
Default
  #6
New Member
 
Lucas Gasparino
Join Date: Jul 2017
Location: Swansea, UK
Posts: 23
Rep Power: 8
Lucas_Gasparino is on a distinguished road
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!
Lucas_Gasparino is offline   Reply With Quote

Reply


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


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 05:08
NonUniform Velocity Inlet Paolo.F OpenFOAM Pre-Processing 0 March 3, 2014 08:25
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


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