Invntr
Source

All instruments

diffusion_solid

Diffusion in solids (Fick's second law, constant D): Arrhenius diffusivity from D₀ and Q (or from D at two temperatures), constant-surface (erfc) and thin-film (Gaussian) profiles in a half-space, finite slab by Fourier series, depth for a target concentration, equivalent time at another temperature, homogenisation time; profile csv. erf/erfc computed in-house (series + continued fraction).

Field
Materials and crystals
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replaydiffusion_solid 0.1.0 · files 6f72eac884e1…7836
  1. r0001erfc profile at z = 0.5: erf(0.5) = 0.5204998778 (Abramowitz & Stegun Table 7.1), C = Cs - (Cs - C₀) erf(z); halfway depth z = erfinv(0.5) = 0.4769362762; closed form, rel 10⁻⁹passed

    characteristic_depth_m0.001 ± 10⁻¹⁵0.001lockedunder 0.01 % of the tolerance used
    erf_z_probe0.5205 ± 5.2 × 10⁻¹⁰0.5205lockedunder 0.01 % of the tolerance used
    c_at_probe0.4877 ± 4.9 × 10⁻¹⁰0.4877lockedunder 0.01 % of the tolerance used
    z_for_target0.476936 ± 4.8 × 10⁻¹⁰0.476936lockedunder 0.01 % of the tolerance used
    depth_for_target_m0.000476936 ± 4.8 × 10⁻¹³0.000476936lockedunder 0.01 % of the tolerance used
  2. r0002erfc profile at z = 1: erf(1) = 0.8427007929, erfc(1) = 0.1572992071 (Abramowitz & Stegun Table 7.1); closed form, rel 10⁻⁹passed

    erf_z_probe0.842701 ± 8.4 × 10⁻¹⁰0.842701lockedunder 0.01 % of the tolerance used
    erfc_z_probe0.157299 ± 1.6 × 10⁻¹⁰0.157299lockedunder 0.01 % of the tolerance used
    c_at_probe0.29438 ± 2.9 × 10⁻¹⁰0.29438lockedunder 0.01 % of the tolerance used
  3. r0003depth grows as √(t): halfway depth at t is 0.4769363 × 2 √(Dt), so twice that depth is reached at exactly 4 t = 40000 s; closed form, rel 10⁻⁹ (probe given to 15 digits)passed

    time_for_target_at_probe_s40000 ± 4 × 10⁻⁵40000lockedunder 0.01 % of the tolerance used
  4. r0004Arrhenius from two points: D = 10⁻¹⁴ at 1000 K and 10⁻¹² at 1250 K give Q = R ln(100) / (1/1000 - 1/1250) = 191.4475768 kJ/mol and D₀ = 10⁻¹⁴ x 100⁵ = 10⁻⁴ m²/s; equivalent time at 1250 K = t / 100; R = k_B N_A (CODATA exact); closed form, rel 10⁻⁹passed

    gas_constant_J_per_mol_K8.31446 ± 8.3 × 10⁻¹²8.31446lockedunder 0.01 % of the tolerance used
    q_kJ_per_mol191.448 ± 1.9 × 10⁻⁷191.448lockedunder 0.01 % of the tolerance used
    d0_m2_s0.0001 ± 10⁻¹³0.0001lockedunder 0.01 % of the tolerance used
    diffusivity_m2_s10⁻¹⁴ ± 10⁻²³10⁻¹⁴lockedunder 0.01 % of the tolerance used
    diffusivity2_m2_s10⁻¹² ± 10⁻²¹10⁻¹²lockedunder 0.01 % of the tolerance used
    time_equivalent_s36 ± 3.6 × 10⁻⁸36lockedunder 0.01 % of the tolerance used
  5. r0005Arrhenius forward: D₀ = 10⁻⁴ m²/s, Q = 191.4475768 kJ/mol at 1000 K gives D = 10⁻¹⁴ m²/s (inverse of the two-point case); closed form, rel 10⁻⁹passed

    diffusivity_m2_s10⁻¹⁴ ± 10⁻²³10⁻¹⁴lockedunder 0.01 % of the tolerance used
    diffusion_length_m6 × 10⁻⁶ ± 6 × 10⁻¹⁵6 × 10⁻⁶lockedunder 0.01 % of the tolerance used
  6. r0006thin film (Crank eq. 3.4, surface film): peak M / √(π D t) = 2 × 10⁻³ / √(π); C = peak/e at depth 2 √(Dt) = 1 mm; mass conserved (integral = 1, Simpson to z = 7, rel 10⁻⁹); sinusoidal segregation τ = λ² / (4 π² D), homogenisation to 1 % = τ ln 100; closed form, rel 10⁻⁹passed

    film_peak_c0.00112838 ± 1.1 × 10⁻¹²0.00112838lockedunder 0.01 % of the tolerance used
    depth_for_target_m0.001 ± 10⁻¹²0.001lockedunder 0.01 % of the tolerance used
    film_mass_fraction_in_profile1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance used
    segregation_relaxation_time_s10.1321 ± 10⁻⁸10.1321lockedunder 0.01 % of the tolerance used
    homogenisation_time_s46.6601 ± 4.7 × 10⁻⁸46.6601lockedunder 0.01 % of the tolerance used
  7. r0007slab Fourier series (Crank eq. 4.17) at Fo = 10⁻⁴ matches the half-space at early times: C(z = 1) = erfc(1) = 0.1572992071, mean uptake = 4 √(Fo / π) = 0.0225675833; 99 % of the mean at Fo = ln(800 / π²) / π² = 0.4453220 (first term; the next is below 10⁻¹⁶); image terms below erfc(49), rel 10⁻⁸passed

    slab_method= fourier_seriesfourier_serieslockedexact match
    slab_fourier_number0.0001 ± 10⁻¹⁶0.0001locked0.014 % of the tolerance used
    c_at_probe0.157299 ± 1.6 × 10⁻⁹0.157299lockedunder 0.01 % of the tolerance used
    slab_mean_fraction0.0225676 ± 2.3 × 10⁻¹⁰0.0225676lockedunder 0.01 % of the tolerance used
    slab_fourier_number_to_fraction0.445322 ± 4.5 × 10⁻¹⁰0.445322lockedunder 0.01 % of the tolerance used
    slab_time_to_fraction_s4.45322 × 10⁷ ± 0.0454.45322 × 10⁷lockedunder 0.01 % of the tolerance used
7 of 7 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
sourceconstant_surfaceconstant_surface: half-space, surface held at c_surface (erfc). thin_film: a dose film_dose on (or buried in) the surface (Gaussian). slab: thickness slab_thickness_m, both faces held at c_surface (Fourier series).
temperature_KK1200Temperature of the treatment.
time_ss3600Time at temperature_K.
d0_m2_sm²/s2.3e-05Arrhenius pre-factor D₀ (from your own data source). Ignored when d_at_t1_m2_s and d_at_t2_m2_s are given.
q_kJ_per_molkJ/mol148Activation energy Q (from your own data source). 0 makes D = D₀ at every temperature.
temperature2_KKSecond temperature: gives D there and the time with the same D t (equivalent time); with d_at_t2_m2_s, the temperature of that measurement.
d_at_t1_m2_sm²/sMeasured D at temperature_K. With d_at_t2_m2_s, D₀ and Q are derived from the two points.
d_at_t2_m2_sm²/sMeasured D at temperature2_K.
c_surface11.0Surface concentration Cs (any unit; every concentration in the same unit).
c_initial10.0Initial uniform concentration C₀.
c_target1Concentration whose depth is wanted.
probe_depth_mm0Depth at which the concentration is read; with c_target (constant_surface), the time for c_target to reach this depth.
film_dosem1e-06thin_film: amount per area, concentration unit times metre.
film_buriedfalsethin_film: true for a film inside the body (spreads both ways, half the dose on each side).
slab_thickness_mm0.01slab: thickness L.
slab_target_fraction10.99slab: fraction of the way from C₀ to Cs the mean must reach (homogenisation of the slab).
segregation_wavelength_mmWavelength of a sinusoidal segregation (dendrite arm spacing): gives its relaxation and homogenisation times.
residual_fraction10.01Segregation amplitude left at the homogenisation time, as a fraction of the start.
depth_max_mmDepth of the profile csv (default 4 × 2 √(D t); slab: the thickness).
points1201Points in the profile csv.

Readings

NameUnitMeaning
sourcewhich source was solved
arrhenius_frominputs or two_points
gas_constant_J_per_mol_KJ/(mol K)
d0_m2_sm²/s
q_kJ_per_molkJ/mol
diffusivity_m2_sm²/s
diffusion_length_mm√(D t)
characteristic_depth_mm2 √(D t)
z_probe1probe_depth_m / (2 √(D t))
erf_z_probe1
erfc_z_probe1
c_at_probe1
depth_for_target_mm
z_for_target1
time_for_target_at_probe_ss
diffusivity2_m2_sm²/s
time_equivalent_sstime at temperature2_K with the same D t
segregation_relaxation_time_ssλ² / (4 π² D)
segregation_remaining_fraction1
homogenisation_time_ss
uptake_per_areamconstant_surface: 2 (Cs - C₀) √(D t / π), concentration unit times metre
surface_fluxm/sconstant_surface: (Cs - C₀) √(D / (π t)), concentration unit times m/s
film_peak_c1
film_mass_fraction_in_profile1
slab_fourier_number1
slab_methodfourier_series or image_sum
slab_terms1
slab_centre_c1
slab_mean_c1
slab_centre_fraction1
slab_mean_fraction1
slab_fourier_number_to_fraction1
slab_time_to_fraction_ss
profile_depth_max_mm
profile_points1
all_oktrue when there are no warnings
warningslist of warnings

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call