[cig-commits] [commit] add_thermodynamic_potentials: Add partial derivatives of gibbs to modified tait (H, S, Cp) (1636455)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Dec 10 21:15:21 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : add_thermodynamic_potentials
Link       : https://github.com/geodynamics/burnman/compare/d52a15cda6a0bbf70dcf7a9a6fc6ecd733956739...16364559f0c2bd31629704786bfc9fb47bd7eb7d

>---------------------------------------------------------------

commit 16364559f0c2bd31629704786bfc9fb47bd7eb7d
Author: Bob Myhill <myhill.bob at gmail.com>
Date:   Wed Dec 10 21:14:14 2014 -0800

    Add partial derivatives of gibbs to modified tait (H, S, Cp)


>---------------------------------------------------------------

16364559f0c2bd31629704786bfc9fb47bd7eb7d
 burnman/mineral.py                    |  14 +++-
 burnman/modified_tait.py              | 147 ++++++++++++++++++++++++++++++----
 burnman/slb.py                        |  14 ++++
 perplex_output/fo50_HP2011_params.dat |   5 ++
 perplex_output/fo_HP2011_params.dat   |   7 ++
 perplex_output/fo_SLB2011_params.dat  |   7 ++
 test_derived_properties.py            |  81 +++++++++++++++++++
 7 files changed, 257 insertions(+), 18 deletions(-)

diff --git a/burnman/mineral.py b/burnman/mineral.py
index 0d1bb36..8d0067d 100644
--- a/burnman/mineral.py
+++ b/burnman/mineral.py
@@ -143,7 +143,14 @@ class Mineral(Material):
             self.helmholtz = self.method.helmholtz_free_energy(self.temperature, self.V, self.params)
         except (KeyError, NotImplementedError):
             self.helmholtz = float('nan')
-        
+        try:
+            self.S = self.method.entropy(self.pressure, self.temperature, self.params)
+        except (KeyError, NotImplementedError):
+            self.S = float('nan')
+        try:
+            self.H = self.method.enthalpy(self.pressure, self.temperature, self.params)
+        except (KeyError, NotImplementedError):
+            self.H = float('nan')
 
         if (self.params.has_key('G_0') and self.params.has_key('Gprime_0')):
             self.G = self.method.shear_modulus(self.pressure, self.temperature, self.V, self.params)
@@ -183,6 +190,11 @@ class Mineral(Material):
         Returns isothermal bulk modulus of the mineral [Pa]
         """
         return self.K_T
+    def compressibility(self):
+        """
+        Returns isothermal bulk modulus of the mineral [Pa]
+        """
+        return 1./self.K_T
     def adiabatic_bulk_modulus(self):
         """
         Returns adiabatic bulk modulus of the mineral [Pa]
diff --git a/burnman/modified_tait.py b/burnman/modified_tait.py
index aae91a0..0cfbc73 100644
--- a/burnman/modified_tait.py
+++ b/burnman/modified_tait.py
@@ -30,7 +30,7 @@ def tait_constants(params):
     c=(1. + params['Kprime_0'] + params['K_0']*params['Kdprime_0'])/(params['Kprime_0']*params['Kprime_0'] + params['Kprime_0'] - params['K_0']*params['Kdprime_0'])
     return a, b, c
 
-def gibbs_disord_Landau(P, T, params):
+def landau_ordering(P, T, params):
     # From Holland and Powell, 1996, corrected using
     # landaunote.pdf on Tim Holland's esc web page
     Tcstar=params['landau_Tc'] + (params['landau_Vmax']/params['landau_Smax'])*P
@@ -44,13 +44,45 @@ def gibbs_disord_Landau(P, T, params):
     else:
         Q=0.0
 
