1
$\begingroup$

So this is more of a conceptual question for simulations.

I have gravity in my simulation that is going to the side: $g=(0,10)$.

I know that gravity is acceleration.

But is wind acceleration (another type of gravity in a different direction) or is it velocity?

Assume that wind and gravity are constant in the simulation.

EDIT: I am using Box2D for the simulation, a physics engine, so I am not actually doing the computations - I am just setting the gravity and letting it run. But since I want to add wind, should I just modify the gravity or should I have some routine that adds to the velocity of each object?

EDIT 2: Could I basically think of wind as constant gravity to the side?

$\endgroup$

closed as unclear what you're asking by Bill N, Kyle Kanos, Jon Custer, user259412, AccidentalFourierTransform May 2 '18 at 15:54

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ hint : did you ever simulated a fall where the only forces applied to you are gravity and air friction ? how did you account for air friction ? $\endgroup$ – Guiroux Apr 27 '18 at 16:03
  • 1
    $\begingroup$ I have no idea what your simulation is. Gravity is an interaction which can be associated with an acceleration, and in small regions, is constant. Wind is the motion of air, and no, it's not an acceleration. And no, it's not constant. $\endgroup$ – Bill N Apr 27 '18 at 16:04
1
$\begingroup$

Wind is not an acceleration, but the drag due to the wind is a force applied to the body. This results in an acceleration according to Newton's second law. All the forces or accelerations need to be added as vectors to find the magnitude and direction of the total force or acceleration.

Let $\hat{y}$ be the upward direction and $\hat{x}$ be the rightward direction. Then gravity is a downward acceleration $-g\,\hat{y}$ where $g=10\,m/s^2$.

The drag force on a body is $$\vec{F}_d=C_d A \frac{1}{2}\rho v^2\hat{v}$$ where $A$ is the relevant cross-sectional area, $\rho$ is the density of the air, $v$ is the velocity of the air relative to the body, and $\hat{v}$ is the unit vector in the direction of the relative wind (not necessarily the direction of the wind as seen from the ground). $C_d$ is the drag coefficient, which is a unitless empirically determined fudge factor which is different for different shapes. You could just set $C_d=1$ if this is a very rough simulation.

If your wind is blowing to the side with velocity $\vec{v}_{wind}=v_{wind} \hat{x}$, and your body is currently moving with velocity $\vec{v}_{body}=v_x\hat{x}+v_y\hat{y}$, then the relative velocity to use in the drag equation is $\vec{v}_{wind}-\vec{v}_{body}=(v_{wind}-v_x)\hat{x}-v_y\hat{y}$, the magnitude of the relative wind is $v=\sqrt{(v_{wind}-v_x)^2+v_y^2}$, the direction of the relative wind is $\hat{v}=\frac{v_{wind}-v_x}{v}\hat{x}-\frac{v_y}{v}\hat{y}$ and the drag is $\vec{F}_d=C_d A\frac{1}{2}\rho v^2\hat{v}=C_d A\frac{1}{2}\rho \sqrt{(v_{wind}-v_x)^2+v_y^2}((v_{wind}-v_x)\hat{x}-v_y\hat{y})$.

According to Newton's 2nd law, the total force is $\sum \vec{F}=m \vec{a}$. The force due to the gravitational acceleration is $\vec{F}_g=-mg\hat{y}$. So doing a vector summation of the gravitational and drag forces, we get $$\sum \vec{F}=\vec{F_g}+\vec{F_d}\\=C_d A\frac{1}{2}\rho \sqrt{(v_{wind}-v_x)^2+v_y^2}(v_{wind}-v_x)\hat{x}+(-mg-C_d A\frac{1}{2} \rho \sqrt{(v_{wind}-v_x)^2+v_y^2}v_y)\hat{y}$$ Then from Newton's 2nd law the total acceleration of the body is $$\vec{a}=C_d A\frac{1}{2}\frac{\rho}{m} \sqrt{(v_{wind}-v_x)^2+v_y^2}(v_{wind}-v_x)\hat{x}+(-g-C_d A\frac{1}{2}\frac{\rho}{m} \sqrt{(v_{wind}-v_x)^2+v_y^2}v_y)\hat{y}$$

Your simulator will then integrate this total acceleration.

$\endgroup$
  • $\begingroup$ @mackycheese21 Regarding your "EDIT 1" and "EDIT 2": You can't model the wind as a constant acceleration the way you can with gravity, because as you can see from the equations in my answer, the acceleration due to the wind depends on the current velocity of the body. When the body first starts being blown by the wind, the acceleration is high, but as it starts to move with the wind the acceleration drops, and as it finally matches speed with the wind, the acceleration drops to zero. If it was a constant acceleration the body would keep speeding up forever and go much faster than the wind. $\endgroup$ – Martin Lichtman Apr 27 '18 at 22:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.