<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 12/07/2011 07:16 PM, Hunter.L.Taylor wrote:
<blockquote
cite="mid:CA765D0D95A04D449667AFA14377899C4FF15621CE@MERCERMAIL.MercerU.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="GENERATOR" content="MSHTML 9.00.8112.16437">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0,
0); font-size: 10pt;">
<p>Dr. Pounds,</p>
<p> </p>
<p> 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.</p>
</div>
</blockquote>
<br>
When I wrote the code I didn't want to have a variable called
g_over_v_H2 and<br>
q_over_v_H. I could have written the lines<br>
<br>
<br>
<tt>q_H2 = qoverv_diatomic( m_H2, theta_v_H2, theta_r_H2, <br>
g0_H2, D0_H2, sigma_H2, k, h, T );</tt><br>
<br>
and<br>
<br>
<tt>q_H = qoverv_atomic( m_H, g0_H, k, h, T);</tt><br>
<br>
with <br>
<br>
<tt>q_over_v_H = qoverv_diatomic( m_H2, theta_v_H2, theta_r_H2, <br>
g0_H2, D0_H2, sigma_H2, k, h, T );</tt><br>
<br>
and<br>
<br>
<tt>q_over_H = qoverv_atomic( m_H, g0_H, k, h, T);</tt><br>
<br>
If you are doing the equilibrium constant calculations you will be
evaluating q/V as described on pages 594-596 of your text.<br>
<br>
<br>
<blockquote
cite="mid:CA765D0D95A04D449667AFA14377899C4FF15621CE@MERCERMAIL.MercerU.local"
type="cite">
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0,
0); font-size: 10pt;">
<p> 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.</p>
<p> </p>
<p>--Hunter Taylor </p>
</div>
</blockquote>
<br>
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<br>
<br>
<tt> q = pow(2.0*pi*m*k*T/(h*h),1.5); // Translational<br>
q = q * T / (theta_r * sigma ); // Rotational<br>
q = q / (1.0 - exp(-theta_v/T) ); // Vibrational<br>
q = q * g0 * exp(D0/(k*T)); // Electronic</tt><br>
<br>
are obviously calculating q/V for a diatomic (see equation 16.90 in
your text). I could have written it like this...<br>
<br>
<tt>q_over_v </tt>= <tt>pow(2.0*pi*m*k*T/(h*h),1.5) * </tt><tt>T
/ (theta_r * sigma ) </tt><tt>/ (1.0 - exp(-theta_v/T) ) * </tt><tt>g0
* exp(D0/(k*T));</tt><tt> <br>
<br>
</tt>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.)<br>
<br>
As an example look at the following piece of code <br>
<br>
q = 1 (q equals one after this)<br>
q = q * 2 (after the assignment q would equal 2)<br>
q = q * 3 (after the assignment q would equal 6)<br>
<br>
Hope that helps.<br>
<tt><br>
<br>
<br>
<br>
</tt>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds@theochem.mercer.edu">pounds@theochem.mercer.edu</a>)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
</pre>
</body>
</html>