CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

initial velocity in dynamic mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 4, 2015, 11:04
Default initial velocity in dynamic mesh
  #1
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
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?
amin.z is offline   Reply With Quote

Old   March 5, 2015, 06:58
Default
  #2
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
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!
ghost82 is offline   Reply With Quote

Old   March 5, 2015, 12:43
Default
  #3
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
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"?
amin.z is offline   Reply With Quote

Old   March 5, 2015, 13:18
Default
  #4
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
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!
ghost82 is offline   Reply With Quote

Old   March 5, 2015, 13:30
Default
  #5
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
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!?
amin.z is offline   Reply With Quote

Old   March 5, 2015, 14:09
Default
  #6
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
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!
ghost82 is offline   Reply With Quote

Old   March 5, 2015, 14:22
Default
  #7
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
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?
amin.z is offline   Reply With Quote

Old   March 5, 2015, 17:13
Default
  #8
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
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!
ghost82 is offline   Reply With Quote

Old   March 7, 2015, 02:23
Default
  #9
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
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
File Type: jpg INITIAL_VEOCITY.jpg (58.7 KB, 20 views)
amin.z is offline   Reply With Quote

Old   March 7, 2015, 05:26
Default
  #10
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
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!
ghost82 is offline   Reply With Quote

Old   March 8, 2015, 05:19
Default
  #11
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
Quote:
Originally Posted by ghost82 View Post
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!?
amin.z is offline   Reply With Quote

Old   March 8, 2015, 10:57
Default
  #12
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 995
Rep Power: 17
ghost82 will become famous soon enough
Yes, I think so.
__________________
Google is your friend and the same for the search button!
ghost82 is offline   Reply With Quote

Old   March 9, 2015, 02:53
Default
  #13
Senior Member
 
amin.z's Avatar
 
Amin
Join Date: Oct 2013
Location: Germany
Posts: 366
Rep Power: 7
amin.z is on a distinguished road
Quote:
Originally Posted by ghost82 View Post
Yes, I think so.
hooom! good! tnx friend
amin.z is offline   Reply With Quote

Old   September 26, 2015, 06:35
Default
  #14
New Member
 
ANDREY GUZUN
Join Date: Sep 2015
Posts: 1
Rep Power: 0
AUGUZUN is on a distinguished road
Hello.
Amin, did it helped ? Did you manage to solve your problem?
I have very simular one.
AUGUZUN is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
a problem with convergence in buoyantSimpleFoam skuznet OpenFOAM Running, Solving & CFD 5 February 19, 2014 05:30
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


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