+    return Tcstar, Q_0, Q
+
+def gibbs_disorder_Landau(P, T, params):
+    # From Holland and Powell, 1996, corrected using
+    # landaunote.pdf on Tim Holland's esc web page
+    Tcstar, Q_0, Q = landau_ordering(P, T, params)
+        
     # Vt is defined as a "function shaping the excess volume of disordering" in landaunote.pdf.
     # A sensible function to use in this case would be the expression in brackets in  EQ13 of Holland and Powell (2011) 
     # Here we follow tc337L, where Vt=1 ("the simplest way to proceed"; Roger Powell, pers. comm. 2014/08/22). 
     Vt=1.# EQ 13 would give: 1. - a + (a*(pow((1.-b*Pth), 1.-c) - pow((1. + b*(pressure-Pth)), 1.-c))/(b*(c-1.)*pressure))
     Gdisord=params['landau_Tc']*params['landau_Smax']*(np.power(Q_0,2) - np.power(Q_0,6)/3.0) - params['landau_Smax']*(Tcstar*np.power(Q,2) - params['landau_Tc']*np.power(Q,6)/3.0) - T*(params['landau_Smax']*(np.power(Q_0,2) - np.power(Q,2))) + P*(params['landau_Vmax']*np.power(Q_0,2)*Vt)
+
     return Gdisord
 
+def entropy_disorder_Landau(P, T, params):
+    # N.B. Assumes Vt==1, see above
+    Tcstar, Q_0, Q = landau_ordering(P, T, params)
+    Sdisord=params['landau_Smax']*(np.power(Q_0, 2.) - np.power(Q, 2.))
+    return Sdisord
+
+def enthalpy_disorder_Landau(P, T, params):
+    # N.B. Assumes Vt==1, see above
+    Tcstar, Q_0, Q = landau_ordering(P, T, params)
+    Hdisord=gibbs_disorder_Landau(P, T, params) + T*entropy_disorder_Landau(P, T, params)
+    return Hdisord
+
+def heat_capacity_p_disorder_Landau(P, T, params):
+    # N.B. Assumes Vt==1, see above
+    Tcstar, Q_0, Q = landau_ordering(P, T, params)
+    Hdisord=gibbs_disorder_Landau(P, T, params) + T*entropy_disorder_Landau(P, T, params)
+    if Q==0.:
+        Cp_disord=0.
+    else:
+
+        Cp_disord=params['landau_Smax']/(2.*np.sqrt((Tcstar-T)*params['landau_Tc']))
+    return Cp_disord
+
+
 # see derivation in thermodynamic_introduction.pdf
 def lnxord(n,Q):
     return np.log(1.+n*Q) + n*np.log(n+Q) - (1.+n)*np.log(1.+n)
@@ -74,7 +106,7 @@ def equilibrium_Q(Q, deltaS, P, T, params):
     return params['BW_deltaH'] - params['BW_factor']*T*deltaS + P*params['BW_deltaV'] + params['BW_factor']*R*T*(lnxdisord(n,Q) - lnxord(n,Q)) + (2.*Q - 1.)*W
 
 # Energy of disordering from Bragg-Williams symmetric model; see Holland and Powell, 1996
-def gibbs_disord_BW(P, T, params):
+def gibbs_disorder_BW(P, T, params):
     n=params['BW_n']
     deltaS=entropydisorder(n)
     Q=opt.fsolve(equilibrium_Q, 0.999995, args=(deltaS, P, T, params))[0]
@@ -84,6 +116,24 @@ def gibbs_disord_BW(P, T, params):
     Edisord=ideal+nonideal
     return Edisord
 
+def entropy_disorder_BW(P, T, params):
+    n=params['BW_n']
+    deltaS=entropydisorder(n)
+    Q=opt.fsolve(equilibrium_Q, 0.999995, args=(deltaS, P, T, params))[0]
+    Sdisord=params['BW_factor']*((1.-Q)*(entropydisorder(n) - R*lnxdisord(n,Q)) - Q*(R*lnxord(n,Q)))
+    return Sdisord
+    
+def enthalpy_disorder_BW(P, T, params):
+    n=params['BW_n']
+    deltaS=entropydisorder(n)
+    Q=opt.fsolve(equilibrium_Q, 0.999995, args=(deltaS, P, T, params))[0]
+    W=params['BW_W'] + P*params['BW_Wv']
+    ideal=(1.-Q)*(params['BW_deltaH'] + P*params['BW_deltaV'])
+    nonideal=(1.-Q)*Q*W
+    Hdisord=ideal+nonideal
+    return Hdisord
+
+
 # see Holland and Powell, 2011
 def modified_tait(x, params):
     """
@@ -148,8 +198,11 @@ class MT(eos.EquationOfState):
         """
         Returns heat capacity at constant volume at the pressure, temperature, and volume [J/K/mol].
         """
-        einstein_T=einstein_temperature(params['S_0'], params['n'])
-        return einstein.heat_capacity_v(temperature, einstein_T,params['n'])
+        C_p=self.heat_capacity_p(pressure, temperature, volume, params)
+        V=self.volume(pressure,temperature,params)
+        alpha=self.thermal_expansivity(pressure, temperature, volume , params)
+        K_T=self.isothermal_bulk_modulus(pressure,temperature,volume, params)
+        return C_p - V*temperature*alpha*alpha*K_T
 
     def thermal_expansivity(self, pressure, temperature, volume , params):
         """
