Derivation and Conversion of Planck-Einstein Terms

Start with a generalized Helmholtz energy from $$\alpha^0 = a_k\log\left[c_k + d_k\exp\left(\frac{b_k\tau}{T_c}\right)\right]$$

The ideal-gas specific heat can be obtained from $$\frac{c_p^0}{R} = -\tau^2\alpha^0_{\tau\tau}$$

After some math shown below (and some manual grouping): $$\frac{c_p^0}{R} = - \frac{a_{k} (b_{k}\tau/T_c)^{2} c_k d_{k} e^{\frac{b_{k} \tau}{T_{c}}}}{ \left(c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right)^2} $$

Two important identities: $$ \left(\frac{1}{\cosh x}\right) = \frac{2e^{-x}}{1+e^{-2x}}$$ $$ \left(\frac{1}{\sinh x}\right) = \frac{2e^{-x}}{1-e^{-2x}}$$ which yield $$ \left(\frac{x}{\cosh x}\right)^2 = \frac{4x^2e^{-2x}}{(1+e^{-2x})^2} = \frac{(-2x)^2e^{-2x}}{(1+e^{-2x})^2}$$ $$ \left(\frac{x}{\sinh x}\right)^2 = \frac{4x^2e^{-2x}}{(1-e^{-2x})^2} = \frac{(-2x)^2e^{-2x}}{(1-e^{-2x})^2}$$


In [4]:
from __future__ import division
from sympy import *
init_session(quiet=True)
init_printing()


IPython console for SymPy 0.7.5 (Python 2.7.2-32-bit) (ground types: python)

In [16]:
a_k,b_k,c_k,d_k,tau,T_c = symbols('a_k,b_k,c_k,d_k,tau,T_c',real=True)
alpha0 = a_k*log(c_k + d_k*exp(b_k*tau/T_c))
print 'No derivatives'
display(alpha0)
print 'First partial w.r.t. tau'
display(diff(alpha0, tau, 1).simplify())
print 'Second partial w.r.t. tau'
display(diff(alpha0, tau, 2).simplify())
print latex(diff(alpha0, tau, 2).simplify()*(-tau**2))
print 'Third partial w.r.t. tau'
display(diff(alpha0, tau, 3).simplify())


No derivatives
$$a_{k} \log{\left (c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}} \right )}$$
First partial w.r.t. tau
$$\frac{a_{k} b_{k} d_{k} e^{\frac{b_{k} \tau}{T_{c}}}}{T_{c} \left(c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right)}$$
Second partial w.r.t. tau
$$\frac{a_{k} b_{k}^{2} c_{k} d_{k} e^{\frac{b_{k} \tau}{T_{c}}}}{T_{c}^{2} \left(c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right)^{2}}$$
- \frac{a_{k} b_{k}^{2} c_{k} d_{k} \tau^{2} e^{\frac{b_{k} \tau}{T_{c}}}}{T_{c}^{2} \left(c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right)^{2}}
Third partial w.r.t. tau
$$\frac{a_{k} b_{k}^{3} c_{k} d_{k} \left(c_{k} - d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right) e^{\frac{b_{k} \tau}{T_{c}}}}{T_{c}^{3} \left(c_{k}^{3} + 3 c_{k}^{2} d_{k} e^{\frac{b_{k} \tau}{T_{c}}} + 3 c_{k} d_{k}^{2} e^{\frac{2 b_{k}}{T_{c}} \tau} + d_{k}^{3} e^{\frac{3 b_{k}}{T_{c}} \tau}\right)}$$

Aly-Lee starts as $$\frac{c_p^0}{R_u} = A + B\left(\frac{C/T}{\sinh(C/T)}\right)^2 + D\left(\frac{E/T}{\cosh(E/T)}\right)^2$$ and generalized Plank-Einstein term is given by $$\frac{c_p^0}{R_u} = - \frac{a_{k} b_{k}^{2} c_{k} d_{k} \tau^{2} e^{\frac{b_{k} \tau}{T_{c}}}}{T_{c}^{2} \left(c_{k} + d_{k} e^{\frac{b_{k} \tau}{T_{c}}}\right)^{2}}$$

Constant is separated out, and handled separately. sinh part can be expanded as $$B\left(\frac{C/T}{\sinh(C/T)}\right)^2 = \frac{B(-2C/T)^2\exp(-2C/T)}{(1-\exp(-2C/T))^2}$$ where $$a_k = B$$ $$b_k = -2C$$ $$c_k = 1$$ $$d_k = -1$$

cosh part can be expanded as $$D\left(\frac{E/T}{\cosh(E/T)}\right)^2 = \frac{D(-2E/T)^2\exp(-2E/T)}{(1+\exp(-2E/T))^2}$$ where $$a_k = -D$$ $$b_k = -2E$$ $$c_k = 1$$ $$d_k = 1$$


In [10]:
B, D, T = symbols('B, D, T', real = True, positive = True)
# From Aly-Lee:
term1 = ((D/T)/sinh(D/T))**2
# Planck Einstein
term2 = (B/T)**2*exp(B/T)/(exp(B/T)-1)**2
diff1 = term2 - term1
display(diff1.rewrite(exp).subs(B, 2*D).simplify())
term2 = (2*D/T)**2*exp(2*D/T)/(exp(2*D/T)-1)**2
display(term2)
print 'which is the same as the Aly-Lee sinh term with a_k = C, b_k = 2*D, c_k = -1, d_k = 1'

B, F, T = symbols('B, F, T', real = True, positive = True)
# From Aly-Lee:
term1 = ((F/T)/cosh(F/T))**2
# Planck Einstein
term2 = (B/T)**2*exp(-B/T)/(exp(-B/T)+1)**2
diff2 = term2 - term1
display(diff2.rewrite(exp).subs(B, 2*F).simplify())
# So Aly-Lee cosh term can be directly converted to Plank-Einstein2 term with b_k = 2*F, and c=1


$$0$$
$$\frac{4 D^{2} e^{\frac{2 D}{T}}}{T^{2} \left(e^{\frac{2 D}{T}} - 1\right)^{2}}$$
which is the same as the Aly-Lee sinh term with b_k = 2*D
$$0$$