Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global ko1,ko2,ko3,ko4,dH,dS,da,k1,k2,k3,db,dc,dcc,t,kk,dG,u0,u1,u2,u3,dgt,kp
- procedure main()
- k1:=1e-3
- k2:=1e-6
- k3:=1e5
- write("-- Termohim v 1.0 --")
- write("Write your koefficient sequentally...")
- write("\n\n")
- write(" -- Koefficient -- ")
- ko1:=read()
- ko2:=read()
- ko3:=read()
- ko4:=read()
- write("\n")
- write(" -- Entalpy -- ")
- dH:=delta()
- write("delta H = ",dH,"\n")
- write(" -- Entropy -- ")
- dS:=delta()
- write("delta S = ",dS,"\n")
- write(" -- a -- ")
- da:=delta()
- write("delta a = ",da,"\n")
- write(" -- b -- ")
- db:=delta()*k1
- write("delta b = ",db,"\n")
- write(" -- c -- ")
- dc:=delta()*k2
- write("delta c = ",dc,"\n")
- write(" -- c strike -- ")
- dcc:=delta()*k3
- write("delta c strike = ",dcc,"\n")
- write(" -- Temperature -- ")
- t:=read()
- write("\n")
- write(" -- dH,where T = ",t," --")
- kk:=kirhgoff()
- write("delta H = ",kk,"\n")
- write(" -- Gibbs energy --")
- dG:=gibbs()
- write("delta G = ",dG,"\n")
- write(" -- Temkin-Shwarcman method -- ")
- u0:=read()
- u1:=read()
- u2:=read()
- u3:=read()
- dgt:=temkin()
- write("delta G = ",dgt,"\n")
- write("-- Kp -- ")
- kp:=balance()
- write("Kp = ",kp," \n")
- delay(100000)
- end
- procedure delta()
- w:=read()
- x:=read()
- y:=read()
- z:=read()
- return ((ko3*y)+(ko4*z))-((ko1*w)+(ko2*x))
- end
- procedure kirhgoff()
- local q1,q2,q3,q4,q5
- q1:=dH*1000
- q2:=da*(t-298.0)
- q3:=(db/2.0)*((t^2)-(298^2))
- q4:=(dc/3.0)*((t^3)-(298^3))
- q5:=dcc*((1.0/t)-(1.0/298.0))
- return (q1+q2+q3+q4-q5)/1000
- end
- procedure gibbs()
- return (dH*1000)-(298*dS)
- end
- procedure temkin()
- return (dH*1000)-(t*dS)-t*(u0*da+u1*db+u2*dc+u3*dcc)
- end
- procedure balance()
- return exp(dgt/(-8.314*t))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement