|
[Sponsors] |
acceleration and deceleration of a moving body |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 9, 2014, 21:34 |
acceleration and deceleration of a moving body
|
#1 |
Member
Join Date: Nov 2012
Posts: 74
Rep Power: 14 |
Hello,
I am using the overset method to simulate a very simple translation movement: - my little cube (moving body, "overset" Region) has a translation motion along x. The simulation works great for the steady state but my problem is that my speed is going straight from 0 to steady state and what I want is the cube to accelerate slowly from 0 to steady state, and then, after a given number of iterations, decelerate to 0. How can I do that ? In Regions > Overset, I can only enter the speed in the "Initial Conditions" tab. There I put [0;0;0] since I want to start from 0. then, in Regions > Overset > Physics Values > Motion specification, I put User Defined Vertex. I figured it is the only one that could work, since translation can only do steady state (I have tried it and created a new translation in the Motions folder, but no way to put an acceleration/field function there...). After that, I'm stuck, I tried ever User Defined Vertex Option, with no luck... It would be nice if I could move forward and solve this. Thanks! |
|
April 9, 2014, 23:11 |
|
#2 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
You can put user-defined functions in motions, just type them in. Either create three scalar field functions (or fewer if some are zero) for your three components of velocity or just create a vector field function that has all three built in. Then just type in [$x,$y,$z] for the former or $$vectorFieldFunctionName for the latter.
|
|
April 11, 2014, 12:34 |
|
#3 |
Member
Join Date: Nov 2012
Posts: 74
Rep Power: 14 |
I got it to work, thank you!
one more thing, how do I add the deceleration in the same field function ? I understand it is going to look very similar to acceleration, but what is the syntax that links the two expressions ? I tried a comma, going to next line, a semi-colon, etc.. and it did not work... thanks for all your help! |
|
April 11, 2014, 15:38 |
|
#4 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
I'm not entirely sure if this is what you're trying to achieve, but you can nest if statements. For example, consider this function that ramps up and down a scalar value of 10 for the first second and 5th second, respectively.
($Time<1.0)?10*$Time/1.0($Time>4.0)?10*(1/($Time/5.0)):10.0) |
|
April 11, 2014, 16:24 |
|
#5 |
Member
Join Date: Nov 2012
Posts: 74
Rep Power: 14 |
I did not know how to nest the statements so this is exactly what I needed! I am going to try it, thanks!
|
|
August 4, 2021, 00:20 |
|
#6 |
New Member
Anonymous
Join Date: Aug 2021
Posts: 1
Rep Power: 0 |
Hello Mr. John. I see that you have succeed to define the acceleration for flat wave accelleration from 0 m/s to x m/s. Can i kneow about the user field function that you have defined? i have the same problem too to have speed up for my ship simulation. It great if you reply this massege. Thanks. Regards.
|
|
|
|