Skip to content

Commit

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

* Fix links
  • Loading branch information
alesanter authored Dec 12, 2024
1 parent e39e28d commit f619e98
Show file tree
Hide file tree
Showing 28 changed files with 102 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
**Notation:**
#. :quantity_notation:`avogadro_constant`.
**Links:**
#. `Chemistry LibreTexts, formula 2.10.1 <https://chem.libretexts.org/Bookshelves/General_Chemistry/ChemPRIME_(Moore_et_al.)/02%3A_Atoms_Molecules_and_Chemical_Reactions/2.10%3A_The_Avogadro_Constant>`__.
"""

from sympy import Eq, solve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
## N - the number of collisions of traveling atom with gas atoms (this is a statistical quantity, it can be integer, but it can be fractional as well),
## l - free path length of traveling atom.

# TODO: find link

# TODO: move to `magnetron` folder?

boundary_of_thermalization_zone = Symbol("boundary_of_thermalization_zone", units.length)

number_of_collisions_of_atom = Symbol("number_of_collisions_of_atom", dimensionless)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
## B - the second constant of gas,
## E - electric intensity.

#. Links: StudFiles, formula 1.12 <https://studfile.net/preview/3079348/page:3/>
# TODO: find English link

# TODO: move to `ionization` folder?

coefficient_of_volumetric_ionization = Symbol("coefficient_of_volumetric_ionization",
1 / units.length)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
## e0 - electric constant,
## Ui - the ionization energy of atoms, expressed in volts.

# TODO: find link

# TODO: move to `magnetron` folder?

cross_sectional_area_of_interaction = Symbol("cross_sectional_area_of_interaction", units.area)

ionization_energy = Symbol("ionization_energy", units.voltage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
## C - Sutherland's constant,
## T - temperature.

# Links: Wikipedia <https://ru.wikipedia.org/wiki/%D0%93%D0%B0%D0%B7%D0%BE%D0%BA%D0%B8%D0%BD%D0%B5%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D1%8D%D1%84%D1%84%D0%B5%D0%BA%D1%82%D0%B8%D0%B2%D0%BD%D0%BE%D0%B5_%D1%81%D0%B5%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BC%D0%BE%D0%BB%D0%B5%D0%BA%D1%83%D0%BB%D1%8B>
# TODO: find English link

cross_sectional_area_of_interaction = Symbol("cross_sectional_area_of_interaction", units.area)

diameter_of_atom = Symbol("diameter_of_atom", units.length)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
## g - the cross-sectional area of the interaction of particles,
## r - the distance of the greatest convergence of two colliding particles.

# Links: Wikipedia, second formula <https://en.wikipedia.org/wiki/Cross_section_(physics)#Collision_among_gas_particles>

# FIXME: shouldn't it be `(2*r)^2` as per the formula in the link?

cross_sectional_area_of_interaction = Symbol("cross_sectional_area_of_interaction", units.area)

distance_of_convergence_of_two_particles = Symbol("distance_of_convergence_of_two_particles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
## k - boltzmann constant,
## q - elementary charge.

# TODO: find link

# TODO: move to `ionization` folder?

cross_sectional_area_of_interaction = Symbol("cross_sectional_area_of_interaction", units.area)

ionization_energy = Symbol("ionization_energy", units.energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
## U - the energy of ionizing electrons,
## Umax - the electron energy corresponding to the maximum value of the ionization cross-sectional area.

# TODO: find link

# TODO: move to `ionization` folder?

cross_sectional_area_of_ionization = Symbol("cross_sectional_area_of_ionization", units.area)

ionization_energy = Symbol("ionization_energy", units.energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
## Uh - hydrogen ionization energy,
## a0 - Bohr radius.

# TODO: find link

# FIXME: fix file name

# TODO: move to `ionization` folder?

cross_sectional_area_of_ionization = Symbol("cross_sectional_area_of_ionization", units.area)

ionization_energy = Symbol("ionization_energy", units.energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
## Z1 - the atomic number of the first atom (traveling atom),
## Z2 - the atomic number of the second atom (gas atom).

# TODO: find link

# TODO: move to `magnetron` folder?

distance_of_convergence_of_particles = Symbol("distance_of_convergence_of_particles", units.length)

discharge_voltage = Symbol("discharge_voltage", units.voltage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
## - Emittivity of the emitter is unlimited (emission of charged particles is much greater than current between electrodes)
## - Gaseous medium between electrodes

# TODO: find link

electric_intensity = Symbol("electric_intensity", units.voltage / units.length)

coordinate = Symbol("coordinate", units.length)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sympy import (Eq, solve)
from sympy.physics.units import faraday_constant
from symplyphysics import (units, Quantity, Symbol, print_expression, validate_input,
from symplyphysics import (units, Quantity, Symbol, validate_input,
validate_output, dimensionless)

# Description
Expand All @@ -15,6 +15,8 @@
## F - faraday constant
## n - valence.

# Links: Wikipedia, derivable <https://en.wikipedia.org/wiki/Electrochemical_equivalent>

equivalent = Symbol("equivalent", units.mass / units.charge)

molar_mass = Symbol("molar_mass", units.mass / units.amount_of_substance)
Expand All @@ -23,10 +25,6 @@
law = Eq(equivalent, molar_mass / (faraday_constant * valence))


def print_law() -> str:
return print_expression(law)


@validate_input(molar_mass_=molar_mass, valence_=valence)
@validate_output(equivalent)
def calculate_equivalent(molar_mass_: Quantity, valence_: int) -> Quantity:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sympy.physics.units import elementary_charge
from sympy import (Eq, solve)
from symplyphysics import (units, Quantity, Symbol, print_expression, validate_input,
from symplyphysics import (units, Quantity, Symbol, validate_input,
validate_output)

# Description
Expand All @@ -12,6 +12,8 @@
## e - charge of electron,
## r - radius of the Bohr orbit of electron.

# Links: Wikipedia, derivable from first formula and formula for kinetic energy <https://en.wikipedia.org/wiki/Classical_electron_radius#>

energy_of_electron = Symbol("energy_of_electron", units.energy)

radius_of_electron = Symbol("radius_of_electron", units.length)
Expand All @@ -20,10 +22,6 @@
units.coulomb_constant * elementary_charge**2 / (2 * radius_of_electron))


def print_law() -> str:
return print_expression(law)


@validate_input(radius_of_electron_=radius_of_electron)
@validate_output(energy_of_electron)
def calculate_energy_of_electron(radius_of_electron_: Quantity) -> Quantity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
units,
Quantity,
Symbol,
print_expression,
validate_input,
validate_output,
symbols,
Expand All @@ -20,6 +19,10 @@
## I - current,
## t - time.

# Links: Wikipedia <https://en.wikipedia.org/wiki/Faraday%27s_laws_of_electrolysis#First_law>

# TODO: replace `I * t` with charge `q`?

equivalent = Symbol("equivalent", units.mass / units.charge)
current = Symbol("current", units.current)
time = Symbol("time", units.time)
Expand All @@ -28,10 +31,6 @@
law = Eq(mass_deposited, equivalent * current * time)


def print_law() -> str:
return print_expression(law)


@validate_input(equivalent_=equivalent, current_=current, time_=time)
@validate_output(mass_deposited)
def calculate_mass(equivalent_: Quantity, current_: Quantity, time_: Quantity) -> Quantity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
## U - voltage between electrodes,
## We - electron energy.

# Links: possible similar formula here <https://www.comsol.com/blogs/electron-energy-distribution-function>
# TODO: find a more suitable link

value_of_distribution_function = Symbol("value_of_distribution_function", dimensionless)

voltage_between_electrodes = Symbol("voltage_between_electrodes", units.voltage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
## U - voltage between electrodes,
## We - electron energy.

# Links: possible similar formula here <https://www.comsol.com/blogs/electron-energy-distribution-function>
# TODO: find a more suitable link

value_of_distribution_function = Symbol("value_of_distribution_function", dimensionless)

voltage_between_electrodes = Symbol("voltage_between_electrodes", units.voltage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
## Uf - floating plasma potential,
## U - potential at the location of the probe.

# TODO: find link

current = Symbol("current", units.current)

area_probe_surface = Symbol("area_probe_surface", units.area)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
## M1 - the mass of the traveling atom,
## M2 - the mass of the gas atom.

# TODO: find link

energy_transfer_coefficient = Symbol("energy_transfer_coefficient", dimensionless)

mass_of_traveling_atom = clone_as_symbol(symbols.mass, display_symbol="m_1", display_latex="m_1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
## po - target density,
## Na - avogadro constant.

# TODO: find link

# TODO: move to `magnetron` folder?

etching_rate = Symbol("etching_rate", units.velocity)

ion_current_density = Symbol("ion_current_density", units.current / units.area)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
## P - pressure,
## g - the cross section of the interaction of a traveling atom and a gas atom.

# Links: Wikipedia, the fourth formula <https://en.wikipedia.org/wiki/Mean_free_path#Kinetic_theory_of_gases>

# FIXME: hasn't an additional `sqrt(2)` factor been left out in the denominator?

# TODO: move to `magnetron` folder?

free_path_length = Symbol("free_path_length", units.length)

pressure = Symbol("pressure", units.pressure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
## q - elementary charge,
## Na - avogadro constant.

# TODO: find link

mass_of_film = symbols.mass

current = Symbol("current", units.current)
Expand Down
4 changes: 4 additions & 0 deletions symplyphysics/laws/chemistry/molar_mass_via_molecular_mass.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
**Notation:**
#. :quantity_notation:`avogadro_constant`
**Links:**
#. `Wikipedia, formula in the second paragraph <https://en.wikipedia.org/wiki/Avogadro_constant#>`__.
"""

