VII. Applications: sciences, economics and optimization

47. Chemistry

Chemistry calculations are in the "Applications" section of the home screen, the Chemistry field: balancing a chemical equation, the pH of an acid, a base, a salt or a polyprotic acid, a buffer, a titration with its curve, the Arrhenius equation and the Beer–Lambert law. In the form you choose the problem and the quantity sought and fill in the values with their units; the "?" icon explains where the formula comes from. Small constants can be typed as 1.8e-5 or 1,8·10^-5, measured values (a table of temperatures, a calibration) as numbers separated by spaces.

A chemical equation can simply be typed into the manual input, e.g. Fe + O2 -> Fe2O3 (the arrow -> or =, an equilibrium <=>), also with ions MnO4^- and Fe^3+, brackets Ca(OH)2, hydrates CuSO4·5H2O and states (aq). The coefficients are the kernel of the matrix of the elements' (and the charge's) balance: the steps write the balance equations, the matrix, its reduced form by Gaussian elimination, the free coefficient as a parameter and the smallest whole numbers, then a check. It also recognizes an equation that can't be balanced (an element on one side only, a substance on the wrong side) or whose balance isn't unique.

The pH is computed exactly (for a weak acid by a quadratic equation), with the school simplification and the degree of dissociation alongside; for a polyprotic acid the charge balance is solved numerically and the graph shows the shares of the acid's forms against pH. For a buffer with a strong acid or base added it computes the new equilibrium and the change of pH. A titration gets its pH by the region of the curve (the start, the buffer region, the equivalence point, the excess titrant) and the graph shows the whole titration curve. The Arrhenius equation from two measurements or from a table by the regression of ln k against 1/T; the Beer–Lambert law from a known ε, a standard or a calibration line.

Examples

