Go to the documentation of this file.
   26 #ifndef OPM_IAPWS_REGION1_HPP 
   27 #define OPM_IAPWS_REGION1_HPP 
   48 template < class Scalar>  
   59     template < class Evaluation>  
   60     static bool isValid( const Evaluation& temperature,  const Evaluation& pressure)  
   65             Toolbox::value(temperature) <= 623.15 &&  
   66             Toolbox::value(pressure) <= 100e6;  
   85     template < class Evaluation>  
   86     static Evaluation  tau( const Evaluation& temperature)  
   87     {  return 1386.0 / temperature; }  
   95     template < class Evaluation>  
   96     static Evaluation  dtau_dT( const Evaluation& temperature)  
   97     {  return - 1386.0 / (temperature*temperature); }  
  104     template < class Evaluation>  
  105     static Evaluation  pi( const Evaluation& pressure)  
  106     {  return pressure / 16.53e6; }  
  115     {  return 1.0 / 16.53e6; }  
  136     template < class Evaluation>  
  137     static Evaluation  gamma( const Evaluation& temperature,  const Evaluation& pressure)  
  141         const Evaluation tau_ =  tau(temperature);     
  142         const Evaluation pi_ =  pi(pressure);      
  144         Evaluation result = 0;  
  145         for ( int i = 0; i < 34; ++i) {  
  164     template < class Evaluation>  
  165     static Evaluation  dgamma_dtau( const Evaluation& temperature,  const Evaluation& pressure)  
  169         const Evaluation tau_ =  tau(temperature);     
  170         const Evaluation pi_ =  pi(pressure);      
  172         Evaluation result = Toolbox::createConstant(0.0);  
  173         for ( int i = 0; i < 34; i++) {  
  177                 Toolbox::pow(tau_ - 1.222,  static_cast<Scalar>(J(i)-1)) *  
  195     template < class Evaluation>  
  196     static Evaluation  dgamma_dpi( const Evaluation& temperature,  const Evaluation& pressure)  
  200         const Evaluation tau_ =  tau(temperature);     
  201         const Evaluation pi_ =  pi(pressure);      
  203         Evaluation result = Toolbox::createConstant(0.0);  
  204         for ( int i = 0; i < 34; i++) {  
  208                 Toolbox::pow(7.1 - pi_, static_cast<Scalar>(I(i) - 1)) *  
  227     template < class Evaluation>  
  228     static Evaluation  ddgamma_dtaudpi( const Evaluation& temperature,  const Evaluation& pressure)  
  232         const Evaluation tau_ =  tau(temperature);     
  233         const Evaluation pi_ =  pi(pressure);      
  235         Evaluation result = Toolbox::createConstant(0.0);  
  236         for ( int i = 0; i < 34; i++) {  
  241                 Toolbox::pow(7.1 - pi_, static_cast<Scalar>(I(i) - 1)) *  
  242                 Toolbox::pow(tau_ - 1.222, static_cast<Scalar>(J(i) - 1));  
  260     template < class Evaluation>  
  261     static Evaluation  ddgamma_ddpi( const Evaluation& temperature,  const Evaluation& pressure)  
  265         const Evaluation tau_ =  tau(temperature);     
  266         const Evaluation pi_ =  pi(pressure);      
  268         Evaluation result = Toolbox::createConstant(0.0);  
  269         for ( int i = 0; i < 34; i++) {  
  292     template < class Evaluation>  
  293     static Evaluation  ddgamma_ddtau( const Evaluation& temperature,  const Evaluation& pressure)  
  297         const Evaluation tau_ =  tau(temperature);     
  298         const Evaluation pi_ =  pi(pressure);      
  300         Evaluation result = Toolbox::createConstant(0.0);  
  301         for ( int i = 0; i < 34; i++) {  
  314     static Scalar n( int i)  
  316         static const Scalar n[34] = {  
  317             0.14632971213167, -0.84548187169114, -0.37563603672040e1,  
  318             0.33855169168385e1, -0.95791963387872, 0.15772038513228,  
  319            -0.16616417199501e-1, 0.81214629983568e-3, 0.28319080123804e-3,  
  320            -0.60706301565874e-3, -0.18990068218419e-1, -0.32529748770505e-1,  
  321            -0.21841717175414e-1, -0.52838357969930e-4, -0.47184321073267e-3,  
  322            -0.30001780793026e-3, 0.47661393906987e-4, -0.44141845330846e-5,  
  323            -0.72694996297594e-15,-0.31679644845054e-4, -0.28270797985312e-5,  
  324            -0.85205128120103e-9, -0.22425281908000e-5, -0.65171222895601e-6,  
  325            -0.14341729937924e-12,-0.40516996860117e-6, -0.12734301741641e-8,  
  326            -0.17424871230634e-9, -0.68762131295531e-18, 0.14478307828521e-19,  
  327             0.26335781662795e-22,-0.11947622640071e-22, 0.18228094581404e-23,  
  328            -0.93537087292458e-25  
  333     static Scalar I( int i)  
  335         static const short int I[34] = {  
  352     static Scalar J( int i)  
  354         static const short int J[34] = {  
static Evaluation ddgamma_ddtau(const Evaluation &temperature, const Evaluation &pressure) The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region... Definition: Region1.hpp:293  
static Scalar dp_dpi(Scalar) Returns the derivative of the pressure to the reduced pressure for IAPWS region 1 in ... Definition: Region1.hpp:123  
static Evaluation ddgamma_dtaudpi(const Evaluation &temperature, const Evaluation &pressure) The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp... Definition: Region1.hpp:228  
Definition: Air_Mesitylene.hpp:31  
static Evaluation dgamma_dpi(const Evaluation &temperature, const Evaluation &pressure) The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 (i... Definition: Region1.hpp:196  
Implements the equations for region 1 of the IAPWS '97 formulation.  Definition: Region1.hpp:49  
static Evaluation dgamma_dtau(const Evaluation &temperature, const Evaluation &pressure) The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 1 (i... Definition: Region1.hpp:165  
static Scalar dpi_dp(Scalar) Returns the derivative of the reduced pressure to the pressure for IAPWS region 1 in ... Definition: Region1.hpp:114  
static Evaluation tau(const Evaluation &temperature) Returns the reduced temperature for IAPWS region 1.  Definition: Region1.hpp:86  
static Evaluation pi(const Evaluation &pressure) Returns the reduced pressure for IAPWS region 1.  Definition: Region1.hpp:105  
static Evaluation ddgamma_ddpi(const Evaluation &temperature, const Evaluation &pressure) The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 ... Definition: Region1.hpp:261  
Evaluation< Scalar, VarSetTag, numVars > pow(const Evaluation< Scalar, VarSetTag, numVars > &base, Scalar exp) Definition: Math.hpp:312  
static Evaluation gamma(const Evaluation &temperature, const Evaluation &pressure) The Gibbs free energy (dimensionless) for IAPWS region 1 (i.e. liquid)  Definition: Region1.hpp:137  
static bool isValid(const Evaluation &temperature, const Evaluation &pressure) Returns true if IAPWS region 1 applies for a (temperature in , pressure in ) pair.  Definition: Region1.hpp:60  
static Evaluation dtau_dT(const Evaluation &temperature) Returns the derivative of the reduced temperature to the temperature for IAPWS region 1 in ... Definition: Region1.hpp:96  
  
  
 
    
     |