Getting the minimum of the Gibbs Energy Function

5 views
Skip to first unread message

WNien

unread,
Sep 2, 2007, 5:00:57 AM9/2/07
to thermodynamicslib
Hallo Evgenii,

Currently I am doing a project with the use of your Computational
Thermodynamics Library (TDLIB). I want to use it to model the Gibb's
energy for the reaction of Ammonia-Synthesis. This model is based on
your examples(ref1.mod and out.mod) in the directory 'tdlib/ex/phase/
simple'. But while doing this, I have encountered a problem: There is
no minimum in the values of the Gibbs energy as I have expected. When
I plot the datas (Gibbs energy as ordinate and x(NH3) as abscissa), I
only got a straight line, not a curve with a minimum point. Would you
kindly please have a look at the changes I have made:

<SimpleSolution class=phase id=test>
<components> _H2 _N2 _NH3 </components>
<Reference class=FuncTpx>
<func_x> +x(_H2)* </func_x>
<species> _H2
<complex_Tp class=func_Tp>
(
<IVT_Tp class=func_Tp>
(
<coef> -9861.391 </coef> +
<coef> -3.411886 </coef> *T+
<coef> -29.659 </coef> *T*log(T)+
<coef> -.00306831 </coef> *T^2+
<coef> 1.97754e-07 </coef> *T^3+
<coef> -7.98167e-12 </coef> *T^4+
<coef> 109831.5 </coef> /T)
</IVT_Tp>
+
<ideal_gas class=func_Tp>
(R*T*log(p))
</ideal_gas>
)
</complex_Tp>
</species>
<func_x> +x(_N2)* </func_x>
<species> _N2
<complex_Tp class=func_Tp>
(
<IVT_Tp class=func_Tp>
(
<coef> -7989.23 </coef> +
<coef> -14.690849 </coef> *T+
<coef> -26.092 </coef> *T*log(T)+
<coef> -0.004109401 </coef> *T^2+
<coef> 3.29357e-7 </coef> *T^3+
<coef> -1.32728e-11 </coef> *T^4+
<coef> -22217 </coef> /T)
</IVT_Tp>
+
<ideal_gas class=func_Tp>
(R*T*log(p))
</ideal_gas>
)
</complex_Tp>
</species>
<func_x> +x(_NH3)* </func_x>
<species> _NH3
<complex_Tp class=func_Tp>
(
<IVT_Tp class=func_Tp>
(
<coef> -7408.61 </coef> +
<coef> -45.738551 </coef> *T+
<coef> -19.99563 </coef> *T*log(T)+
<coef> -0.024885595 </coef> *T^2+
<coef> 2.56267e-6 </coef> *T^3+
<coef> -1.60097e-10 </coef> *T^4+
<coef> -94587 </coef> /T)
</IVT_Tp>
+
<ideal_gas class=func_Tp>
(R*T*log(p))
</ideal_gas>
)
</complex_Tp>
</species>
</Reference>
</SimpleSolution>

Perhaps I have made some mistakes and I would really appreciate it, if
you would help me out by pointing out my mistakes.

Thank you very much. Hope to hear from you soon.


Wee Nien

Evgenii Rudnyi

unread,
Sep 2, 2007, 7:09:55 AM9/2/07
to thermody...@googlegroups.com
Hello Wee Nien,

Thanks for interest to TDLIB.

> But while doing this, I have encountered a problem: There is no
minimum in the values of the Gibbs energy as I have expected.

Yes, you have not defined the Gibbs energy of mixing. Please find the
modified model below. The difference is <IdealMixing></IdealMixing> at
the end.

I will write formulas for two components for simplicity to show this.
Let us take solution A-B. Then its molar Gibbs energy can be modeled as

xA + xB = 1

G(T, P, xB) = G_ref(T, P, xB) + G_mix(xB)

The first component is modeled by Reference element and it is just a plane:

G_ref = xA*GA(T, P) + xB*GB(T, P)

It does not have minimums as you have observed. It is just a mixture of
pure components at given T and P. When components form a solution, then
G_mix < 0. Actually G_mix can also depend on T and P but for an ideal
solution it is written as follows for any given P and T

G_mix = RT xA ln xA + RT xB ln xB

and IdealMixing element models it.

There is an object associated solution and you can use to compute an
equilibrium composition for you. I will show how to use later. Let us do
it step by step.

Best wishes,

Evgenii

<IdealMixing>
</IdealMixing>
</SimpleSolution>

Reply all
Reply to author
Forward
0 new messages