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 STEAMSTATE_H 00023 #define STEAMSTATE_H 00024 00025 #include "steamcalculator.h" 00026 00027 class SteamState:public DesignByContract { 00028 public: 00029 00030 virtual int getRegion(void) const; 00031 00032 virtual SpecificVolume specvol(const SteamCalculator &c) const = 0; 00033 virtual SpecificEnergy specienergy(const SteamCalculator &c) const = 0; 00034 virtual SpecificEntropy specentropy(const SteamCalculator &c) const = 0; 00035 virtual SpecificEnergy specenthalpy(const SteamCalculator &c) const = 0; 00036 virtual SpecHeatCap speccp(const SteamCalculator &c) const = 0; 00037 virtual SpecHeatCap speccv(const SteamCalculator &c) const = 0; 00038 00039 virtual Temperature temp(const SteamCalculator &c) const = 0; 00040 virtual Pressure pres(const SteamCalculator &c) const = 0; 00041 virtual Density dens(const SteamCalculator &c) const = 0; 00042 00043 protected: 00044 00045 friend class SteamCalculator; 00046 00047 static SteamState *Instance(); 00048 virtual void set_pT(SteamCalculator &c, const Pressure &p, const Temperature &T, Num x = -1) = 0; 00049 00050 virtual Num pitau_iaps85(const SteamCalculator &c) const = 0; 00051 virtual Num delpi_iaps85(const SteamCalculator &c) const = 0; 00052 00053 SteamState(){} 00054 00055 }; 00056 00057 #endif
1.3.8