Materials Science (materials-science-ai999x)
Materials Science covers crystal structures and diffraction, defects and diffusion, mechanical properties, phase diagrams, polymers, ceramics and composites, and electronic and thermal properties: 88 calculations in 13 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.
Four ways to use it
| Desktop app (Windows, Linux) | Windows · Linux |
Command line materials-science (Windows, Linux) | Windows · Linux |
| Browser (any device) | Try it on the model page |
| Python 3.10+ | pip install materials-science-ai999x: on Windows and Linux (x86-64) pip installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |
See it
From the Materials Science desktop app: every scene and chart is drawn from the computed answer.
Charts:
Theoretical density of a metal | Bragg angle of a reflection | Concentration in a semi-infinite solid (Fick's second law) | Proeutectoid phase and pearlite in a plain-carbon steel |
Ask in words: 15 examples
Each question below was asked on this release; the comment under it is the line it printed.
import materials_science_ai999x as materials_science
a = materials_science.ask("Radius ratio: rc = 0.102 nm, ra = 0.181 nm")
print(a.outcome, a.values)
# SOLVED {'ratio': 0.563535911602, 'CN': 6, 'geometry': 'octahedral'}
a = materials_science.ask(
"Critical fiber length: sigma_f = 3.5 GPa, d = 10 um, tau_c = 20 "
"MPa"
)
print(a.outcome, a.values)
# SOLVED {'lc': 0.000875, 'lc_mm': 0.875, 'aspect_ratio': 87.5}
a = materials_science.ask(
"Angle between cubic directions: u1 = 1, v1 = 0, w1 = 0, u2 = 1, "
"v2 = 1, w2 = 1"
)
print(a.outcome, a.values)
# SOLVED {'angle_deg': 54.7356103172}
a = materials_science.ask(
"Bragg angle: d = 0.2087 nm, lambda = 0.1542 nm"
)
print(a.outcome, a.values)
# SOLVED {'theta_deg': 21.6804560949, 'two_theta_deg': 43.3609121898}
a = materials_science.ask(
"Critical crack length: K_IC = 55 MPa*m^0.5, sigma = 1000 MPa"
)
print(a.outcome, a.values)
# SOLVED {'a_c': 0.000962887405706, 'a_c_mm': 0.962887405706}
a = materials_science.ask(
"Offset yield strength: strain = [0, 0.002, 0.004, 0.006, 0.008], "
"stress = [0, 400, 520, 560, 580], E = 200 GPa"
)
print(a.outcome, a.values)
# SOLVED {'yield_MPa': 533.333333333, 'yield_strain': 0.00466666666667}
a = materials_science.ask(
"Atomic percent to weight percent: element1 = Al, element2 = Cu, "
"at1 = 90"
)
print(a.outcome, a.values)
# SOLVED {'wt1': 79.2590796884, 'wt2': 20.7409203116}
a = materials_science.ask(
"Copolymer degree of polymerization: formula1 = C4H6, formula2 = "
"C8H8, f1 = 0.75, Mn = 350000 g/mol"
)
print(a.outcome, a.values)
# SOLVED {'m_avg_g_mol': 66.60511, 'DP': 5254.85206766}
a = materials_science.ask(
"Wiedemann-Franz: T = 300 K, sigma = 5.96e7 S/m"
)
print(a.outcome, a.values)
# SOLVED {'kappa': 436.809206222, 'lorenz': 2.44300450907e-08}
a = materials_science.ask(
"Angle between lattice directions: a = 0.3 nm, b = 0.3 nm, c = 0.5 "
"nm, alpha = 90, beta = 90, gamma = 120, u1 = 1, v1 = 0, w1 = 0, "
"u2 = 0, v2 = 1, w2 = 0"
)
print(a.outcome, a.values)
# SOLVED {'angle_deg': 120.0}
a = materials_science.ask(
"Weibull design stress: P_failure = 0.001, sigma0 = 400 MPa, m = "
"10"
)
print(a.outcome, a.values)
# SOLVED {'sigma': 200484921.625, 'sigma_MPa': 200.484921625}
a = materials_science.ask(
"Gibbs phase rule: C = 2, P = 3, pressure = constant"
)
print(a.outcome, a.values)
# SOLVED {'F': 0}
a = materials_science.ask(
"Linear thermal expansion: alpha = 17e-6 1/K, L0 = 0.5 m, dT = 100 "
"K"
)
print(a.outcome, a.values)
# SOLVED {'dL': 0.00085, 'dL_mm': 0.85, 'L': 0.50085, 'strain': 0.0017}
a = materials_science.ask(
"Angle between planes: a = 0.4 nm, b = 0.4 nm, c = 0.4 nm, alpha = "
"90, beta = 90, gamma = 90, h1 = 1, k1 = 1, l1 = 1, h2 = 1, k2 = "
"1, l2 = -1"
)
print(a.outcome, a.values)
# SOLVED {'angle_deg': 70.5287793655}
a = materials_science.ask(
"Allowed reflections: structure = FCC, count = 6"
)
print(a.outcome, a.values)
# SOLVED {'N_values': [3, 4, 8, 11, 12, 16], 'N_last': 16, 'N_first': 3}
Command line: 15 examples
Each command below was run with materials-science of this release; the lines under it are the answer it printed (the full answer goes on with the method, every input in SI units and the conditions it assumes).
$ materials-science solve radius_ratio_coordination "rc=0.102 nm" "ra=0.181 nm"
ratio = 0.5635359116
CN = 6
geometry = octahedral
$ materials-science solve critical_fiber_length "sigma_f=3.5 GPa" "d=10 um" "tau_c=20 MPa"
lc = 0.000875 m
lc_mm = 0.875
aspect_ratio = 87.5
$ materials-science solve angle_between_directions_cubic u1=1 v1=0 w1=0 u2=1 v2=1 w2=1
angle_deg = 54.73561032
$ materials-science solve burgers_vector structure=FCC "a=0.3615 nm"
b = 2.556191014e-10 m
b_nm = 0.2556191014
direction = a/2<110>
$ materials-science solve bragg_angle "d=0.2087 nm" "lam=0.1542 nm"
theta_deg = 21.68045609
two_theta_deg = 43.36091219
$ materials-science solve diffusion_arrhenius_fit "T=[773, 873]" "D=[5.8e-13, 5.3e-12]"
Q = 124136.1426 J/mol
Q_kJmol = 124.1361426
D0 = 0.0001417848903 m^2/s
log10_D0 = -3.848370049
r_squared = 1
$ materials-science solve band_gap_from_conductivity "T=[300, 400]" "sigma=[2.2, 63]"
Eg_eV = 0.6938009484
prefactor = 1479429.095
r_squared = 1
$ materials-science solve critical_crack_length "K_IC=55 MPa*m^0.5" "sigma=1000 MPa"
a_c = 0.0009628874057 m
a_c_mm = 0.9628874057
$ materials-science solve offset_yield_strength "strain=[0, 0.002, 0.004, 0.006, 0.008]" "stress=[0, 400, 520, 560, 580]" "E=200 GPa"
yield_MPa = 533.3333333
yield_strain = 0.004666666667
$ materials-science solve atomic_to_weight_percent element1=Al element2=Cu at1=90
wt1 = 79.25907969
wt2 = 20.74092031
$ materials-science solve avrami_kinetics "t=[50, 100]" "y=[0.2, 0.8]"
n = 2.850512903
k = 3.203674769e-06
log10_k = -5.494351579
t_half = 74.41407874
r_squared = 1
$ materials-science solve copolymer_degree_of_polymerization formula1=C4H6 formula2=C8H8 f1=0.75 "Mn=350000 g/mol"
m_avg_g_mol = 66.60511
DP = 5254.852068
$ materials-science solve wiedemann_franz "T=300 K" "sigma=59600000 S/m"
kappa = 436.8092062 W/(m*K)
lorenz = 2.443004509e-08
$ materials-science solve ceramic_density prototype=rocksalt "rc=0.102 nm" "ra=0.181 nm" "Ac=22.99 g/mol" "Aa=35.45 g/mol"
a = 5.66e-10 m
a_nm = 0.566
rho = 2140.769963 kg/m^3
rho_gcc = 2.140769963
$ materials-science solve composite_rule_of_mixtures "Ef=69 GPa" "Em=3.4 GPa" Vf=0.4
E_long_GPa = 29.64
E_trans_GPa = 5.486435921
fiber_load_fraction = 0.9311740891
E_long = 2.964e+10 Pa
E_trans = 5486435921 Pa
Guides
- Desktop app guide: the window, every calculation, scenes and charts: PDF · HTML · Markdown
- Python guide: every calculation with a Python example: PDF · HTML · Markdown
- Command-line guide: every calculation with the command and what it printed: PDF · HTML · Markdown
Every calculation, with its formula, a worked example and its figures: Materials Science on ai999x.com. Install guides for the app and the command line: https://www.ai999x.com/desktop-cli/.
Version 1.6.7 · License: Apache-2.0 · Author: Ibnul Jaif Farabi · Organization: AI999X · Contact: support@ai999x.com · Support the project
The Future Is Self-Improving.













