Physlib.ClassicalMechanics.Force
Forces
This module defines forces acting on objects, expressed in a reference frame. A `Force` records its target and its vector value over time. An `InternalForce` additionally records a distinct source object.
The time-dependent vector describes the force acting on the target, without prescribing how that force is determined. For example, a gravitational force can be specified directly from the target's mass, while a constraint force can be specified by its relation to the motion of the objects. Representing both by the same type allows Newton's laws to be stated independently of the particular interactions present.
The reference frame appears in the type of a force's vector values, keeping their coordinate dependence explicit. The definition lives in the `ClassicalMechanics.ReferenceFrame` namespace to support dot notation such as `frame.Force Object`, but also occupies a general name that future non-particle Newtonian formalizations may need.
The target type `Object` is therefore deliberately left arbitrary. Newtonian mechanics is not limited to point particles, so this force representation is kept independent of any particular model of matter, with the intention it may get generalized for rigid body mechanics, continuum mechanics, or other Newtonian models in the future.
5 declarations
Force as a function
Given a reference frame `frame` and a type of `Object`, this instance allows an element of type `frame.Force Object` to be treated as a function from time to vectors. Specifically, for any , returns the vector value of the force at that time within the specified reference frame.
Coercion of an internal force to a vector-valued function of time
For a given reference frame and object type, an internal force can be treated as a function that maps a time to a vector . This instance allows the use of the notation to represent the vector value of the internal force at that specific time.
Coercion from `InternalForce` to `Force`
Given a reference frame and a type of objects, an internal force (which consists of a source object, a target object, and a time-dependent vector) can be coerced into a general force (which consists only of a target object and a time-dependent vector). This is achieved by the function `InternalForce.toForce`, which retains the target and the vector value while disregarding the source object.
Reaction force of an internal force
For an internal force in a given reference frame, characterized by a source object , a target object , and a time-dependent vector value , the function `reverse` defines the corresponding reaction force. This resulting internal force has as its source and as its target, with its vector value at any time being the additive inverse of the original force. This corresponds to the "equal and opposite" force described by Newton's Third Law.
Net force on an object at time
In a given reference frame, the net force on a specific object at time is the vector sum of all forces acting on that object. Given a multiset of internal forces and a multiset of external forces , the net force is computed by: 1. Converting all internal forces in to general forces (retaining their target and vector value). 2. Combining these with the external forces to form a single collection of forces . 3. Summing the vector values for all forces whose target is the object . Mathematically, this is expressed as: where the sum is taken over the multiset of forces whose target property matches .
