00001 /* 00002 * Copyright (c) 2001 The AUTHORS 00003 * Romeu Andre' Pieritz, Ph.D. - romeu_pieritz@hotmail.com 00004 * Rafael Mendes, Eng. – mendes_rafael@yahoo.com 00005 * Rodrigo Ferraz de Andrade, Eng. – rferraz@iname.com 00006 * All rights reserved. 00007 * 00008 * Permission to use, copy and distribute this software and its 00009 * documentation for educational and personal use, without fee is hereby granted, 00010 * provided that the above copyright notice and the following 00011 * two paragraphs appear in all copies of this software. 00012 * 00013 * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR 00014 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 00015 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS 00016 * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00017 * 00018 * THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, 00019 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00020 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HERE UNDER IS 00021 * ON AN "AS IS" BASIS, AND THE AUTHORS HAVE NO OBLIGATION TO 00022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00023 * 00024 * SINMEC Lab. - CFD Sinflow Project - http://www.sinmec.ufsc.br/cfd 00025 */ 00026 00027 00028 // File Define 00029 #ifndef __CSFL_NUM_SEQUENCER_ENERGY_H__ 00030 #define __CSFL_NUM_SEQUENCER_ENERGY_H__ 00031 00032 // Include ===================================================================== 00033 #include <csfl/num/sequencer/sequencer.h> 00034 #include <csfl/math/equation/energy.h> 00035 #include <csfl/sys/container/equation.h> 00036 00037 00038 // Namespace 00039 namespace csfl { 00040 00041 //============================================================================== 00042 // Class ISequencerEnergy 00043 // Description: Class for the sequence objects 00044 //============================================================================== 00045 00046 class ISequencerEnergy : 00047 virtual public ISequencer 00048 00053 00054 { 00055 00056 public: 00057 00065 ISequencerEnergy( 00066 const IString &_id , 00067 IContainerEquation *_conteqE, 00068 ISolver *_solver , 00069 double _starttime = 0.0, 00070 double _finaltime = 1.0, 00071 double _steptime = 0.5 ); 00072 ISequencerEnergy( ISequencerEnergy *_s ); 00073 ~ISequencerEnergy(); 00074 00079 IEquationEnergy * EquationEnergy() { return eqE; } 00080 00085 IFieldScalar * Temperature() { return T; } 00086 00091 IFieldScalarFace * FaceTemperature() { return eqE->FaceTemperature(); } 00092 00096 void CheckSteadyStateTerror( bool _b ) { checkSSTerror = _b; } 00097 00101 void CheckIterationTerror( bool _b ) { checkItTerror = _b; } 00102 00107 void SetSteadyStateTemperatureError( double _v ) 00108 { toleranceT = _v; checkSSTerror = true; } 00109 00115 void SetTemperatureError( double _v ) 00116 { tError = _v; checkItTerror = true; } 00117 00119 double SteadyStateTemperatureError() { return toleranceT; } 00120 00125 double TemperatureError() { return tError; } 00126 00131 double RunTimeErrorTemperature() { return tdif; } 00132 00136 double SteadyStateErrorTemperature() { return stdif; } 00137 00141 virtual ILinearSystem * LSys(){ return eqE->LinearSystem(); } 00142 00144 void EvaluateNusseltNumberEachIteraction( bool _b ) { evalNusseltNumber = _b; } 00145 00149 bool IsEvaluateNusseltNumberEachIteraction() { return evalNusseltNumber; } 00150 00152 void EvaluateHeatFluxEachIteraction( bool _b ) { evalHeatFlux = _b; } 00153 00157 bool IsEvaluateHeatFluxEachIteraction() { return evalHeatFlux; } 00158 00164 IAction ActionSolutionTemperatureError, 00165 ActionTemperatureError, 00166 ActionRequestSolutionTemperature, 00167 ActionSolutionTemperature; 00168 00169 public: 00170 00171 00173 virtual void Write( ostream &_os ); 00174 00176 virtual void Read ( istream &_is ); 00177 00182 virtual void WriteEnergy( ostream &_os ); 00183 00188 virtual void ReadEnergy( istream &_is ); 00189 00190 00191 protected: 00192 IEquationEnergy *eqE; 00193 IFieldScalar *T, *TAnt, *Ter; 00194 double tdif, stdif, tError; 00195 double toleranceT; 00196 00197 bool checkSSTerror; 00198 bool checkItTerror; 00199 00200 bool evalNusseltNumber, evalHeatFlux; 00201 00202 virtual void Begin(); 00203 virtual void Solution( double = 0.0 ); 00204 virtual void End(); 00205 00206 virtual void Find(); 00207 00208 virtual bool IteractError(); // time error T 00209 00210 virtual bool SolutionError(); 00211 virtual void ActualizeVariables(); 00212 00213 virtual void InitVariables(); 00214 00215 virtual void SolutionTemperature(); // Solve Energy Equation tambem nas derivadas 00216 void SetInternalVariables(); 00217 friend class ISequencerIO; 00218 }; 00219 00220 } // csfl namespace 00221 00222 #endif // __CSFL_NUM_SEQUENCER_ENERGY_H__
CFD Project
|
Documents |
Downloads |
Contact us |
Use Terms |
|
|||
© SINMEC/EMC/UFSC,
2001. |
All rights
reserved. |
Last Update: Jan. 18, 2002 |
|