|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2304 (0x900)
Types: TextFile
Names: »øv3«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦this⟧ »øv3«
calculation of water carbondioxide equilibrium
30 08 74 14 45 00
begin
real t,T,mCO,mH2O,mCO2,mH2,MCO,MH2O,,MH2,MIn,K,delta;
t:=readr(<:temperatur (C):>);
MC0:=readr(<:molprocent CO:>);
MH2O:=readr(<:molprocent H2O:>);
MCO2:=readr(<:molprocent CO2:>);
MH2:=readr(<:molprocent H2:>);
K:=exp((-0.768535428*ln(T)+(((1.47520303'-10*T-9.66051861'-7)
*t+3.01017929''-3)*T-1.50650387)*T+4.94327234'3)/T);
T:=t+273.16;
write(out,<:<10>Temperatur:>,<< dddd>,t,
<: grader celsius. Ligevægtskonstant K = :>
<<dddd'+dd>,K);
writeend;
T:=t+273.16;
MIn:=100-MCO-MH2O-MCO2-MH2;
mCO:=0,01*MCO;
mH2O:=0.01*MH2O
mCO2:=0.01*MCO2;
mH2=0.01*MH2;
delta:=(K*mCO*mH2O-mCO2:mH2)/(K*(mCO+mH2O)+mCO2+mH2;
ST:mCO:=mCO-delta;
mH2O:=mH2O-delta;
mCO2:=mCO2-delta;
mH2:=mH2+delta;
if abs delta> 0.000l then goto ST;
write(out,<:<10><10> Molprocent<10>:>,
<: Oprindelig Ligevægt<10<10>:>,
<:carbon monoxid >,<< dddddd.dd>,MCO,100*mCO,
<:<10>vand :>,MH2O,100*mH2O,
<:<10>carbon dioxid :>,MCO2,100*mCO2,
<:<10>hydrogen :>,MH2,100*mH2,
<:<10>inaktive :>,MIn,<:<10>:>);
opløselighed med ionstyrke
begin
real L,s,s1,I,lnL,f;
integer ip,in,lp,ln;
L:=readr(<:opl.produkt>);
OM:
lp:=readi(<:positiv ions ladning:>);
ln:=readi(<:negativ - -:>);
if ln<0 then ln:=-ln;
if lp<=0 or ln=0 then
begin
write(out,<:umulig ladning:>);
goto OM
end;
if ln mod lp:=0 then
begin
in:=1; ip:=ln//1p
end
else
if lp mod ln=0 then
begin
ip:=1; in:=lp//ln
end;
else
begin
ip:=ln; in:=lp;
write(out,<:sammensætning: P:>,ip,<: N:>,in);
lnL:=ln(L/ip**ip/in**in)/(ip+in);
f:=.509*ln10*(ip*lp*lp+in*ln*ln)/(ip+in);
s:-0;
L:
I:=.5*(lp**2*ip+ln**2*in)*s,
s1:=exp(lnL+f*sqrt(I));
if abs(s-s1)>.001*s then
begin
s:=s1;
goto L
end
write(out,<:10>opløselighed:>,s,<: mol/l:>)
end
▶EOF◀