Skip to content

Commit

Permalink
Add links — definitions (#923)
Browse files Browse the repository at this point in the history
* Add links

* Fix link
  • Loading branch information
alesanter authored Dec 12, 2024
1 parent f619e98 commit ff5dc8e
Show file tree
Hide file tree
Showing 44 changed files with 176 additions and 0 deletions.
4 changes: 4 additions & 0 deletions symplyphysics/definitions/acceleration_is_speed_derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
================================
*Acceleration* is the derivative of speed w.r.t. time.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Acceleration#Instantaneous_acceleration>`__.
"""

from sympy import Eq, Derivative
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/admittance_is_inverse_impedance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
ability of a circuit or device to conduct electrical current.
Also see :doc:`Impedance law <definitions.impedance_is_resistance_and_reactance>`
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Admittance>`__.
"""

from sympy import (Eq, solve)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
================================================
*Angular acceleration* is a physical quantity that describes the change in angular speed over time.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Angular_acceleration>`__.
"""

from sympy import Eq, Derivative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
============================================
*Angular speed* is a physical quantity that describes the change in angular distance over time.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Angular_velocity#Orbital_angular_velocity_of_a_point_particle>`__.
"""

from sympy import Eq, Derivative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
========================================
*Angular wavenumber* is the spatial frequency of a wave, measured in radians per unit distance.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Wavenumber#Definition>`__.
"""

from sympy import Eq, pi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
**Notation:**
#. :quantity_notation:`boltzmann_constant`.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Boltzmann_distribution#>`__.
"""

from sympy import Eq, exp
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/compliance_is_inverse_stiffness.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
*Compliance, or flexibility*, of a spring is the inverse of its stiffness and measures
how flexible the spring is.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Stiffness#Compliance>`__.
"""

from sympy import Eq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
molecules, making the molar volume of the real gas greater than that of ideal gas, in other words the
particles have a larger extended volume, leading to :math:`Z > 1`.
#. At lower pressures, molecules are free to move and attractive forces dominate, leading to :math:`Z < 1`.
**Links:**
#. `Wikipedia, second formula <https://en.wikipedia.org/wiki/Compressibility_factor#Definition_and_physical_significance>`__.
"""

from sympy import Eq
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/current_is_charge_derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
The instantaneous electric current, or simply the *electric current*, is a physical quantity
defined as the time derivative of the flowing charge.
**Links:**
#. `Wikipedia, second equation <https://en.wikipedia.org/wiki/Electric_current#Metals>`__.
"""

from sympy import Eq, Derivative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Assuming there is a damping force acting on an oscillating body that is linearly proportional
to the body's velocity, we can write a differential equation for the body's position. We're
assuming the body only moves in one direction.
**Links:**
#. `Physics LibreTexts, similar equation 15.6.2 <https://phys.libretexts.org/Bookshelves/University_Physics/University_Physics_(OpenStax)/Book%3A_University_Physics_I_-_Mechanics_Sound_Oscillations_and_Waves_(OpenStax)/15%3A_Oscillations/15.06%3A_Damped_Oscillations>`__.
"""

from sympy import Derivative, Eq, dsolve
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/density_from_mass_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Volumetric mass *density* of an object is a physical quantity equal to the mass of the
object per unit of its volume. See :doc:`laws.quantities.quantity_is_volumetric_density_times_volume`
for a general version of this law.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Density#>`__.
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
*Conductivity* is a physical quantity describing the ability of a medium to conduct electrical current.
It is defined as the inverse of resistance.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance#>`__.
"""

from sympy import (Eq, solve)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
**Conditions:**
#. There is no damping (i.e. friction) in the system.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Harmonic_oscillator#Simple_harmonic_oscillator>`__.
"""

from sympy import Derivative, Eq, cos, solve, symbols as sympy_symbols, Function as SymFunction
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/heat_capacity_ratio.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#. One can also use intensive heat capacities, such as specific or molar ones, in place of the
extensive heat capacity presented here.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Heat_capacity_ratio#>`__.
"""

from sympy import Eq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
**Notation:**
#. :math:`i` is the imaginary unit.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Electrical_impedance#Complex_impedance>`__.
"""

from sympy import (I, Eq, solve)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
*Impulse due to force* exerted on a body during collision is the measure of both the
magnitude and duration of the collision. Impulse can also be represented by a vector
by applying this law to the components of the force vector.
**Links:**
#. `Wikipedia, last formula in paragraph <https://en.wikipedia.org/wiki/Impulse_(physics)#>`__.
"""

from sympy import Eq, Integral
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
The *intensity* of a sound wave at a surface is a physical quantity defined as the average rate
per unit area at which energy is transferred by the wave through or onto the surface.
**Links:**
#. `Wikipedia, fourth equation <https://en.wikipedia.org/wiki/Intensity_(physics)#Mathematical_description>`__.
"""

from sympy import Eq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
**Conditions:**
#. Pressure must be constant during the expansion process.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Thermal_expansion#Length>`__.
"""

from sympy import Eq, Derivative
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/lorentz_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
**Notation:**
#. :quantity_notation:`speed_of_light`.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Lorentz_factor#Definition>`__.
"""

from sympy import Eq, sqrt
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/mass_flow_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Mass flow rate is the rate of change in the mass of an object. Examples include the outflow of a substance
from a certain volume, the flow in a pipe section, the combustion of fuel.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Mass_flow_rate#Formulation>`__.
"""

from sympy import Eq, Derivative
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/mass_fraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
==================================
Mass fraction is the ratio of the mass of a mixture component to the total mass of the mixture.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Mass_fraction_(chemistry)#>`__.
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
=================================================
*Mechanical energy* of the system is defined as the sum of its kinetic energy and potential energy.
**Links:**
#. `Wikipedia, first equation <https://en.wikipedia.org/wiki/Mechanical_energy#General>`__.
"""

from sympy import Eq, solve
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/momentum_is_mass_times_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
============================
Momentum is a physical quantity equal to the product of the object's speed and its mass.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Momentum#Single_particle>`__.
"""

from sympy import (Eq, solve)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
**Conditions:**
#. All force vectors are collinear to each other.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Force#Combining_forces>`__.
#. `Physics LibreTexts, formula 2.2.3 <https://phys.libretexts.org/Courses/University_of_California_Davis/UCD%3A_Physics_9HA__Classical_Mechanics/2%3A_Force/2.2%3A_Effects_of_Force>`__.
"""

from typing import Sequence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
**Number density**, or **concentration**, is the number of particles per unit volume.
See :doc:`laws.quantities.quantity_is_volumetric_density_times_volume` for a more general law.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Number_density#Definition>`__.
"""

from sympy import Eq, solve
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/period_from_angular_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
The period of oscillations is the time it takes for the system to perform a single oscillation cycle.
The Period is inversely proportional to the angular frequency of oscillations. See
:doc:`laws.kinematics.average_angular_speed_is_angular_distance_over_time` for additional information.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Angular_frequency#Circular_motion>`__.
"""

from sympy import Eq, solve, pi
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/power_is_energy_derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Power is the amount of energy transferred or converted per unit time. Equally, it is the
rate at which work is done.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Power_(physics)#Definition>`__.
"""

from sympy import Eq, Derivative
Expand Down
3 changes: 3 additions & 0 deletions symplyphysics/definitions/quality_factor_is_energies_ratio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
**Quality factor** is a property of an oscillating system defined as the ratio between the amount of
energy stored in system and the power losses.
..
TODO same law in `dynamics/damped_oscillations`, remove this law?
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
**Notation:**
#. The subscript :math:`e` stands for *energetic* to avoid confusion with photometric quantities.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Radiant_exitance#Mathematical_definitions>`__.
"""

from sympy import Eq, Derivative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#. Both media are isotropic and transparent.
#. The wave is monochromatic. Note that the speed of wave propagation depends on the
wave frequency.
**Links:**
#. `Wikipedia, first equation <https://en.wikipedia.org/wiki/Refractive_index#Definition>`__.
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
**Conditions:**
#. The object is a material point, rigid and uniform.
..
TODO same law `kinematics/rotational_inertia/rotational_inertia_of_particle`, remove this one?
"""

from sympy import Eq, solve
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/sound_level_in_decibels.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
The sound level of a sound wave is a physical quantity that is used to describe the wave's
intensity.
**Links:**
#. `Wikipedia, similar formula <https://en.wikipedia.org/wiki/Sound_intensity#Sound_intensity_level>`__.
"""

from sympy import Eq, log
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/speed_is_distance_derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
============================
Speed is a physical quantity that describes the rate of change in the body's position.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Velocity#Instantaneous_velocity>`__.
"""

from sympy import Eq, Derivative
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/temporal_frequency_from_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
Frequency is a physical quantity that describes how many cycles or events happen per unit time.
It is the inverse of period. See :doc:`definitions.temporal_frequency_is_number_of_events_per_unit_time`
for additional information.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Frequency#Definitions_and_units>`__.
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
**Temporal frequency**, or simply **frequency**, is the number of occurrences of a repeating
event per unit of time.
**Links:**
#. `Wikipedia, see text <https://en.wikipedia.org/wiki/Frequency#>`__.
"""

from sympy import Eq, solve
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/definitions/thermal_de_broglie_wavelength.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#. :quantity_notation:`hbar`.
#. :quantity_notation:`boltzmann_constant`.
**Links:**
#. `Wikipedia, see last formula in paragraph <https://en.wikipedia.org/wiki/Thermal_de_Broglie_wavelength#Massive_particles>`__.
"""

from sympy import Eq, pi, sqrt
Expand Down
Loading

0 comments on commit ff5dc8e

Please sign in to comment.