Invntr
Source

All instruments

diffusion_solid

Diffusion in solids (Fick's second law, constant D): Arrhenius diffusivity from D0 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 - C0) erf(z); halfway depth z = erfinv(0.5) = 0.4769362762; closed form, rel 1e-9passed

    characteristic_depth_m0.001 ± 1e-150.001lockedunder 0.01 % of the tolerance used
    erf_z_probe0.5205 ± 5.2e-100.5205lockedunder 0.01 % of the tolerance used
    c_at_probe0.4877 ± 4.9e-100.4877lockedunder 0.01 % of the tolerance used
    z_for_target0.476936 ± 4.8e-100.476936lockedunder 0.01 % of the tolerance used
    depth_for_target_m0.000476936 ± 4.8e-130.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 1e-9passed

    erf_z_probe0.842701 ± 8.4e-100.842701lockedunder 0.01 % of the tolerance used
    erfc_z_probe0.157299 ± 1.6e-100.157299lockedunder 0.01 % of the tolerance used
    c_at_probe0.29438 ± 2.9e-100.29438lockedunder 0.01 % of the tolerance used
  3. r0003depth grows as sqrt(t): halfway depth at t is 0.4769363 x 2 sqrt(Dt), so twice that depth is reached at exactly 4 t = 40000 s; closed form, rel 1e-9 (probe given to 15 digits)passed

    time_for_target_at_probe_s40000 ± 4e-0540000lockedunder 0.01 % of the tolerance used
  4. r0004Arrhenius from two points: D = 1e-14 at 1000 K and 1e-12 at 1250 K give Q = R ln(100) / (1/1000 - 1/1250) = 191.4475768 kJ/mol and D0 = 1e-14 x 100^5 = 1e-4 m^2/s; equivalent time at 1250 K = t / 100; R = k_B N_A (CODATA exact); closed form, rel 1e-9passed

    gas_constant_J_per_mol_K8.31446 ± 8.3e-128.31446lockedunder 0.01 % of the tolerance used
    q_kJ_per_mol191.448 ± 1.9e-07191.448lockedunder 0.01 % of the tolerance used
    d0_m2_s0.0001 ± 1e-130.0001lockedunder 0.01 % of the tolerance used
    diffusivity_m2_s1e-14 ± 1e-231e-14lockedunder 0.01 % of the tolerance used
    diffusivity2_m2_s1e-12 ± 1e-211e-12lockedunder 0.01 % of the tolerance used
    time_equivalent_s36 ± 3.6e-0836lockedunder 0.01 % of the tolerance used
  5. r0005Arrhenius forward: D0 = 1e-4 m^2/s, Q = 191.4475768 kJ/mol at 1000 K gives D = 1e-14 m^2/s (inverse of the two-point case); closed form, rel 1e-9passed

    diffusivity_m2_s1e-14 ± 1e-231e-14lockedunder 0.01 % of the tolerance used
    diffusion_length_m6e-06 ± 6e-156e-06lockedunder 0.01 % of the tolerance used
  6. r0006thin film (Crank eq. 3.4, surface film): peak M / sqrt(pi D t) = 2e-3 / sqrt(pi); C = peak/e at depth 2 sqrt(Dt) = 1 mm; mass conserved (integral = 1, Simpson to z = 7, rel 1e-9); sinusoidal segregation tau = lambda^2 / (4 pi^2 D), homogenisation to 1 % = tau ln 100; closed form, rel 1e-9passed

    film_peak_c0.00112838 ± 1.1e-120.00112838lockedunder 0.01 % of the tolerance used
    depth_for_target_m0.001 ± 1e-120.001lockedunder 0.01 % of the tolerance used
    film_mass_fraction_in_profile1 ± 1e-091lockedunder 0.01 % of the tolerance used
    segregation_relaxation_time_s10.1321 ± 1e-0810.1321lockedunder 0.01 % of the tolerance used
    homogenisation_time_s46.6601 ± 4.7e-0846.6601lockedunder 0.01 % of the tolerance used
  7. r0007slab Fourier series (Crank eq. 4.17) at Fo = 1e-4 matches the half-space at early times: C(z = 1) = erfc(1) = 0.1572992071, mean uptake = 4 sqrt(Fo / pi) = 0.0225675833; 99 % of the mean at Fo = ln(800 / pi^2) / pi^2 = 0.4453220 (first term; the next is below 1e-16); image terms below erfc(49), rel 1e-8passed

    slab_method= fourier_seriesfourier_serieslockedexact match
    slab_fourier_number0.0001 ± 1e-160.0001locked0.014 % of the tolerance used
    c_at_probe0.157299 ± 1.6e-090.157299lockedunder 0.01 % of the tolerance used
    slab_mean_fraction0.0225676 ± 2.3e-100.0225676lockedunder 0.01 % of the tolerance used
    slab_fourier_number_to_fraction0.445322 ± 4.5e-100.445322lockedunder 0.01 % of the tolerance used
    slab_time_to_fraction_s4.45322e+07 ± 0.0454.45322e+07lockedunder 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^2/s2.3e-05Arrhenius pre-factor D0 (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 = D0 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^2/sMeasured D at temperature_K. With d_at_t2_m2_s, D0 and Q are derived from the two points.
d_at_t2_m2_sm^2/sMeasured D at temperature2_K.
c_surface11.0Surface concentration Cs (any unit; every concentration in the same unit).
c_initial10.0Initial uniform concentration C0.
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 C0 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 x 2 sqrt(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^2/s
q_kJ_per_molkJ/mol
diffusivity_m2_sm^2/s
diffusion_length_mmsqrt(D t)
characteristic_depth_mm2 sqrt(D t)
z_probe1probe_depth_m / (2 sqrt(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^2/s
time_equivalent_sstime at temperature2_K with the same D t
segregation_relaxation_time_sslambda^2 / (4 pi^2 D)
segregation_remaining_fraction1
homogenisation_time_ss
uptake_per_areamconstant_surface: 2 (Cs - C0) sqrt(D t / pi), concentration unit times metre
surface_fluxm/sconstant_surface: (Cs - C0) sqrt(D / (pi 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