from sympy import Eq, solve, Symbol as SymSymbol, Idx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
**Notation:**
#. :quantity_notation:`avogadro_constant`.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Number_density#Mass_density>`__.
"""

from sympy import (Eq, solve)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
## Et - energy of thermal motion in a gas-discharge plasma,
## x - energy transfer coefficient between the traveling atom and the gas atoms.

# TODO: find link

# TODO: move to `magnetron` folder?

number_of_collisions_of_atoms = Symbol("number_of_collisions_of_atoms", dimensionless)

initial_energy = Symbol("initial_energy", units.energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
**Conditions:**
#. Spheres are identical.
**Links**:
#. `Wikipedia <https://en.wikipedia.org/wiki/Hard_spheres#Formal_definition>`__.
"""

from sympy import Eq, Piecewise, S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
It is a simple yet realistic model to describe intermolecular interactions: two particles repel each
other at a very close distance, attract each other at moderate distance, and do not interact at infinite
distance.
**Links:**
#. `Wikipedia <https://en.wikipedia.org/wiki/Lennard-Jones_potential#Overview>`__.
"""

from sympy import Eq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#. The term "standard" applies to a solution of an infinite dilution and of a hypothetical standard
concentration, typically 1 mol/kg.
**Links:**
#. `Wikipedia, derivable from the fifth equation <https://en.wikipedia.org/wiki/Equilibrium_constant#Basic_definitions_and_properties>`__.
"""

from sympy import Eq, solve, exp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
## E - electric intensity,
## p - pressure.

# Links: derivable from this assuming `mu = b0 / p` <https://en.wikipedia.org/wiki/Electron_mobility#>

velocity = Symbol("velocity", units.velocity)

mobility_at_unit_pressure = Symbol("mobility_at_unit_pressure",
Expand Down

0 comments on commit f619e98

Please sign in to comment.