@@ -166,11 +219,6 @@ class MT(eos.EquationOfState):
  
         return alpha
 
-    # Heat capacity at ambient pressure
-    # N.B. Cp=-T*(d2G/dT2)|p
-
-    # What is this?  Can't we get heat capacity at constant pressure
-    # from the equation of state and the Einstein model?  IR
     def heat_capacity_p0(self,temperature,params):
         """
         Returns heat capacity at ambient pressure as a function of temperature [J/K/mol]
@@ -180,7 +228,7 @@ class MT(eos.EquationOfState):
         return Cp
 
 
-    def heat_capacity_p(self, pressure, temperature, volume, params):
+    def heat_capacity_p_einstein(self, pressure, temperature, volume, params):
         """
         Returns heat capacity at constant pressure at the pressure, temperature, and volume [J/K/mol]
         """
@@ -213,24 +261,84 @@ class MT(eos.EquationOfState):
 
         psubpth=pressure-Pth
 
-        intCpdT = (params['Cp'][0]*temperature + 0.5*params['Cp'][1]*np.power(temperature,2.) - params['Cp'][2]/temperature + 2.*params['Cp'][3]*np.sqrt(temperature)) - (params['Cp'][0]*T_0 + 0.5*params['Cp'][1]*T_0*T_0 - params['Cp'][2]/T_0 + 2.0*params['Cp'][3]*np.sqrt(T_0))
-
-        intCpoverTdT = (params['Cp'][0]*np.log(temperature) + params['Cp'][1]*temperature - 0.5*params['Cp'][2]/np.power(temperature,2.) - 2.0*params['Cp'][3]/np.sqrt(temperature)) - (params['Cp'][0]*np.log(T_0) + params['Cp'][1]*T_0 - 0.5*params['Cp'][2]/(T_0*T_0) - 2.0*params['Cp'][3]/np.sqrt(T_0))
-
         # EQ 13
         intVdP = pressure*params['V_0']*(1. - a + (a*(np.power((1.-b*Pth), 1.-c) - np.power((1. + b*(pressure-Pth)), 1.-c))/(b*(c-1.)*pressure)))
 
         # Add order-disorder terms if required
         if params.has_key('landau_Tc'): # For a phase transition described by Landau term
-            Gdisord=gibbs_disord_Landau(pressure, temperature, params)
+            Gdisord=gibbs_disorder_Landau(pressure, temperature, params)
         else:
             if params.has_key('BW_deltaH'): # Add Bragg-Williams disordering
-                Gdisord=gibbs_disord_BW(pressure, temperature, params) - gibbs_disord_BW(P_0, T_0, params)
+                Gdisord=gibbs_disorder_BW(pressure, temperature, params) - gibbs_disorder_BW(P_0, T_0, params)
             else:
                 Gdisord=0.0
 
+        return params['H_0'] + self.__intCpdT(temperature, params) - temperature*(params['S_0'] + self.__intCpoverTdT(temperature, params)) + intVdP + Gdisord
+
+
+    def entropy(self,pressure,temperature,params):
+        """
+        Returns the entropy [J/K/mol] as a function of pressure [Pa]
+        and temperature [K].
+        """
+        a, b, c = tait_constants(params)
+        Pth=self.__relative_thermal_pressure(temperature,params)
+
+        einstein_T=einstein_temperature(params['S_0'], params['n'])
+        ksi_over_ksi_0=einstein.heat_capacity_v( temperature, einstein_T, params['n'] )/einstein.heat_capacity_v( T_0, einstein_T, params['n'] )
+
+        dintVdpdx=(params['V_0']*params['a_0']*params['K_0']*a*ksi_over_ksi_0)*(np.power((1.+b*(pressure-Pth)), 0.-c) - np.power((1.-b*Pth), 0.-c))
+
+        # Add order-disorder terms if required
+        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
+            Sdisord=entropy_disorder_Landau(pressure, temperature, params)
+        else:
+            if params.has_key('BW_deltaH'): # Add Bragg-Williams disordering
+                Sdisord=entropy_disorder_BW(pressure, temperature, params) - entropy_disorder_BW(P_0, T_0, params)
+            else:
+                Sdisord=0.0
+
+        return params['S_0'] + self.__intCpoverTdT(temperature, params) + dintVdpdx + Sdisord
+
+    def enthalpy(self, pressure, temperature, params):
+        """
+        Returns the enthalpy [J/mol] as a function of pressure [Pa]
+        and temperature [K].
+        """
+        gibbs=self.gibbs_free_energy(pressure,temperature,params)
+        entropy=self.entropy(pressure,temperature,params)
+        
+        # Add order-disorder terms if required
+        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
+            Hdisord=enthalpy_disorder_Landau(pressure, temperature, params)
+        else:
+            if params.has_key('BW_deltaH'): # Add Bragg-Williams disordering
+                Hdisord=enthalpy_disorder_BW(pressure, temperature, params) - enthalpy_disorder_BW(P_0, T_0, params)
+            else:
+                Hdisord=0.0
+
+        return gibbs + temperature*entropy + Hdisord
 
-        return params['H_0'] + intCpdT - temperature*(params['S_0'] + intCpoverTdT) + intVdP + Gdisord
+    def heat_capacity_p(self, pressure, temperature, volume, params):
+        """
+        Returns the heat capacity [J/K/mol] as a function of pressure [Pa]
+        and temperature [K].
+        """
+        a, b, c = tait_constants(params)
+        Pth=self.__relative_thermal_pressure(temperature,params)
+
+        einstein_T=einstein_temperature(params['S_0'], params['n'])
+        ksi_over_ksi_0=einstein.heat_capacity_v( temperature, einstein_T, params['n'] )/einstein.heat_capacity_v( T_0, einstein_T, params['n'] )
+
+        dSdT=params['V_0']*params['K_0']*np.power((ksi_over_ksi_0*params['a_0']),2.0)*(np.power((1.+b*(pressure-Pth)), -1.-c) - np.power((1.-b*Pth), -1.-c))
+
+        # Add order-disorder terms if required
+        if params.has_key('landau_Tc'): # For a phase transition described by Landau term
+            Cpdisord=heat_capacity_p_disorder_Landau(pressure, temperature, params)
+        else:
+            Cpdisord=0.0
+
+        return self.heat_capacity_p0(temperature,params) + temperature*dSdT + Cpdisord
 
     # calculate P = P(T0) + Pth
     def pressure(self, temperature, volume, params):
@@ -265,3 +373,8 @@ class MT(eos.EquationOfState):
         return self.__thermal_pressure(T, params) - \
                self.__thermal_pressure(T_0, params)
 
+    def __intCpdT (self, temperature, params):
+        return (params['Cp'][0]*temperature + 0.5*params['Cp'][1]*np.power(temperature,2.) - params['Cp'][2]/temperature + 2.*params['Cp'][3]*np.sqrt(temperature)) - (params['Cp'][0]*T_0 + 0.5*params['Cp'][1]*T_0*T_0 - params['Cp'][2]/T_0 + 2.0*params['Cp'][3]*np.sqrt(T_0))
+
+    def __intCpoverTdT (self, temperature, params):
+        return (params['Cp'][0]*np.log(temperature) + params['Cp'][1]*temperature - 0.5*params['Cp'][2]/np.power(temperature,2.) - 2.0*params['Cp'][3]/np.sqrt(temperature)) - (params['Cp'][0]*np.log(T_0) + params['Cp'][1]*T_0 - 0.5*params['Cp'][2]/(T_0*T_0) - 2.0*params['Cp'][3]/np.sqrt(T_0))
diff --git a/burnman/slb.py b/burnman/slb.py
index b7d106f..760798c 100644
--- a/burnman/slb.py
+++ b/burnman/slb.py
@@ -211,6 +211,20 @@ class SLBBase(eos.EquationOfState):
         G = self.helmholtz_free_energy( temperature, volume, params) + pressure * volume
         return G
 
+    def entropy( self, pressure, temperature, params):
+        """
+        Returns the entropy at the pressure and temperature of the mineral [J/K/mol]
+        """
+        
+        return float('nan')
+
+    def enthalpy( self, pressure, temperature, params):
+        """
+        Returns the enthalpy at the pressure and temperature of the mineral [J/mol]
+        """
+        
+        return float('nan')
+
     def helmholtz_free_energy( self, temperature, volume, params):
         """
         Returns the Helmholtz free energy at the pressure and temperature of the mineral [J/mol]
