Numerical Implementation and Oceanographic Application of the Gibbs Thermodynamic Potential of Seawater R
Total Page:16
File Type:pdf, Size:1020Kb
Numerical implementation and oceanographic application of the Gibbs thermodynamic potential of seawater R. Feistel To cite this version: R. Feistel. Numerical implementation and oceanographic application of the Gibbs thermodynamic potential of seawater. Ocean Science Discussions, European Geosciences Union, 2004, 1 (1), pp.1-19. hal-00298363 HAL Id: hal-00298363 https://hal.archives-ouvertes.fr/hal-00298363 Submitted on 17 Nov 2004 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Ocean Science Discussions, 1, 1–19, 2004 Ocean Science OSD www.ocean-science.net/osd/1/1/ Discussions SRef-ID: 1812-0822/osd/2004-1-1 1, 1–19, 2004 European Geosciences Union Numerical implementation and oceanographic application R. Feistel Numerical implementation and oceanographic application of the Gibbs Title Page thermodynamic potential of seawater Abstract Introduction Conclusions References R. Feistel Tables Figures Baltic Sea Research Institute, Seestraße 15, D-18119 Warnemunde,¨ Germany Received: 11 November 2004 – Accepted: 16 November 2004 – Published: 17 November J I 2004 J I Correspondence to: R. Feistel ([email protected]) Back Close © 2004 Author(s). This work is licensed under a Creative Commons License. Full Screen / Esc Print Version Interactive Discussion EGU 1 Abstract OSD The 2003 Gibbs thermodynamic potential function represents a very accurate, com- 1, 1–19, 2004 pact, consistent and comprehensive formulation of equilibrium properties of seawater. It is expressed in the International Temperature Scale ITS-90 and is fully consistent Numerical 5 with the current scientific pure water standard, IAPWS-95. Source code examples in implementation and FORTRAN, C++ and Visual Basic are presented for the numerical implementation of oceanographic the potential function and its partial derivatives, as well as for potential temperature. A application collection of thermodynamic formulas and relations is given for possible applications in oceanography, from density and chemical potential over entropy and potential density R. Feistel 10 to mixing heat and entropy production. For colligative properties like vapour pressure, freezing points, and for a Gibbs potential of sea ice, the equations relating the Gibbs function of seawater to those of vapour and ice are presented. Title Page Abstract Introduction 1. Introduction Conclusions References Thermodynamic potential functions (also called fundamental equations of state) offer a Tables Figures 15 very compact and consistent way of representing equilibrium properties of a given sub- stance, both theoretically and numerically (Alberty, 2001). This was very successfully demonstrated by subsequent standard formulations for water and steam (Wagner and J I Pruß, 2002). For seawater, this method was first studied by Fofonoff (1962) and later J I applied numerically in three subsequently improved versions by Feistel (1993), Feis- Back Close 20 tel and Hagen (1995), and Feistel (2003), expressing free enthalpy (also called Gibbs energy) as function of pressure, temperature and practical salinity. Their mathematical Full Screen / Esc structures are polynomial-like and have remained identical throughout these versions with only slight modifications of their sets of coefficients. The structure was chosen Print Version for its simplicity in analytical partial derivatives and its numerical implementation, as 25 discussed in Feistel (1993). Interactive Discussion This paper provides code examples for the numerical computation in FORTRAN, EGU 2 C++ and Visual Basic 6, and describes their algorithms for the latter case. This code OSD is neither very compact, nor very fast, nor definitely error-free; it is just intended as functioning example and guide for the development of individual implementations into 1, 1–19, 2004 custom program environments. Users are free to use, modify and distribute the code 5 at their own responsibility. Numerical The recent Gibbs potential formulation of seawater thermodynamics has a number of implementation and advantages compared to the classical “EOS80”, the 1980 Equation of State (Fofonoff oceanographic and Millard, 1983), as explained in detail by Feistel (2003). One important reason is application that it is fully consistent with the current international scientific standard formulation of 10 liquid and gaseous pure water, IAPWS-95 (Wagner and Pruß, 2002), and with a new R. Feistel comprehensive description of ice (Feistel and Wagner, 2005). It is valid for pressures from the triple point to 100 MPa (10 000 dbar), temperatures from −2◦C to 40◦C, for practical salinities up to 42 psu and up to 50 psu at normal pressure. Title Page For faster computation, as e.g. required in circulation models, modified equations Abstract Introduction 15 of state derived from the 1995 and 2003 Gibbs potential functions have recently been 1 constructed by McDougall et al. (2003) and Jackett et al. (2004) . Conclusions References A significant advantage compared to the usual EOS80 formulation of seawater prop- Tables Figures erties is the new availability of quantities like energy, enthalpy, entropy, or chemical po- tential. We present in section 3 a collection of important thermodynamic and oceano- J I 20 graphic relations with brief explanations, for which the new potential function can be applied. Such formulas are often only found scattered over various articles and text- J I books. In chapter 4, the Gibbs function of seawater is used in conjunction with numer- ically available thermodynamic formulations for water vapour and water ice, consistent Back Close with the current one (Tillner-Roth, 1998; Wagner and Pruß, 2002; Feistel, 2003; Feistel Full Screen / Esc 25 and Wagner, 2005). This way colligative properties like vapour pressure or freezing points can be computed, as well as various properties of sea ice. Print Version 1Jackett, D. R., McDougall, T. J., Feistel, R., Wright, D. G., and Griffies, S. M.: Updated al- Interactive Discussion gorithms for density, potential temperature, conservative temperature and freezing temperature of seawater, J. Atm. Ocean Technol., submitted, 2004. EGU 3 2. Gibbs potential and its derivatives OSD Specific free enthalpy (also called Gibbs function, Gibbs energy, Gibbs free energy, or 1, 1–19, 2004 free energy in the literature) of seawater, g(S, t, p), is assumed to be a polynomial- S x2 S like function of the independent variables practical salinity, = · U , temperature, Numerical 5 t y · t p z · p = U , and applied pressure, = U , as, implementation and ! oceanographic g(S, t, p) X X = (g + g y) x2 ln x + g + g xi yj zk . (1) application g 100 110 0jk ijk U j,k i>1 R. Feistel −1 The unit specific free enthalpy is gU = 1 J kg . The reference values are defined arbitrarily as SU = 40 psu for salinity (PSS-78) (Lewis and Perkin, 1981; Unesco, 1981), ◦ tU = 40 C for temperature (ITS-90) (Blanke, 1989; Preston-Thomas, 1990), and pU = Title Page 10 100 MPa = 10 000 dbar for pressure. The dimensionless variables x, y, z for salinity, temperature and pressure are not to be confused with spatial coordinates. We follow Abstract Introduction Fofonoff’s (1992) proposal here and write for clarity “psu” as unit expressing practical Conclusions References salinity, even though this notion is formally not recommended (Siedler, 1998). We Tables Figures shall use capital symbols T = T0 + t for absolute temperatures, with Celsius zero point 15 T0 = 273.15 K, and P = P0 + p for absolute pressures, with normal pressure P0 = 0.101325 MPa, in the following. The polynomial coefficients gijk are listed in Table 1. J I The specific dependence on salinity results from Planck’s theory of ideal solutions and the Debye-Huckel¨ theory of electrolytes (Landau and Lifschitz, 1966; Falkenhagen et J I al., 1971), providing a thermodynamically correct low-salinity limit of the equation. Back Close 20 There are three first derivatives of g with respect to its independent variables p, t, and S. Full Screen / Esc Density, ρ, and specific volume, v: Print Version 1 ∂g = v = (2) Interactive Discussion ρ ∂p S,t EGU 4 g with ∂g = U P g + P g xi · k · yj zk−1. OSD ∂p pU 0jk ijk S,t j,k> i> 0 1 1, 1–19, 2004 Specific entropy, σ: ∂g σ = − , (3) Numerical ∂t S,p implementation and " # oceanographic g with ∂g = U g x2 ln x + P g + P g xi · j · yj−1zk . application ∂t tU 110 0jk ijk S,p j>0,k i>1 5 Relative chemical potential, µ: R. Feistel ∂g µ = (4) ∂S t,p Title Page " # Abstract Introduction ∂g gU P i−2 j k with = (g100 + g110y)(2 ln x + 1) + gijk · i · x y z . ∂S t,p 2SU i>1,j,k Conclusions References Several thermodynamic coefficients require second derivatives of g. Isothermal compressibility, K : Tables Figures ∂2g/∂p2 1 ∂v S,t J I K = − = − (5) v ∂p 10 S,t ∂g/∂p S,t J I 2 g Back Close with ∂ g = U P g + P g xi · k (k − 1) · yj zk−2. ∂p2 p2 0jk ijk S,t U j,k>1 i>1 Full Screen / Esc Isobaric thermal expansion coefficient, α: ∂2g/∂t∂p Print Version 1 ∂v α = = S (6) v ∂t Interactive Discussion S,p ∂g/∂p S,t EGU 5 2 ∂ g gU P P i j−1 k−1 OSD with ∂p∂t = p t g0jk + gijk x · j · k · y z U U j> ,k> i> S 0 0 1 1, 1–19, 2004 Isobaric specific heat capacity, cP : 2 ! ∂σ ∂h ∂ g Numerical cP = T = = −T (7) ∂t ∂t ∂t2 implementation and S,p S,p S,p oceanographic 2 g with ∂ g = U P g + P g xi · j (j − 1) · yj−2zk.