@@ -564,7 +564,7 @@ def get_entropy_of_reaction(self, T):
564564 dSrxn += product .get_entropy (T )
565565 return dSrxn
566566
567- def get_free_energy_of_reaction (self , T , potential = None ):
567+ def get_free_energy_of_reaction (self , T , potential = 0 ):
568568 """
569569 Return the Gibbs free energy of reaction in J/mol evaluated at
570570 temperature `T` in K and potential in Volts (if applicable)
@@ -573,7 +573,7 @@ def get_free_energy_of_reaction(self, T, potential=None):
573573 dGrxn = 0.0
574574
575575 if self .is_charge_transfer_reaction () and self .V0 :
576- dGrxn = - 1 * abs (self .ne ) * constants .F * self .V0 .value_si # G = -nFE0 in J/mol
576+ dGrxn = - 1 * abs (self .ne ) * constants .F * self .V0 .value_si # G = -nFE0 in J/mol, not sure about sign
577577 else :
578578 for reactant in self .reactants :
579579 if not reactant .is_electron ():
@@ -590,12 +590,12 @@ def get_free_energy_of_reaction(self, T, potential=None):
590590 logging .error ("Problem with product {!r} in reaction {!s}" .format (reactant , self ))
591591 raise
592592
593- if self .is_charge_transfer_reaction () and potential is not None :
594- dGrxn += ( dGrxn - self .ne * constants .F * potential ) # Not sure about sign here or equation G = -nFE0 + nF(V0-V)
595- # where nF(V0-V) is from applied potential
593+ if self .is_charge_transfer_reaction () and potential != 0 :
594+ dGrxn -= self .ne * constants .F * potential # Not sure about sign here
595+
596596 return dGrxn
597597
598- def get_equilibrium_constant (self , T , potential = None , type = 'Kc' ):
598+ def get_equilibrium_constant (self , T , potential = 0 , type = 'Kc' ):
599599 """
600600 Return the equilibrium constant for the reaction at the specified
601601 temperature `T` in K and (electrochemical) potential in volts (if applicable).
0 commit comments