Лабораторная работа 1.17, Крикун Д.

Units

meter:1$
mm: meter/1000$
um: meter/10^6$
s:1$
kg:1$
gm:kg/1000$
g:9.81*meter/s^2$
Newton:kg*meter/s^2$
Pa: Newton / meter^2$
MPa: 10^6 * Pa$
GPa: 10^9 * Pa$

Functions

f_err_sigma(D,DD, m, Dm):= 2*DD/D + Dm/m;

f_err_epsilon(dl, Ddl):= Ddl / dl;

Constant data

l: 1.986*meter$
D: 6.2*10^-4*meter$
DD: 1* 10^-5 * meter$
Dm: 100*gm$
Ddl: 30*um$
S: %pi * ''D^2 / 4$

Experimental data

Nmeas: 4$ s1: zeromatrix(Nmeas,6)$

fpprintprec: 3$

m, dl/l=epsilon, F, sigma, abs_err_sigma, abs_err_epsilon

s1[1]: [0.5*kg, 175*um/''l, 0,0,0,0]$
s1[2]: [1.*kg, 335*um/''l, 0,0,0,0]$
s1[3]: [1.5*kg, 495*um/''l, 0,0,0,0]$
s1[4]: [2*kg, 655*um/''l, 0,0,0,0]$
for i: 1  thru Nmeas do (
  s1[i][3]: s1[i][1] * g,
  s1[i][4]: s1[i][3] / ''S,
  s1[i][5]: s1[i][4] * f_err_sigma(''D, ''DD, s1[i][1], ''Dm),
  s1[i][6]: s1[i][2] * f_err_epsilon(s1[i][2], ''Ddl)
)$ float(s1);

Calculation of E

sigma_vs_eps: col(s1,2)$
sigma_vs_eps: addcol(sigma_vs_eps, col(s1,4))$
est_results: lsquares_estimates(sigma_vs_eps,
   ['x,y], y=_E*'x+_syserr, [_E,_syserr])$
E: _E, est_results$ syserr: _syserr, est_results$
f_sigma(epsilon):= E * epsilon + syserr$
f_sigma_dim(epsilon):= (E * epsilon * 10^-4 + syserr) / MPa$
float(E / GPa);

float(syserr / GPa);

Drawings

epsilon, sigma, abs_err_sigma, abs_err_epsilon

s2: submatrix(s1,1,3)$
for i: 1 thru Nmeas do(
  sigma:   float(s2[i][2]),
  epsilon: float(s2[i][1]),
  ae_sigma: s2[i][3],
  ae_epsilon: s2[i][4],
  s2[i][1]: epsilon / 10^-4,
  s2[i][2]: sigma / MPa,
  s2[i][3]: ae_epsilon / 10^-4,
  s2[i][4]: ae_sigma / MPa
)$ float(s2);
data1:maplist(copy,s2)$

epsilon / 10^-4, sigma / MPa, ae_epsilon / 10^-4, ae_sigma / MPa

wxdraw2d(
grid=true,
xlabel="epsilon / 10^-4",
ylabel="sigma / MPa",
explicit(f_sigma_dim('x),'x, 0, 4),
error_type=xy,
errors(data1));