Balancing the oxidation of hydrochloric acid by permanganate.
Input: KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2
KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2
KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2KMnO4 + HCl -> KCl + MnCl2 + H2O + Cl2
An ionic redox equation with the charge balance.
Input: MnO4^- + Fe^2+ + H^+ -> Mn^2+ + Fe^3+ + H2O
MnO4^- + Fe^2+ + H^+ -> Mn^2+ + Fe^3+ + H2O
MnO4^- + Fe^2+ + H^+ -> Mn^2+ + Fe^3+ + H2OMnO4^- + Fe^2+ + H^+ -> Mn^2+ + Fe^3+ + H2O
pH of 0.1 M acetic acid (Kₐ = 1.8·10⁻⁵).
Input: model(ph; find=pH[one]; c=0.1[mol_l]; K=1.8e-5[one]; kind=weakAcid; constant=K)
model(ph; find=pH[one]; c=0.1[mol_l]; K=1.8e-5[one]; kind=weakAcid; constant=K)
model(ph; find=pH[one]; c=0.1[mol_l]; K=1.8e-5[one]; kind=weakAcid; constant=K)model(ph; find=pH[one]; c=0.1[mol_l]; K=1.8e-5[one]; kind=weakAcid; constant=K)
pH of 0.1 M phosphoric acid and the shares of its forms.
Input: model(ph; find=pH[one]; c=0.1[mol_l]; K1=7.5e-3[one]; K2=6.2e-8[one]; K3=4.8e-13[one]; kind=polyprotic; constant=K)
model(ph; find=pH[one]; c=0.1[mol_l]; K1=7.5e-3[one]; K2=6.2e-8[one]; K3=4.8e-13[one]; kind=polyprotic; constant=K)
model(ph; find=pH[one]; c=0.1[mol_l]; K1=7.5e-3[one]; K2=6.2e-8[one]; K3=4.8e-13[one]; kind=polyprotic; constant=K)model(ph; find=pH[one]; c=0.1[mol_l]; K1=7.5e-3[one]; K2=6.2e-8[one]; K3=4.8e-13[one]; kind=polyprotic; constant=K)
An acetate buffer after adding 1 mmol of a strong acid.
Input: model(buffer; find=pH[one]; pK=4.74[one]; ca=0.1[mol_l]; cs=0.1[mol_l]; V=100[ml]; n=1[mmol]; kind=acidic; constant=pK; add=acid)
model(buffer; find=pH[one]; pK=4.74[one]; ca=0.1[mol_l]; cs=0.1[mol_l]; V=100[ml]; n=1[mmol]; kind=acidic; constant=pK; add=acid)
model(buffer; find=pH[one]; pK=4.74[one]; ca=0.1[mol_l]; cs=0.1[mol_l]; V=100[ml]; n=1[mmol]; kind=acidic; constant=pK; add=acid)model(buffer; find=pH[one]; pK=4.74[one]; ca=0.1[mol_l]; cs=0.1[mol_l]; V=100[ml]; n=1[mmol]; kind=acidic; constant=pK; add=acid)
Titration of acetic acid with sodium hydroxide – the equivalence point.
Input: model(titration; find=pH[one]; ca=0.1[mol_l]; Va=25[ml]; ct=0.1[mol_l]; K=1.8e-5[one]; Vt=25[ml]; kind=weakAcid; constant=K)
model(titration; find=pH[one]; ca=0.1[mol_l]; Va=25[ml]; ct=0.1[mol_l]; K=1.8e-5[one]; Vt=25[ml]; kind=weakAcid; constant=K)
model(titration; find=pH[one]; ca=0.1[mol_l]; Va=25[ml]; ct=0.1[mol_l]; K=1.8e-5[one]; Vt=25[ml]; kind=weakAcid; constant=K)model(titration; find=pH[one]; ca=0.1[mol_l]; Va=25[ml]; ct=0.1[mol_l]; K=1.8e-5[one]; Vt=25[ml]; kind=weakAcid; constant=K)
Activation energy from a table of rate constants.
Input: model(arrhenius; find=Ea[kJ_mol]; TT=25 35 45 55[degC]; kk=0.001 0.0021 0.0042 0.0079[per_s]; input=table)
model(arrhenius; find=Ea[kJ_mol]; TT=25 35 45 55[degC]; kk=0.001 0.0021 0.0042 0.0079[per_s]; input=table)
model(arrhenius; find=Ea[kJ_mol]; TT=25 35 45 55[degC]; kk=0.001 0.0021 0.0042 0.0079[per_s]; input=table)model(arrhenius; find=Ea[kJ_mol]; TT=25 35 45 55[degC]; kk=0.001 0.0021 0.0042 0.0079[per_s]; input=table)
A sample's concentration from a calibration line.
Input: model(beer; find=c[mmol_l]; cc=0 0.1 0.2 0.3 0.4[mmol_l]; AA=0.002 0.151 0.299 0.452 0.598[one]; A=0.25[one]; input=calibration; measure=absorbance)
model(beer; find=c[mmol_l]; cc=0 0.1 0.2 0.3 0.4[mmol_l]; AA=0.002 0.151 0.299 0.452 0.598[one]; A=0.25[one]; input=calibration; measure=absorbance)
model(beer; find=c[mmol_l]; cc=0 0.1 0.2 0.3 0.4[mmol_l]; AA=0.002 0.151 0.299 0.452 0.598[one]; A=0.25[one]; input=calibration; measure=absorbance)model(beer; find=c[mmol_l]; cc=0 0.1 0.2 0.3 0.4[mmol_l]; AA=0.002 0.151 0.299 0.452 0.598[one]; A=0.25[one]; input=calibration; measure=absorbance)
Carburizing steel – the time for 0.8 % carbon at the depth of 0.5 mm.
Input: model(diffusion; find=t[h]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; cx=0.8[pct]; x=0.5[mm]; process=carburizing)
model(diffusion; find=t[h]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; cx=0.8[pct]; x=0.5[mm]; process=carburizing)
model(diffusion; find=t[h]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; cx=0.8[pct]; x=0.5[mm]; process=carburizing)model(diffusion; find=t[h]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; cx=0.8[pct]; x=0.5[mm]; process=carburizing)
The carbon concentration at the depth of 0.5 mm after 7 hours.
Input: model(diffusion; find=c[pct]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; x=0.5[mm]; t=7[h]; process=carburizing)
model(diffusion; find=c[pct]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; x=0.5[mm]; t=7[h]; process=carburizing)
model(diffusion; find=c[pct]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; x=0.5[mm]; t=7[h]; process=carburizing)model(diffusion; find=c[pct]; D=1.6e-11[m2_s]; cs=1.2[pct]; c0=0.25[pct]; x=0.5[mm]; t=7[h]; process=carburizing)

Known limitations