|
[Sponsors] |
March 4, 2015, 10:04 |
initial velocity in dynamic mesh
|
#1 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
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, 05:58 |
|
#2 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
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, 11:43 |
|
#3 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
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, 12:18 |
|
#4 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
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; } 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, 12:30 |
|
#5 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
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, 13:09 |
|
#6 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
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, 13:22 |
|
#7 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
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, 16:13 |
|
#8 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
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, 01:23 |
|
#9 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
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... |
|
March 7, 2015, 04:26 |
|
#10 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
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, 04:19 |
|
#11 | |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
Quote:
|
||
March 8, 2015, 09:57 |
|
#12 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
Yes, I think so.
__________________
Google is your friend and the same for the search button! |
|
March 9, 2015, 01:53 |
|
#13 |
Senior Member
Amin
Join Date: Oct 2013
Location: Germany
Posts: 397
Rep Power: 14 |
||
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
a problem with convergence in buoyantSimpleFoam | skuznet | OpenFOAM Running, Solving & CFD | 6 | November 15, 2017 12:12 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 13:40 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Why RNGkepsilon model gives floating error | shipman | OpenFOAM Running, Solving & CFD | 3 | September 7, 2013 08:00 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |