Repository navigation
Rates and transport
Thermodynamics says whether a step can run. Rates say how long it takes. extensions/chemistry/kinetics.mojo and transport.mojo turn measured rate data into times, depths and temperature bounds.
This page is a reference. For the rest of the library, see Process chemistry.
An Arrhenius rate constant is k = A exp(-Ea / R T), first order, in 1/s.
-
rate(temperature)gives k. -
temperature_for(rate)gives the temperature where k reaches a rate. -
half_life(temperature)gives ln 2 / k.
RateAtLeast is a Constraint. It holds where k reaches a minimum. A kinetic bound that practice states as a temperature, such as "above 900 degC", can then come from measured rate data instead.
from extensions.chemistry.kinetics import Arrhenius, RateAtLeast
from extensions.chemistry.quantities import KILOJOULE_PER_MOLE, MolarEnergy64
from units.si import Frequency64
var law = Arrhenius(Frequency64(1e10), MolarEnergy64(150, KILOJOULE_PER_MOLE))
var need = RateAtLeast(law, Frequency64(1e-3)) # add with met_intervalsShrinkingCore is the model of Levenspiel ("Chemical Reaction Engineering", chapter 25) for a gas that reacts with a solid sphere. Three resistances act in series: the gas film, the layer of product ash, and the reaction at the core's surface. The time to convert a share X of the sphere is:
t = tau_film X
+ tau_ash (1 - 3 (1 - X)^(2/3) + 2 (1 - X))
+ tau_reaction (1 - (1 - X)^(1/3))
ShrinkingCore.from_properties computes the three times from the properties of the sphere and the gas. These are the radius, the solid's molar density, the gas concentration and the stoichiometry. They also include the film coefficient, the ash diffusivity and the surface rate constant. time_to(conversion) gives the time, and conversion_at(time) inverts it by bisection. The largest of the three times shows which resistance controls the step.
evaporation_flux is the Hertz-Knudsen-Langmuir rate at which a surface loses mass into a vacuum or a thin gas:
J = alpha (p_sat - p) sqrt(M / (2 pi R T))
vapor_pressure(condensed, vapor, temperature) finds p_sat from the data. evaporation_time turns a flux into the time to remove a mass from an area. The vacuum distillation of a Kroll sponge is an example: it boils the leftover Mg and MgCl2 away.
Diffusivity is an Arrhenius diffusion coefficient, D = D0 exp(-Q / R T). case_depth and time_to_depth solve Fick's second law for a semi-infinite solid with a fixed surface concentration:
(C - C0) / (Cs - C0) = erfc(x / (2 sqrt(D t)))
This is the case depth of carburizing and nitriding.
heating_time is the lumped-capacitance time to heat a body in a furnace. It is valid where the Biot number h L / k is below about 0.1. biot gives that number, and heating_time raises an error above the limit.
| Quantity | Computed | Reference |
|---|---|---|
| Carburizing time to 0.80 wt% C at 0.5 mm, 950 degC | 7.05 h | About 7.1 h, Callister |
| Mg vapor pressure at 971 K | Within 10 % of 1 kPa | 1 kPa, CRC Handbook |
| Shrinking core, one resistance at a time | Equal | Levenspiel's closed forms |
A rate constant comes from a measurement on the real material. The library does not predict one. The shrinking-core model takes spheres of one size, and it does not model the heat of the reaction.
Tutorials
How-to
- Install
- Run the checks
- GPU backend
- Coverage
- Measure examples
- Add a feature
- Add a scanned building
- Write documentation
Reference
- Scene graph
- Rotations
- Cameras
- Geometry
- Geometry addons
- Lofts and clipping groups
- Sculptor
- Procedural generators
- Meshes and assets
- Lines
- Points and sprites
- Helpers
- Scene objects
- Animated objects
- Raycasting
- Curves and paths
- Animation
- Skinning
- Materials
- Node materials
- TSL functions
- Lights
- Lighting addons
- Fog
- Textures
- Renderer
- Renderer hooks and material flags
- Rasterization
- GPU backend
- Render target
- Post-processing
- GPU computation
- Compute nodes
- Progressive light map
- Gaussian splats
- Voxel global illumination
- SVG renderer
- Image files
- Image decode queue
- Model files
- More model files
- Exporters
- Scene JSON
- Windowing and controls
- C ABI and hosts
- Math
- Norm consumers
- Math addons
- Units
- Coverage tool
- Commands
- Examples
- Benchmarks
- Extensions
- Shared physics
- Physics query snapshots
- Continuous collision
- Tick force restoration
- Water
- Warp drives
- Vegetation
- Village
- Streamline
- Animals
-
Buildings
- Numerics
- Building topology
- Building model
- IFC exchange
- Procedural towers
- Floor plans and interiors
- Frame analysis
- Shell analysis
- Building energy
- Construction kits
- Bearing walls
- Scanned buildings
- SOG files
- Compressed PLY files
- Scan parts
- Cleaning and orienting scans
- Walking through a scan
- Virtual scans
- Castle
- CARLA
- Femur
- Tibia
- Fibula
- Patella
- Knee
- Muscles
- Vessels
- Lymph
- Nerves
- Integument
- Leg
- Foot
- Pelvis
- Torso
- Arm
- Hand
- Head
- Genome
- Game humanoid
- Humanoid fidelity
- Mixamo animations
- Audio-aligned game faces
- Converted assets
- Mesh quality
- Garments
- Outfits and armor
- Cloth and spring bones
- Attire estimates
- Segment inertia
- Process chemistry
- Thermochemical data
- Chemical equilibrium
- Process maps
- Rates and transport
- Electrolysis and film color
- Binary solutions
- Flowsheets and routes
- Materials and coatings
- Crystals and figures
Explanation
- Software rasterizer
- Scene graph as an array
- Linear color
- Normals are not colors
- Perspective correction
- Fixed-point coverage
- Per-fragment shading
- Mipmaps
- Sorted transparency
- Types and checks
- Render hooks as a trait
- Shared CPU and GPU code
- Bands and threads
- PNG structure
- Extensions beside the port
- Process temperatures
- Scans as building models
- CUDA teardown hang
- Mojo compiler hang