diff --git a/perplex_output/fo50_HP2011_params.dat b/perplex_output/fo50_HP2011_params.dat
new file mode 100644
index 0000000..f2fff50
--- /dev/null
+++ b/perplex_output/fo50_HP2011_params.dat
@@ -0,0 +1,5 @@
+P(bar)		T(K)		H(J)      S(J/K)      V(J/bar)      Cp(J/K)      Alpha(1/K)  Beta(1/bar)  Density(kg/m3)
+50000  	        1000 	        -0.14912E+07   316.84       4.4272       179.83      0.31665E-04  0.73543E-06   3890.3 
+100000		1000		-0.12800E+07   310.43       4.2783       178.64      0.27520E-04  0.63858E-06   4025.7
+50000 		1500		-0.13979E+07   392.32       4.5008       192.23      0.34279E-04  0.78824E-06   3826.7
+100000  	1500  		-0.11875E+07   385.30       4.3396       190.39      0.29453E-04  0.67656E-06   3968.8
diff --git a/perplex_output/fo_HP2011_params.dat b/perplex_output/fo_HP2011_params.dat
new file mode 100644
index 0000000..0ceca39
--- /dev/null
+++ b/perplex_output/fo_HP2011_params.dat
@@ -0,0 +1,7 @@
+P(bar)		T(K)		H(J)      S(J/K)      V(J/bar)      Cp(J/K)      Alpha(1/K)  Beta(1/bar)  Density(kg/m3)
+1		1000		-0.20632E+07   277.07       4.4773       175.07      0.39730E-04  0.85822E-06   3142.4
+50000  		1000 		-0.18519E+07   269.01       4.3031       173.24      0.34086E-04  0.73631E-06   3269.6
+100000		1000		-0.16473E+07   262.25       4.1572       171.91      0.29983E-04  0.64767E-06   3384.3
+1		1500		-0.19724E+07   350.55       4.5717       187.00      0.43733E-04  0.93249E-06   3077.5		
+50000		1500		-0.17623E+07   341.57       4.3802       184.13      0.36956E-04  0.78799E-06   3212.0
+100000		1500		-0.15584E+07   334.16       4.2223       182.14      0.32165E-04  0.68583E-06   3332.1
diff --git a/perplex_output/fo_SLB2011_params.dat b/perplex_output/fo_SLB2011_params.dat
new file mode 100644
index 0000000..7af32da
--- /dev/null
+++ b/perplex_output/fo_SLB2011_params.dat
@@ -0,0 +1,7 @@
+P(bar)		T(K)		H(J)      S(J/K)      V(J/bar)      Cp(J/K)      Alpha(1/K)  Beta(1/bar)  Density(kg/m3)
+1 		1000		-0.19163E+07   276.22       4.4533       175.37      0.34807E-04  0.88173E-06   3159.3
+50000  		1000 		-0.17050E+07   269.45       4.2777       173.28      0.27775E-04  0.73768E-06   3289.0
+100000		1000		-0.15001E+07   264.13       4.1336       171.92      0.23165E-04  0.63826E-06   3403.6
+1		1500		-0.18265E+07   348.96       4.5378       183.64      0.40571E-04  0.98695E-06   3100.5
+50000		1500		-0.16165E+07   341.09       4.3412       179.99      0.31208E-04  0.80042E-06   3240.9
+100000		1500		-0.14125E+07   335.09       4.1842       177.88      0.25499E-04  0.68032E-06   3362.4
diff --git a/test_derived_properties.py b/test_derived_properties.py
new file mode 100644
index 0000000..1dd31f6
--- /dev/null
+++ b/test_derived_properties.py
@@ -0,0 +1,81 @@
+import burnman
+from burnman.minerals import SLB_2011
+from burnman.minerals import HP_2011_ds62
+import numpy as np
+import matplotlib.pyplot as plt
+###
+
+f = open('perplex_output/fo_SLB2011_params.dat', 'r')
+datalines = [ line.strip() for idx, line in enumerate(f.read().split('\n')) if line.strip() and idx>0 ]
+f.close()
+data = [ map(float,"%".join(line.split("%")[:1]).split()) for line in datalines ]
+P, T, H, S, V, C_p, alpha, beta, rho = zip(*data)
+
+
+fo = SLB_2011.fo()
+fo.set_method('slb3')
+
+print "P (GPa)  T(K)  Gibbs(burnman, J/mol)   Gibbs(SLB2011/PerpleX, J/mol)"
+for i, pressure in enumerate(P):
+    fo.set_state(P[i]*1.e5,T[i])
+    print P[i]/1.e4, T[i], fo.gibbs, H[i]-T[i]*S[i], fo.gibbs - (H[i]-T[i]*S[i])
+
+    print P[i], T[i], fo.H, H[i], (fo.H-H[i])/fo.H*100. # enthalpy
+    print P[i], T[i], fo.S, S[i], (fo.S-S[i])/fo.S*100. # entropy
+    print P[i], T[i], fo.V, V[i]*1.e-5 , (fo.V-V[i]*1.e-5)/fo.V*100. # volume
+    print P[i], T[i], fo.C_p, C_p[i], (fo.C_p-C_p[i])/fo.C_p*100. # heat capacity
+    print P[i], T[i], fo.alpha, alpha[i], (fo.alpha-alpha[i])/fo.alpha*100. # expansivity
+    print P[i], T[i], fo.compressibility(), beta[i]*1.e-5, (fo.compressibility()-beta[i]*1.e-5)/fo.compressibility()*100. # compressibility
+    print P[i], T[i], fo.density(), rho[i], (fo.density()-rho[i])/fo.density()*100. # density
+    print ''
+print ''
+
+
+###
+
+f = open('perplex_output/fo_HP2011_params.dat', 'r')
+datalines = [ line.strip() for idx, line in enumerate(f.read().split('\n')) if line.strip() and idx>0 ]
+f.close()
+data = [ map(float,"%".join(line.split("%")[:1]).split()) for line in datalines ]
+
+P, T, H, S, V, C_p, alpha, beta, rho = zip(*data)
+
+
+fo = HP_2011_ds62.fo()
+fo.set_method('mtait')
+
+print "P (GPa)  T(K)  Gibbs(burnman, J/mol)   Gibbs(HP2011/PerpleX, J/mol)"
+for i, pressure in enumerate(P):
+    fo.set_state(P[i]*1.e5,T[i])
+    print P[i]/1.e4, T[i], fo.gibbs, H[i]-T[i]*S[i], fo.gibbs - (H[i]-T[i]*S[i])
+
+    print P[i], T[i], fo.H, H[i], (fo.H-H[i])/fo.H*100. # enthalpy
+    print P[i], T[i], fo.S, S[i], (fo.S-S[i])/fo.S*100. # entropy
+    print P[i], T[i], fo.V, V[i]*1.e-5 , (fo.V-V[i]*1.e-5)/fo.V*100. # volume
+    print P[i], T[i], fo.C_p, C_p[i], (fo.C_p-C_p[i])/fo.C_p*100. # heat capacity
+    print P[i], T[i], fo.alpha, alpha[i], (fo.alpha-alpha[i])/fo.alpha*100. # expansivity
+    print P[i], T[i], fo.compressibility(), beta[i]*1.e-5, (fo.compressibility()-beta[i]*1.e-5)/fo.compressibility()*100. # compressibility
+    print P[i], T[i], fo.density(), rho[i], (fo.density()-rho[i])/fo.density()*100. # density
+    print ''
+
+
+quartz = HP_2011_ds62.q()
+quartz.set_method('mtait')
+P=1.e6
+T=1500.
+quartz.set_state(P,T)
+print quartz.S
+
+
+temperatures=np.linspace(300., 1500., 1001.)
+heat_capacities=np.empty_like(temperatures)
+for i, T in enumerate(temperatures):
+    quartz.set_state(P,T)
+    heat_capacities[i]=quartz.C_p
+
+
+plt.plot(temperatures, heat_capacities, 'g-')
+plt.xlabel("Temperature (K)")
+plt.ylabel("Cp quartz (J/K/mol)")
+plt.title("Heat capacities of a mineral with a Landau transition")
+plt.show()



More information about the CIG-COMMITS mailing list