# initial velocity in dynamic mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 4, 2015, 11:04 initial velocity in dynamic mesh #1 Senior Member     Amin Join Date: Oct 2013 Location: Germany Posts: 366 Rep Power: 7 Hi friends! I'm working on a problem about projectiles moving! I need a UDF to set mass, inertia and initial velocity of the projectile! the problem is that I don't find a macro to set the velocity at start time! Does it need a macro? or it should be set in fluent?

 March 5, 2015, 06:58 #2 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 Hi Amin, to set mass and inertia you can use DEFINE_SDOF_PROPERTIES. To set initial velocity you can use DEFINE_CG_MOTION to be applied to rigid bodies. __________________ Google is your friend and the same for the search button!

 March 5, 2015, 12:43 #3 Senior Member     Amin Join Date: Oct 2013 Location: Germany Posts: 366 Rep Power: 7 Hi Daniele! tnx! I haven't enough experience in dynamic mesh field! I was thinking CG-MOTION is for a constant speed and uniform motion! How can I use this macro for initial velocity? only a value for "vel" argument? what about values of "time" and "dtime"?

 March 5, 2015, 13:18 #4 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 Better explain with an example: This udf, for example: Code: ```# include "udf.h" # include "dynamesh_tools.h" DEFINE_CG_MOTION(mymotion, dt, vel, omega, time, dtime) { Thread *t; face_t f; vel[0]= 0.1; vel[1] = 0.0; vel[2] = 0.0; }``` sets a constant translational velocity of 0.1 m/s in +x direction. So, if you apply it to your rigid body at the first time step it will translate with 0.1 m/s velocity. omega refers to rotational velocity (omega[0], omega[1], omega[2]). If you want to change velocities with time, then you can use directly 'time' without use the macro CURRENT_TIME. So if you have a linear increasing velocity you can replace for example in the udf: vel[0]= 0.1*time; dtime is the timestep; as 'time' you can use dtime directly into the udf if you need it. __________________ Google is your friend and the same for the search button!

 March 5, 2015, 13:30 #5 Senior Member     Amin Join Date: Oct 2013 Location: Germany Posts: 366 Rep Power: 7 ok! I need just a constant speed at first time step and want to fluent calculates the speed at final step! so did I just need "vel[0]= 0.1"? and what about X , Y compnents!?

 March 5, 2015, 14:09 #6 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 Explain better your problem, as I cannot understand why you want a positive velocity only for the first timestep. And after the first one? __________________ Google is your friend and the same for the search button!

 March 5, 2015, 14:22 #7 Senior Member     Amin Join Date: Oct 2013 Location: Germany Posts: 366 Rep Power: 7 yeah! I have a projectile! it's a component of a bigger moving part and released from it! so it has a initial velocity and I want to know what happen for it after a few seconds! it hasn't any internal force! only gravity and drag reduce its speed! Is it clear dear?

 March 5, 2015, 17:13 #8 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 Can't this be simulated by patching with high pressure and temperature a small space adjacent to the projectile? Then it will be the pressure that will move the projectile, which will move with 6dof (or restricted 6 dof) __________________ Google is your friend and the same for the search button!

March 7, 2015, 02:23
#9
Senior Member

Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
I think it maybe causes significant error in simulation! and also will effects on next time steps!
there is a tab as "center of gravity velocity" in dynamic mesh tab! do you know what is this? I've attached a pic from this tab...
Attached Images
 INITIAL_VEOCITY.jpg (58.7 KB, 20 views)

 March 7, 2015, 05:26 #10 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 It is the velocity of the center of gravity. At time 0, your projectile has a defined position and a defined velocity. For your case before igniting the high pressure and temperature zone, your projectile is at rest, so you can set velocity to 0 m/s. Moreover you have to set the initial position of the center of gravity. These values will be automatically updated during the simulation, as your projectile moves. __________________ Google is your friend and the same for the search button!

March 8, 2015, 05:19
#11
Senior Member

Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
Quote:
 Originally Posted by ghost82 It is the velocity of the center of gravity. At time 0, your projectile has a defined position and a defined velocity. For your case before igniting the high pressure and temperature zone, your projectile is at rest, so you can set velocity to 0 m/s. Moreover you have to set the initial position of the center of gravity. These values will be automatically updated during the simulation, as your projectile moves.
Ok! so I could use this tab for applying an initial velocity to the projectile! this velocity only use for time 0 and changes during the solution based on the domain conditions! is this correct!?

 March 8, 2015, 10:57 #12 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 995 Rep Power: 17 Yes, I think so. __________________ Google is your friend and the same for the search button!

March 9, 2015, 02:53
#13
Senior Member

Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
Quote:
 Originally Posted by ghost82 Yes, I think so.
hooom! good! tnx friend

 September 26, 2015, 06:35 #14 New Member   ANDREY GUZUN Join Date: Sep 2015 Posts: 1 Rep Power: 0 Hello. Amin, did it helped ? Did you manage to solve your problem? I have very simular one.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40 Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 skuznet OpenFOAM Running, Solving & CFD 5 February 19, 2014 05:30 shipman OpenFOAM Running, Solving & CFD 3 September 7, 2013 08:00 carsten OpenFOAM Bugs 11 September 12, 2008 11:16

All times are GMT -4. The time now is 05:01.