Bases: object
The main abstract class used as interface for the forces classes
Constructor
Parameters: |
|
---|
(property) return the array of the acclerations
(property) returns the array of the forces
(property) returns the force contants
return the array of the acclerations
returns the array of the forces
returns the force contants
Set the masses used for computing the forces.
Parameters: | m – An array containig the masses |
---|
Computes the forces of the current status ad return the accelerations of the particles
Parameters: | p_set – Particles set obj. |
---|
Bases: pyparticles.forces.force.Force
Bases: pyparticles.forces.force.Force
Compute the gravitational force between the particles
The gravity between two particles is defined as follow:
Constructor
Parameters: |
|
---|
Return the currents accelerations of the particles (getter only)
Return the currents forces on the particles (getter only)
Return the currents accelerations of the particles
Return the currents forces on the particles
Set the masses used for computing the forces.
Compute the force of the current status of the system and return the accelerations of every particle in a size by dim array
Bases: pyparticles.forces.force.Force
Constant force field.
Constructor
Parameters: |
|
---|
Bases: pyparticles.forces.force.Force
Calculate the forces of resistance. Drag is a force that reacts to the movement with respect to a square law speed. It’s commonly used for describing the resistance of a fluid
The force is given the equation:
Constructor:
Parameters: |
|
---|
Bases: pyparticles.forces.force.Force
Compute the damping forces, the damping is a force that react proportionally to the velocity
The force is given the equation:
Constructor
Parameters: |
|
---|
Bases: pyparticles.forces.force.Force
Compute the electrostatic force using the Culomb law.
..note:
The real forces of an electrodynamic system is given by the **Maxwell equations**! and not from the Culomb law.
The Culomb law is adapt for computing forces in a static system of particles and not for moving particles.
But for a very slow movement it should be a good approximation.
Bases: pyparticles.forces.force.Force
Compute the electromagnetic force of a system of charged and non-selfinteracting particles system immersed in an electromagnetic filed according to the Lorenz formulation.
Append a vector field funcion to the list of electric field funtions.
The field function must be in the form | ef( E , X ) | | Where: | E is a n by 3 numpy array of vectors used for the resulting filed. | X is a n by 3 numpy array of coordinates
Append a vector field funcion to the list of megnetic field funtions.
It return the key used to identify the funtion, if key == None it uses a random number.
The filed function must be in the form | bf( B , X ) | | Where: | B is a n by 3 numpy array of vectors used for the resulting filed. | X is a n by 3 numpy array of coordinates
Bases: pyparticles.forces.force.Force
Compute the lenard jones force between the particles
The L. J. force between two particles is defined as follow:
Constructor:
Parameters: |
|
---|
Return the currents accelerations of the particles (getter only)
Return the currents forces on the particles (getter only)
Return the currents accelerations of the particles
Return the currents forces on the particles
Set the masses used for computing the forces.
Compute the force of the current status of the system and return the accelerations of every particle in a size by dim array
Parameters: | p_set – Particles set obj. |
---|
Bases: pyparticles.forces.force.Force
Compute the forces according to the Hooke’s law.
Parameters: |
|
---|
set the masses of the particles
Bases: object
Combine the effect of some forces, for example constant force and springs. It behaves like any other force, and can be used with all methods of numerical integration.
Append a new force to the forces list
Set the masses in the forces system