Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

momentum_v.h

Go to the documentation of this file.
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_MATH_EQUATION_MOMENTUM_V_H__
00030 #define __CSFL_MATH_EQUATION_MOMENTUM_V_H__
00031 
00032 
00033 // Include
00034 #include <csfl/math/equation/sinflow.h>
00035 
00036 
00037 // Namespace
00038 namespace csfl {
00039 
00040 //==============================================================================
00041 //              Class IEquationMomentumV
00042 //              Description: Class for Sinflow's Momentum Equation
00043 //==============================================================================
00044 
00045 class IEquationMomentumV : 
00046         public IEquationSinflow
00047 
00052 
00053 {
00054         
00055 public:
00066         IEquationMomentumV( 
00067                 const IString &_name,
00068                 IGrid *_grid, 
00069                 IContainerBCond *_contBCond, 
00070                 IContainerParameter *_contParam,
00071                 IFieldScalar *_pre = NULL,             //Initial Pressure Field   P
00072         IFieldVector *_vel = NULL,             //Initial Velocity Field   u e v
00073                 IFieldScalar *_T = NULL,                           //Initial Temperature
00074                 TEquationType _et = etMomV,
00075                 bool _isThermal = false,                                // bool to thermal problem
00076                 bool _isCompressible = false );                 // Compressible problem - not implemented
00077 
00078         IEquationMomentumV( IEquationMomentumV * _e );  
00079         ~IEquationMomentumV();
00080         
00084     void SetTemperature( IFieldScalar * ); 
00085 
00089         void SetTReference( double _v ){ Tref = _v; calculateTref = false; }
00090 
00095         void SetTReferenceasAverageT( bool _b ){ calculateTref = _b; }
00096         
00101         IFieldScalar * Pressure() { return pre; }
00102 
00107         void SetPressure( IFieldScalar *_pre );
00108 
00113     void SetVelocity( Vector *_v );
00114 
00118     void SetFieldVelocity( IFieldVector * );  
00119 
00121         void SetBoundaryConditions();
00122         
00124         void SetCoefficients( double );
00125         
00127         double AverageTemperature();
00128 
00133         IParamPhysical * Mi()   { return mi; }
00134 
00139         IParamPhysical * Rho()  { return rho; }
00140 
00142         void SetProblemType( bool _v ) { isThermal = _v; }
00143 
00145         bool IsThermalProblem() { return isThermal; }
00146 
00151         void SetFaceVelBCondInlet( IFieldVectorFace *_fvel, IFieldVector *_vel );
00152 
00153 
00154 protected:
00155         IParamPhysical  *mi, *rho, *g, *beta;                   
00156         IFieldScalar    *pre, *T, *T0;
00157         double Tref;
00158         bool isThermal, calculateTref, isCompressible;
00159     
00160         void SetupParameters();
00161         void SetupParametersSolidBlocks();
00162 
00163     void CalculateSourceTerm( double , int, int );
00164      
00165     double Phi( const IPoint & );
00166         double GammaPhi( const IPoint &, TDirection = diNULL );
00167 
00168         void SetBCondEdges();
00169         void SetBCondNorth();
00170         void SetBCondSouth();
00171         void SetBCondEast();
00172         void SetBCondWest();
00173 };
00174 } // csfl namespace
00175 
00176 #endif// __CSFL_MATH_EQUATION_MOMENTUM_V_H__
00177 

 

CFD Project | Documents | Downloads | Contact us | Use Terms

 

© SINMEC/EMC/UFSC, 2001.

All rights reserved.

Last Update: Jan. 18, 2002

 Webmaster