Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

boundaries.h

00001 /* 00002 00003 freesteam - IAPWS-IF97 steam tables library 00004 Copyright (C) 2004-2005 John Pye 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License 00008 as published by the Free Software Foundation; either version 2 00009 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 */ 00021 00022 #ifndef BOUNDARIES_H 00023 #define BOUNDARIES_H 00024 00025 #include "designbycontract.h" 00026 #include "units.h" 00027 #include "common.h" 00028 00029 class Boundaries : public DesignByContract { 00030 00031 public: 00032 00033 static bool isValid_pT(Pressure p, Temperature T, bool throw_me = 00034 false); 00035 static bool isRegion1_pT(Pressure p, Temperature T, bool throw_me = 00036 false); 00037 static bool isRegion2_pT(Pressure p, Temperature T, bool throw_me = 00038 false); 00039 static bool isRegion3_pT(Pressure p, Temperature T, bool throw_me = 00040 false); 00041 //static bool isSat_pT(Pressure p, Temperature T, bool throw_me = false); // (region 4) 00042 static bool isBound_pT(Pressure p, Temperature T, bool throw_me = false); // curved boundary roughly below region 2 00043 00044 static bool isSat_Tx(const Temperature &T, const Num &x, const bool throw_me=false); 00045 00046 // Region 4 boundary: the following should be 100% consistent, FPU errors aside: 00047 static Pressure getSatPres_T(Temperature T); // Forwards equation 00048 static Temperature getSatTemp_p(Pressure p); // Backwards equation 00049 00050 // Region 4 boundary for T > TB_LOW 00051 static Density getSatDensWater_T(const Temperature &T); 00052 static Density getSatDensSteam_T(const Temperature &T); 00053 00054 static Pressure getpbound_T(Temperature T, bool throw_me = false); // use this function wherever possible 00055 static Temperature getTbound_p(Pressure p, bool throw_me = false); // in preference to this one. 00056 00057 private: 00058 00059 static Num upsilon(Temperature T); 00060 static Num A(Num ups); 00061 static Num B(Num ups); 00062 static Num C(Num ups); 00063 00064 static Num beta(Pressure p); 00065 static Num E(Num bet); 00066 static Num F(Num bet); 00067 static Num G(Num bet); 00068 static Num D(Num E, Num F, Num G); 00069 }; 00070 00071 #endif

Generated on Tue Mar 22 19:07:05 2005 for freesteam by doxygen 1.3.8