-1
$\begingroup$

I am using Chipmunk's physics engine to simulate 2D classical mechanics of solid polygons (excellent by the way!). The only way you can alter the spontaneous behaviour of the the simulated objects is to apply forces and impulses to them.

I am given a certain amount $E$ of energy to spend (= to input into the system) over a certain period of time $\Delta T$, that I need to use to alter the motion of a given body. By the time I need to do so, it is rather difficult to access its mass, instantaneous speed, kinetic moment, energy, or other forces applied to it..

(I can still track its shape, position and rotation.)

However, I feel like I don't need to access all these to actually spend this energy and alter its motion (with the only tools I am given) provided I decide I will do it by applying a single force $F$ to it over the period $\Delta T$, and provided I give myself an application point $P$ and a direction $d$ (both relative to the body's actual position and rotation).


To be more precise about "my feeling": no matter the actual situation of the body, I will apply this force and spend this energy over $\Delta T$:

  • if it turns out to be a very heavy object, then it won't move a lot
  • if it turns out to be in a super-fast race against $d$, then its speed won't change a lot
  • if it turns out to be blocked under a stone, then it won't move a lot
  • if it turns out to be free, light, resting.. then the change will be visible..

(I am aware that the concept of force might be the wrong one to consider here, so I just want to make sure we'll agree about what I am talking about, whatever it might be. It is exactly like this body had a certain amount of energy to spend and used it to move itself without actually knowing anything about the world around.)


If I was right about this feeling that I do have everything I need to perform this alteration without spending more than $E$, then how would I compute the actual intensity of $F$ to be applied?

If I was wrong, then what information am I missing?


[EDIT]: It turns out from the discussion that I actually need to give myself a certain cost of applying a force $\beta\ (m.s^{-1})$, inspired from biophysics. Then the actual energy spent is simply $$E = \beta \int_{\Delta t} F(t) \mathrm{d}t,$$ and I just have to take care that it will never be lower than the actual work $W$ done by $F$ over $\Delta t$.

To achieve this, one solution seems to keep constantly track of the actual useful energy spent, which is difficult but.. not undoable.

$\endgroup$
1
$\begingroup$

I'm not quite sure I understand what you mean, but if you have an amount of energy to spend:

$$\Delta E = E_2 - E_1 = \frac{1}{2} m_1 v_2^2 - \frac{1}{2} m_1 v_1^2 = \frac{1}{2} m_1 \left( v_2^2 - v_1^2 \right)$$

Using this, you can calculate $v_2$ if $v_1$ is known.

The force to achieve this can be calculated by

$$m \Delta v = \Sigma F \Delta t $$

I'm not sure this is exactly what you want, but I hope it'll help

edit:

In the case of energy dissipation with work, as I'm not able to sustain large forces for a large period of time, this might be a good approach to model the force delivered by a humon. Perhaps you could make the Force applied a function of time. If you make it asymptoticaly decreasing over time, then you can use the value $\beta$ to scale it such that the integral will be equal to $E$.

The exact distribution of this energy depends on the problem. You're converting your initial energy budget to useful energy (work e.g. $F \cdot ds$) and useless energy (the cost of delivering a force). The problem is that the ratio between these two is dependent on the situation. If you stumble upon a rock, and no movement occurs it's only useless energy, whereas if not, you convert all your energy to work. I think you'll need to consider the instantenous state every time to see what case applies.

$\endgroup$
  • $\begingroup$ Not exactly. First, it would actually be $m\Delta v = (\sum F_{others} + F) \Delta t$ and I have no idea about the other forces applied to the body. Second, $\Delta E = \frac{1}{2} m_1 \left( v_2^2 - v_1^2 \right)$ would be wrong if an obstacle turned out to be in the way. Imagine you are a blind object whose only power is to apply a force to itself. You would just do it until you're tired ($E$ consumed), no matter what actually happens then to you or your environment. ... Does that even make any sense by the way? õ.Ô $\endgroup$ – iago-lito Jul 29 '14 at 7:24
  • $\begingroup$ Shouldn't this be in the program? The $F$ I was talking about, was the net $F$. If you (or your program) does not know if there is a resisting force, it is not possible to determine the movement. In order to determine any possible acceleration, you need to know the resultant force (hence, all forces present on the subject) The discussiong about work, movement and energy and getting tired without movement is dicussed here physics.stackexchange.com/q/1984 $\endgroup$ – ROIMaison Jul 29 '14 at 7:31
  • $\begingroup$ Wow, this post is a really good strike! ^ ^ Thanks. Let me first think further on this one.. $\endgroup$ – iago-lito Jul 29 '14 at 7:50
  • $\begingroup$ Okay, could it be then something like the following: I need to give myself a particular cost of applying a force $\beta\ (m.s^{-1})$, and the energy I would finally spend would simply be $E = \beta \int_{\Delta t} F(t) \mathrm{d}t$, no matter what really happens outside in reaction to this force. Put it this way, how do I then choose $\beta$ in a fashion that makes sure the final work $W$ done by $F$ will never be greater than the actual energy spent $E \geqslant W$? (assuming $E - W$ would be dissipated as (unsimulated) heat and entropy) $\endgroup$ – iago-lito Jul 29 '14 at 8:52
  • $\begingroup$ .. I think this now just looks like: given $F(t)$ and $\Delta t$, what is the maximal work $W$ we can expect to be done by $F$? $\endgroup$ – iago-lito Jul 29 '14 at 8:59
0
$\begingroup$

The amount of work done by a force is equal to

$$ dW = \vec{F} \cdot d\vec{x}, $$

however the displacement $d\vec{x}$ in the next time step it not known. If the total acceleration is low you can approximate the displaced distance with $d\vec{x} = \vec{v}\Delta t$. If not, then you also want to take the acceleration into account. I do not know what kind of time integration Chipmunk uses, it will probably look something like $d\vec{x} = \vec{v}\Delta t + \frac{1}{2}\vec{a}\Delta t^2$. Or you could even use an iterative method calculating the new position and calculate the new force according that that, but this is more computational expensive.

$\endgroup$

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