> |
restart;#'therm_subs.mws' |
Available data for substances are grouped in 5 tables: gas_data, liq_data, sol_data, cp(T)_data and pv(T)_data, stored in ASCII files gas.asc, liq.asc, sol.asc, cp.asc, and pv.asc. Below are some examples of use.
> |
read`../therm_const.m`:read`../therm_proc.m`:with(therm_proc): |
Gas data:
> |
su:="H2O";dat1:=get_gas_data(su); |
Liquid data:
Solid data:
> |
get_sol_data(su);get_sol_data("Hielo"); |
Gas data:
> |
dat2:=get_gas_data("Aire"); |
cp(T) and pv(T) data:
> |
cp:=get_cp_data(su);c[p,300]:=subs(T=300*K_,cp):'c[p,300]'=evalf(%,2);get_pv_data(su);p[v,300]:=pv(300*K_):'p[v,300]'=evalf(%,2); |
Notice the different approach for coding cp(T) and pv(T).
Example of use: density of an ideal gas:
> |
eqrho:=rho=p/(R*T);p:=1e5*Pa_;T:=300*K_;eqrhoAir_:=subs(dat2,SI2,eqrho);eqrhoSteam_:=subs(dat1,SI2,eqrho); |