FERRETGame engine over Babylon.js
Ferret

@ferret/physics-atomic

atoms with orbits of fixed energy, photons that lift and are given off, ionisation, fission, bonds, one energy account.

104 exports · source in packages/physics-atomic/src

Classes

ChainReaction class

class ChainReaction
readonly visible: number
readonly pos: Float32Arraypositions of the visible nuclei in a ball of radius 1 (x, y, z)
readonly comp: Uint8Arraythe component of each nucleus
readonly spent: Uint8Arraya spent nucleus: fissioned or captured
time: numberseconds since the start
fissions: number
captures: number
leaks: number
neutronsMade: number
energy: numberjoules released by the fissions
constructor(private o: ChainOptions)
get optical(): numberthe optical radius of the ball now (Sigma R), with the spent nuclei taken out
get nucleiLeft(): number
get neutronsFlying(): number
static kTheory(components: FuelComponent[], numberDensity: number, radius: number): numberThe multiplication factor of the ball by the model (the chance that a neutron born in it meets a nucleus before the surface, times nu sigma_f / sigma_abs), for the optical radius tau = Sigma R and the shares given. The chance of leaving is the mean of exp(-tau s / R) over birth points of the ball and directions.
get k(): numberkTheory for this ball with all nuclei present
inject(n: number): voidn neutrons start from the middle in random directions
advance(dt: number): ChainEvent[]run dt seconds on; the events in the order they happen (a neutron's flight is not an event: its end is)

packages/physics-atomic/src/chain.ts:40

NucleiPopulation class

class NucleiPopulation
time: numberseconds since the start
energy: numberjoules released by all the decays so far
decays: number
constructor(kinds: DecayKind[], capacity: number, seed = 1)
get size(): number
kindOf(i: number): stringthe kind of nucleus i
count(id: string): number
counts(): Record<string, number>
add(id: string, count: number): numberput count new nuclei of the kind in; returns the index of the first
advance(dt: number): DecayEvent[]run dt seconds on; the decays in the order they happen (each nucleus that decays becomes its daughter, which may decay inside the same step)

packages/physics-atomic/src/decay.ts:22

Functions

atomic function

function atomic(o: { seed?: number; drawn?: number } = {}): AtomicCapability

packages/physics-atomic/src/atomic.ts:104

atomicDocks function

function atomicDocks(cap: AtomicCapability)

The atoms as a backend of the docks of .fmdl models: two atoms of this capability that are docked are bonded by it (the bond's length, angle and energy from the tables, the atoms placed in the molecule's shape) and the places it gives are the actors' new ones. Structural: nothing here imports the levels package.

packages/physics-atomic/src/forms.ts:41

atomicForms function

function atomicForms(bridge: MotionBridge, cap: AtomicCapability, host: PhysicsHost): void

The forms of the motion language that the atoms add (they are functions of the bridge, so a program uses them like wait):

  (fire-photon atom nm)       a photon of wavelength nm flies at the atom; the program waits until it has been taken ("absorbed") or has flown past ("passed")
  (fire-neutron atom mev)     a neutron of that kinetic energy (MeV) flies at the nucleus; waits for "fission" or "capture"
  (excite atom n)             put the atom's first electron on level n now
  (dock a b)                  is a word of `@ferret/levels` (`installDockForms`): two atoms docked are bonded by `atomicDocks`
  (wait-emission atom)        lasts until that atom has given off a photon; the value is its wavelength in nm
  (line n m)                  the wavelength in nm of hydrogen's line between levels n and m

Events to wait on with (wait-event "atomic:transition") and the others listed with the capability.

packages/physics-atomic/src/forms.ts:17

atomOfModel function

function atomOfModel(resolved: { model: { physics?: { modules?: Record<string, Record<string, unknown> | null> } } } | undefined): AtomModuleData | undefined

the atom a model stands for, or undefined when it is not an atom

packages/physics-atomic/src/models.ts:21

bindAtomModels function

function bindAtomModels(events: AtomEventsLike, stage: AtomStageLike, cap: AtomicCapability): void

make and take away the atoms of the models that appear and vanish; returns the unsubscribe-less binding (the events live as long as the bus)

packages/physics-atomic/src/models.ts:32

bindingEnergyMeV function

function bindingEnergyMeV: (n: Nuclide) => number

The binding energy of a nucleus (MeV): the mass the nucleons lose in joining.

packages/physics-atomic/src/nuclides.ts:39

bondAngle function

function bondAngle(center: string, count: number): number | null

The angle between two bonds (radians) of a central atom that has count ligands: water 104.45 degrees, ammonia 107.8, methane the tetrahedral 109.47.

packages/physics-atomic/src/bonds.ts:34

bondData function

function bondData(a: string, b: string): BondData & { order: number }

The bond between elements a and b; throws for a pair that has no data.

packages/physics-atomic/src/bonds.ts:26

bondEnergyEV function

function bondEnergyEV: (a: string, b: string) => number

packages/physics-atomic/src/bonds.ts:31

comptonElectronEnergy function

function comptonElectronEnergy: (E: number, theta: number) => number

the electron kicked out by a Compton scattering carries what the photon lost, eV

packages/physics-atomic/src/xray.ts:38

comptonEnergy function

function comptonEnergy: (E: number, theta: number) => number

the energy of a photon of E eV after it scatters by theta on a free electron at rest (Compton)

packages/physics-atomic/src/xray.ts:12

comptonShiftNm function

function comptonShiftNm: (theta: number) => number

the change of wavelength, nm: (h / m c) (1 - cos theta), the Compton wavelength 2.42631e-3 nm

packages/physics-atomic/src/xray.ts:14

coulombEnergy function

function coulombEnergy: (q1: number, q2: number, r: number) => number

The potential energy of two charges at distance r (J).

packages/physics-atomic/src/coulomb.ts:13

coulombForce function

function coulombForce: (q1: number, q2: number, r: number) => number

The force on charge 2 from charge 1 at distance r along the line (N): positive repels (like charges).

packages/physics-atomic/src/coulomb.ts:11

coulombForces function

function coulombForces(ps: readonly Charged[], cutoff: number, soft = 0): { f: Float64Array; energy: number; pairs: number }

The force on each particle (N) from all the others within cutoff (m), and the potential energy of those pairs (J). soft (m) keeps two particles that meet from a force that blows up: r^2 -> r^2 + soft^2 in the force and the energy. The grid has cells of cutoff; the result does not depend on it but the cost does: a particle looks at 27 cells, not at all the others. Out: f is 3 numbers per particle.

packages/physics-atomic/src/coulomb.ts:20

decayRates function

function decayRates(n: number, Z = 1, M = Infinity): { total: number; to: number[] }

The total rate of leaving level n by spontaneous emission (1/s), and the rate of each channel (to the lower levels).

packages/physics-atomic/src/hydrogenic.ts:127

duaneHuntNm function

function duaneHuntNm: (kV: number) => number

the shortest wavelength (nm) of a tube at kV: Duane-Hunt, hc / eV

packages/physics-atomic/src/xray.ts:58

effectiveCharge function

function effectiveCharge(n: number, Z: number, shells: readonly number[]): number

The charge an electron of shell n feels (Slater): Z less 0.30 (0.35 above the first shell) for each other electron of its shell, 0.85 for each of the shell below, 1 for deeper ones.

packages/physics-atomic/src/hydrogenic.ts:66

einsteinA function

function einsteinA(n: number, m: number, Z = 1, M = Infinity): number

The rate (1/s) at which an electron of level n, its sublevels equally occupied, falls to the lower level m: from the radial integrals of the hydrogen wave functions, A = (4 alpha omega^3 / 3 c^2) (l_> / (2l+1)) R^2 summed over the angular momenta (the 2p -> 1s rate, Lyman alpha, is 6.265e8 per second). For a nucleus of charge Z the lengths shrink by Z and omega grows by Z^2: the rate goes as Z^4. M is the nucleus's mass, kg.

packages/physics-atomic/src/hydrogenic.ts:113

energyOfNm function

function energyOfNm: (nm: number) => number

The energy of a photon of vacuum wavelength nm nanometres (J).

packages/physics-atomic/src/hydrogenic.ts:32

fillVacancy function

function fillVacancy(Z: number, bVacancy: number, bFrom: number, bEjected: number, rand: () => number, yieldK = fluorescenceYieldK(Z)): VacancyDecay

what a vacancy in a shell bound by bVacancy does when an electron falls into it from a shell bound by bFrom: the photon takes the whole difference, or the Auger electron takes it less the binding bEjected of the electron that carries it away (the three levels are the caller's, from the table)

packages/physics-atomic/src/xray.ts:49

fluorescenceYieldK function

function fluorescenceYieldK: (Z: number) => number

the K-shell fluorescence yield by Burhop's form Z^4 / (a + Z^4), a = 1.12e6: the share of K vacancies that give off a photon, the rest give an Auger electron

packages/physics-atomic/src/xray.ts:44

groundShells function

function groundShells(count: number): number[]

The shell each of count electrons goes to in the ground state: shell n holds 2 n^2 (the planetary filling).

packages/physics-atomic/src/hydrogenic.ts:59

hydrogenicRadial function

function hydrogenicRadial(n: number, l: number, Z: number, r: number): number

the normalised radial function R_nl(r) of a hydrogen-like atom, r in a0 (the integral of R^2 r^2 over r is 1), in a0^(-3/2)

packages/physics-atomic/src/orbitals.ts:23

kleinNishina function

function kleinNishina(E: number, theta: number): number

the Klein-Nishina cross section per solid angle, m^2/sr, for a photon of E eV scattered by theta

packages/physics-atomic/src/xray.ts:17

kleinNishinaTotal function

function kleinNishinaTotal(E: number): number

the total Klein-Nishina cross section, m^2 (the analytic integral); 6.652e-29 m^2 (Thomson) for E -> 0

packages/physics-atomic/src/xray.ts:22

knownNuclides function

function knownNuclides: () => string[]

packages/physics-atomic/src/nuclides.ts:33

kramersNumber function

function kramersNumber: (E: number, kV: number) => number

Kramers' spectrum, the number of photons per unit energy at E eV for a tube of kV (arbitrary scale): (E0 - E) / E for E < E0

packages/physics-atomic/src/xray.ts:60

laguerre function

function laguerre(k: number, alpha: number, x: number): number

the associated Laguerre polynomial L_k^alpha(x) by the three-term recurrence

packages/physics-atomic/src/orbitals.ts:14

levelEnergy function

function levelEnergy(n: number, Z: number, M = Infinity): number

The energy of level n (J, negative: the ionisation limit is 0) for an electron that feels the charge Z. M is the nucleus's mass (kg; default infinite).

packages/physics-atomic/src/hydrogenic.ts:15

ligandPositions function

function ligandPositions(center: string, lengths: number[]): [number, number, number][] | null

Where the ligands of a central atom sit round it, in the molecule's own frame, metres: one ligand on +x; two in the x-y plane at the bond angle; three (a pyramid) and four (a tetrahedron) spread evenly round -z. Returns null for a count the table has no angle for.

packages/physics-atomic/src/bonds.ts:44

meanRadius function

function meanRadius: (n: number, l: number, Z: number) => number

the mean radius <r> of a hydrogen-like orbital, a0: a0 (3 n^2 - l (l + 1)) / (2 Z)

packages/physics-atomic/src/orbitals.ts:31

mulberry function

function mulberry(seed: number): () => number

a deterministic generator of numbers in [0, 1): the points of a cloud are the same on every run for the same seed

packages/physics-atomic/src/orbitals.ts:60

nuclearMass function

function nuclearMass: (n: Nuclide) => number

The mass of the bare nucleus (kg): the atom less its Z electrons (their binding, eV, is left out).

packages/physics-atomic/src/nuclides.ts:36

nuclide function

function nuclide(name: string): Nuclide

The nuclide of that name (U-235); throws, listing the known ones, for one that is not tabled.

packages/physics-atomic/src/nuclides.ts:26

nuclideName function

function nuclideName: (Z: number, A: number) => string

packages/physics-atomic/src/nuclides.ts:23

orbitPoint function

function orbitPoint(o: Orbit, M: number): [number, number, number]

the point of the orbit at the mean anomaly M (radians, 0 at the nearest point): Kepler's equation solved by Newton, the nucleus in the focus; the plane is x-y

packages/physics-atomic/src/orbitals.ts:109

orbitRadius function

function orbitRadius(n: number, Z: number, M = Infinity): number

The radius of the orbit of level n (m).

packages/physics-atomic/src/hydrogenic.ts:18

orbitSpeed function

function orbitSpeed(n: number, Z: number, M = Infinity): number

The angular speed of an electron on level n (rad/s): the Bohr rule L = n hbar gives omega = n hbar / (mu r^2).

packages/physics-atomic/src/hydrogenic.ts:21

photoelectronEnergy function

function photoelectronEnergy: (E: number, binding: number) => number | undefined

the photoelectron's energy, eV, from a photon of E that can reach a level bound by binding; undefined when it cannot

packages/physics-atomic/src/xray.ts:41

photonColour function

function photonColour(nm: number): { rgb: [number, number, number]; visible: boolean }

The colour a photon of wavelength nm is drawn in: [r, g, b] in 0..1 and whether the eye sees it. Infrared is a dim red, ultraviolet a dim violet (so a photon is never invisible in a picture), marked visible: false.

packages/physics-atomic/src/hydrogenic.ts:41

reactionQ function

function reactionQ(from: string, products: string[], neutrons: number): number

The energy released (J) when from takes a neutron and becomes products and neutrons free neutrons: the rest mass lost, c^2 times it. Negative when it costs energy.

packages/physics-atomic/src/nuclides.ts:55

realHarmonic function

function realHarmonic(l: number, m: number, theta: number, phi: number): number

the real spherical harmonic Y_lm (m from -l to l: m < 0 is the sine form, m > 0 the cosine form), for l up to 3; the integral of Y^2 over the sphere is 1

packages/physics-atomic/src/orbitals.ts:34

reducedMass function

function reducedMass: (M: number) => number

The reduced mass of an electron and a nucleus of mass M (kg).

packages/physics-atomic/src/hydrogenic.ts:11

restEnergy function

function restEnergy: (kg: number) => number

The energy (J) a mass difference is worth: m c^2.

packages/physics-atomic/src/nuclides.ts:42

sampleBremsstrahlung function

function sampleBremsstrahlung(kV: number, rand: () => number, Emin = 1000): number

a photon energy from the continuous spectrum above Emin (a window or filter keeps nothing below it), eV

packages/physics-atomic/src/xray.ts:62

sampleComptonAngle function

function sampleComptonAngle(E: number, rand: () => number): number

a scattering angle drawn from the Klein-Nishina law by rejection (the envelope is the forward value, the largest)

packages/physics-atomic/src/xray.ts:29

sampleOrbital function

function sampleOrbital(n: number, l: number, m: number, Z: number, count: number, seed = 1): [number, number, number][]

count points (a0, [x, y, z]) distributed as the density of the orbital (n, l, m) of a hydrogen-like atom of charge Z: the radius from the radial distribution r^2 R^2 by its cumulative table, the direction by rejection from |Y_lm|^2.

packages/physics-atomic/src/orbitals.ts:69

seriesName function

function seriesName(to: number): string

The named series of hydrogen by the level the electron goes to: Lyman (1), Balmer (2), Paschen (3), Brackett (4), Pfund (5).

packages/physics-atomic/src/hydrogenic.ts:35

sommerfeldOrbit function

function sommerfeldOrbit(n: number, l: number, Z: number): Orbit

the ellipse of the electron (n, l) round a charge Z: the semi-minor axis b = a (l + 1/2) / n (l = 0 is a thin ellipse through the nucleus, not a line)

packages/physics-atomic/src/orbitals.ts:102

stream function

function stream(seed: number): () => number

A deterministic stream of numbers in [0, 1) from a seed (mulberry32).

packages/physics-atomic/src/atomic.ts:98

transitionEnergy function

function transitionEnergy: (n: number, m: number, Z: number, M?: number) => number

The energy a photon must carry to lift an electron from level n to m (J); negative going down (m < n): the energy it gives off.

packages/physics-atomic/src/hydrogenic.ts:27

tubeEfficiency function

function tubeEfficiency: (Z: number, kV: number) => number

the efficiency of the tube, the share of the electron's power that comes out as X-rays: about 1e-9 Z V (V in volts), Kramers

packages/physics-atomic/src/xray.ts:73

wavelengthOf function

function wavelengthOf: (E: number) => number

The vacuum wavelength of a photon of energy E (m).

packages/physics-atomic/src/hydrogenic.ts:30

Interfaces

AddAtom interface

interface AddAtom
Z?: number
A?: number
nuclide?: string
electrons?: number
position?: Vec3
entity?: Entity
seed?: number
shells?: number[]

packages/physics-atomic/src/atomic.ts:53

AtomEventsLike interface

interface AtomEventsLike
on(name: string, fn: (p: any) => void): unknown

packages/physics-atomic/src/models.ts:16

AtomicCapability interface

interface AtomicCapability extends Capability
readonly atoms: Map<string, AtomState>
readonly photons: Map<number, PhotonState>
readonly molecules: Map<string, Molecule>
readonly freeCharges: Map<number, FreeCharge>
readonly neutrons: Map<number, FreeNeutron>
drawn: numberscene metres per true metre
addAtom(name: string, o: AddAtom): AtomState
electronPosition(atom: string, i: number): Vec3where an electron is now, scene metres
electronEnergy(atom: string, i: number): numberthe energy of an electron's level, J (negative; 0 is free)
screened(atom: string, i: number): numberthe charge an electron feels on its shell
excite(atom: string, i: number, n: number): voidput an electron on level n, the energy for it coming from outside (booked as external)
firePhoton(o: { toward?: string; at?: Vec3; dir?: Vec3; nm?: number; energy?: number }): PhotonStatesend a photon of vacuum wavelength nm (or an energy in J) at an atom, or along a direction from a point
fireNeutron(o: { toward: string; mev?: number; at?: Vec3; speed?: number; outcome?: 'fission' | 'capture' }): FreeNeutronsend a neutron of kinetic energy mev at a nucleus. outcome forces fission or capture; otherwise the tabled shares decide, by the seed.
dock(a: string, b: string): Moleculedock two atoms: a bond of the tabled length and energy, the atoms placed in the molecule's shape
undock(a: string, b: string): voidpull a bond apart: the energy it holds must come from outside (booked as external)
heat(molecule: string, joules: number): voidgive a molecule heat, J, from outside: a bond that gets what it holds breaks, the rest stays as heat
energy(): { total: number; external: number; terms: Record<string, number> }the account: every kind of energy (J) and the total; external is what was put in from outside, so total - external is constant
nuclideOf(atom: string): stringthe name of an atom's nuclide (H-1), when it has a tabled one

packages/physics-atomic/src/atomic.ts:55

AtomModuleData interface

interface AtomModuleData
nuclide?: string
Z?: number
A?: number
electrons?: number

packages/physics-atomic/src/models.ts:18

AtomStageLike interface

interface AtomStageLike

what the binding needs of a stage and of the event bus: structural, so this package does not depend on @ferret/levels

actor(name: string): { root: { getAbsolutePosition(): { x: number; y: number; z: number } }; resolved?: { model: { physics?: { modules?: Record<string, Record<string, unknown> | null> } } } }

packages/physics-atomic/src/models.ts:13

AtomState interface

interface AtomState
name: string
Z: number
A: number
nuclide?: Nuclide
mass: numberthe mass of the bare nucleus, kg
position: Vec3
velocity: Vec3
electrons: ElectronState[]
entity?: Entity
molecule?: string
fragment?: booleana bare nucleus flying on after a fission: it is not tracked by the orbits

packages/physics-atomic/src/atomic.ts:36

BondData interface

interface BondData
length: number
energy: number

packages/physics-atomic/src/bonds.ts:11

BondState interface

interface BondState
a: string
b: string
length: number
energy: number
order: number

packages/physics-atomic/src/atomic.ts:50

ChainOptions interface

interface ChainOptions
components: FuelComponent[]
numberDensity: numberatoms per m3 of the mixture
radius: numberthe radius of the real ball, metres
visible?: numberhow many nuclei are drawn (default 2000)
speed?: numberm/s (default 2200, thermal)
seed?: number

packages/physics-atomic/src/chain.ts:23

Charged interface

interface Charged
x: number
y: number
z: number
q: number

packages/physics-atomic/src/coulomb.ts:8

DecayEvent interface

interface DecayEvent
t: number
index: number
from: string
to: string
emits?: string
Q: number

packages/physics-atomic/src/decay.ts:17

DecayKind interface

interface DecayKind

Many decaying nuclei. A population of nuclei of the kinds it is given, each with its own random moment of decay drawn from the exponential law of its kind's half-life, so the numbers left follow N0 2^(-t / T) within the statistical error of N0 and the nuclei themselves decay one by one, in order. A decay is an event: the nucleus becomes its daughter (a kind of the table, whose clock starts then) or, where the table ends, a nucleus of "beyond the table" that does not decay here. The energy of the decays is added up (energy, joules). Time is the caller's, in seconds: a slider that speeds it up changes what advance is given, nothing else.

id: string
halfLife: numberseconds; Infinity for a stable kind
daughter?: stringthe id of the kind the nucleus becomes; absent: it becomes a nucleus beyond the table
emits?: stringwhat flies out (alpha, electron ...), as the caller names it
Q?: numberMeV released by one decay

packages/physics-atomic/src/decay.ts:10

ElectronState interface

interface ElectronState
n: number
phase: number
axis: Vec3

packages/physics-atomic/src/atomic.ts:35

FreeCharge interface

interface FreeCharge
id: number
kind: 'electron'
q: number
mass: number
x: Vec3
v: Vec3

packages/physics-atomic/src/atomic.ts:48

FreeNeutron interface

interface FreeNeutron
id: number
position: Vec3
passedFrom?: Vec3
velocity: Vec3
target?: string
kinetic: number
speed?: number
want?: 'fission' | 'capture'
outcome?: 'fission' | 'capture' | 'gone'

packages/physics-atomic/src/atomic.ts:49

FuelComponent interface

interface FuelComponent

A chain reaction among nuclei: a ball of material in which neutrons fly, are taken up and make fissions that make more neutrons.

The material is a mixture of components (a fissile nuclide, a diluent that only captures ...), each with its share of the atoms and its neutron cross-sections. A neutron of one speed goes straight until it meets a nucleus; the way is drawn from exp(-Sigma s), Sigma the macroscopic cross-section of the mixture as it now is (spent nuclei no longer count). It leaks if it reaches the surface of the ball first. At the nucleus it meets (of a component drawn by sigma x share, the nearest living nucleus of it) it fissions, with the chance sigma_f / (sigma_f + sigma_c), making nu neutrons (the integer part, and one more with the chance of the fraction) from there in all directions, or it is captured. A nucleus is used up by either.

What is drawn is a ball of visible nuclei, not the 1e25 of a real one: the visible ball keeps the optical radius Sigma R of the real one (the one number the physics of a bare ball is about), so the paths in it, the leak and k are those of the real ball; the cross-sections are conditionally larger in the same proportion for all, the way a picture's atoms are drawn larger than they are. One visible nucleus is one nucleus: its fission releases one fission's energy (energyMeV), nothing is scaled up in the account. A component with no cross-section (a moderator, the bulk of a dilute fuel) only dilutes: it is not drawn. Neutrons are all of one speed with no scattering and no moderator: this is the model of slow neutrons in a bare ball of the fuel, approximate; kTheory is its multiplication factor.

id: string
share: numberthe share of the atoms, any positive weight (they are normalised)
sigmaF: numberbarn
sigmaC: number
nu: numberneutrons per fission
energyMeV: number

packages/physics-atomic/src/chain.ts:17

Molecule interface

interface Molecule
id: string
atoms: string[]
bonds: BondState[]
internal: number

packages/physics-atomic/src/atomic.ts:51

NeutronChannel interface

interface NeutronChannel

What a neutron does to a nucleus: the products, how many neutrons come out, and the share of the captures that end this way (cross sections of thermal neutrons).

kind: 'fission' | 'capture'
products: string[]
neutrons: number
probability: number

packages/physics-atomic/src/nuclides.ts:45

Nuclide interface

interface Nuclide
name: string
symbol: string
Z: number
A: number
N: number
atomicMass: number

packages/physics-atomic/src/nuclides.ts:21

Orbit interface

interface Orbit
a: numbersemi-major axis, a0
b: number
e: number
period: numberthe period of the Kepler motion in the unit of the ground orbit of hydrogen: n^3 / Z^2

packages/physics-atomic/src/orbitals.ts:97

PhotonState interface

interface PhotonState
id: number
position: Vec3
start: Vec3
limit: number
passed?: Vec3
dir: Vec3
energy: number
nm: number
rgb: [number, number, number]
visible: boolean
age: number
tested: Set<string>
outcome?: 'absorbed' | 'passed' | 'gone'

packages/physics-atomic/src/atomic.ts:47

VacancyDecay interface

interface VacancyDecay
kind: 'fluorescence' | 'auger'
energy: number

packages/physics-atomic/src/xray.ts:46

Types

ChainEvent type

type ChainEvent = | { kind: 'fission'; t0: number; from: [number, number, number]; t: number; nucleus: number; component: string; pos: [number, number, number]; neutrons: number; energyMeV: number } | { kind: 'capture'; t0: number; from: [number, number, number]; t: number; nucleus: number; component: string; pos: [number, number, number] } | { kind: 'leak'; t0: number; from: [number, number, number]; t: number; pos: [number, number, number] }

every event ends the flight of a neutron: it left from at t0 and arrived at pos at t

packages/physics-atomic/src/chain.ts:32

Constants

ALPHA const

const ALPHA: 0.0072973525693

packages/physics-atomic/src/constants.ts:9

ATOMIC_DEFAULTS const

const ATOMIC_DEFAULTS: { orbitClock: number; decayClock: number; photonSpeed: number; tolerance: number; captureMargin: number; cutoff: number; range: number; }

packages/physics-atomic/src/atomic.ts:33

AVOGADRO const

const AVOGADRO: 6.02214076e+23

packages/physics-atomic/src/constants.ts:19

BEYOND_TABLE const

const BEYOND_TABLE: "(beyond the table)"

packages/physics-atomic/src/decay.ts:19

BOHR_RADIUS const

const BOHR_RADIUS: 5.29177210903e-11

packages/physics-atomic/src/constants.ts:14

C_LIGHT const

const C_LIGHT: 299792458

packages/physics-atomic/src/constants.ts:6

E_CHARGE const

const E_CHARGE: 1.602176634e-19

Physical constants, SI (CODATA 2018).

packages/physics-atomic/src/constants.ts:3

ELECTRON_REST_EV const

const ELECTRON_REST_EV: 510998.95

Processes of X-rays with an atom, general and without any game: Compton scattering by the Klein-Nishina law, the photoelectric effect, the fate of a vacancy in an inner shell (a fluorescence photon or an Auger electron), and the continuous spectrum of an X-ray tube (Kramers, with the Duane-Hunt limit). Energies are in eV unless a name says keV. The random numbers come from the caller's stream so a run repeats.

packages/physics-atomic/src/xray.ts:7

EPS0 const

const EPS0: 8.8541878128e-12

packages/physics-atomic/src/constants.ts:7

EV const

const EV: 1.602176634e-19

packages/physics-atomic/src/constants.ts:16

H_PLANCK const

const H_PLANCK: 6.62607015e-34

packages/physics-atomic/src/constants.ts:4

HBAR const

const HBAR: number

packages/physics-atomic/src/constants.ts:5

HC_EV_NM const

const HC_EV_NM: 1239.841984

packages/physics-atomic/src/xray.ts:8

K_COULOMB const

const K_COULOMB: number

packages/physics-atomic/src/constants.ts:8

M_ELECTRON const

const M_ELECTRON: 9.1093837015e-31

packages/physics-atomic/src/constants.ts:10

M_NEUTRON const

const M_NEUTRON: 1.67492749804e-27

packages/physics-atomic/src/constants.ts:12

M_PROTON const

const M_PROTON: 1.67262192369e-27

packages/physics-atomic/src/constants.ts:11

MASS_U const

const MASS_U: { H1: number; neutron: number; }

The atomic mass unit values of the particles, u.

packages/physics-atomic/src/nuclides.ts:12

MEV const

const MEV: number

packages/physics-atomic/src/constants.ts:17

NEUTRON_CHANNELS const

const NEUTRON_CHANNELS: Record<string, NeutronChannel[]>

U-235 with a thermal neutron: fission 585.1 b and radiative capture 98.7 b (the fission shares 0.8557 of the absorptions). Fission is the one tabled pair, Ba-141 + Kr-92 + 3 n.

packages/physics-atomic/src/nuclides.ts:47

RYDBERG_ENERGY const

const RYDBERG_ENERGY: number

packages/physics-atomic/src/constants.ts:15

SYMBOLS const

const SYMBOLS: string[]

packages/physics-atomic/src/nuclides.ts:9

U_KG const

const U_KG: 1.6605390666e-27

packages/physics-atomic/src/constants.ts:13

U_MEV const

const U_MEV: 931.49410242

packages/physics-atomic/src/constants.ts:18

VALENCE const

const VALENCE: Record<string, number>

packages/physics-atomic/src/bonds.ts:20