[CHM 331] Re: partition functions issue
Andrew J. Pounds
pounds_aj at mercer.edu
Wed Dec 7 23:00:13 EST 2011
On 12/07/2011 07:16 PM, Hunter.L.Taylor wrote:
>
> Dr. Pounds,
>
> In the textbook it says that the translational partition function
> includes a V term (volume). However, the partition functions that you
> gave us in the sheet of code in class today said that the
> translational partition function was evaluated at q/v, which negates
> the use of a volume term.
>
When I wrote the code I didn't want to have a variable called
g_over_v_H2 and
q_over_v_H. I could have written the lines
q_H2 = qoverv_diatomic( m_H2, theta_v_H2, theta_r_H2,
g0_H2, D0_H2, sigma_H2, k, h, T );
and
q_H = qoverv_atomic( m_H, g0_H, k, h, T);
with
q_over_v_H = qoverv_diatomic( m_H2, theta_v_H2, theta_r_H2,
g0_H2, D0_H2, sigma_H2, k, h, T );
and
q_over_H = qoverv_atomic( m_H, g0_H, k, h, T);
If you are doing the equilibrium constant calculations you will be
evaluating q/V as described on pages 594-596 of your text.
> If you could tell me which version is correct it would be greatly
> appreciated. Also, in the sheet of code for 16G, the partition
> functions all start using the term q, does this always refer to the
> translational partition function, or does it indicate the partition
> function calculated just before the current one? (since each of the
> equations begins either q=q*.... or q=q/....) Any insight you could
> give would be appreciated.
>
> --Hunter Taylor
>
Okay -- so it's now clear to me that some of you have never done any
type of programming before... Here's the deal -- the set of expressions
q = pow(2.0*pi*m*k*T/(h*h),1.5); // Translational
q = q * T / (theta_r * sigma ); // Rotational
q = q / (1.0 - exp(-theta_v/T) ); // Vibrational
q = q * g0 * exp(D0/(k*T)); // Electronic
are obviously calculating q/V for a diatomic (see equation 16.90 in your
text). I could have written it like this...
q_over_v = pow(2.0*pi*m*k*T/(h*h),1.5) * T / (theta_r * sigma ) / (1.0 -
exp(-theta_v/T) ) * g0 * exp(D0/(k*T));
However, to make it MUCH easier to read and check for errors I broke it
into pieces. The variable q in the four lines above (which I could have
named q_over_v -- but I just chose q here to save space) carries its
value from the previous line -- so it is exactly the same as the long
nasty equation. I did this to encourage you to write you equations
using a similar methodology (much easier to check for errors.)
As an example look at the following piece of code
q = 1 (q equals one after this)
q = q * 2 (after the assignment q would equal 2)
q = q * 3 (after the assignment q would equal 6)
Hope that helps.
--
Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://theochem.mercer.edu/pipermail/chm331/attachments/20111207/0e6eba3c/attachment.html
More information about the chm331
mailing list