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

momentum_u.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_U_H__
00030 #define __CSFL_MATH_EQUATION_MOMENTUM_U_H__
00031 
00032 
00033 // Include
00034 #include <csfl/math/equation/sinflow.h>
00035 
00036 
00037 // Namespace
00038 namespace csfl {
00039 
00040 //==============================================================================
00041 //              Class IEquationMomentumU
00042 //              Description: Class for Sinflow's Momentum Equation
00043 //==============================================================================
00044 
00045 class IEquationMomentumU : 
00046         public IEquationSinflow
00047 
00052 {
00053         
00054 public:
00062         IEquationMomentumU( 
00063                 const IString & _name,
00064                 IGrid *_grid, 
00065                 IContainerBCond *_contBCond, 
00066                 IContainerParameter *_contParam,
00067                 IFieldScalar *_pre = NULL,             //Initial Pressure Field   P
00068         IFieldVector *_vel = NULL,             //Initial Velocity Field   u & v
00069                 TEquationType _et = etMomU );
00070 
00071         IEquationMomentumU( IEquationMomentumU *_e );   
00072         ~IEquationMomentumU();
00073         
00078         IFieldScalar * Pressure() { return pre; } 
00079         
00084         void SetPressure( IFieldScalar *_pre );
00085 
00090     void SetVelocity( Vector *_v );
00091 
00095     void SetFieldVelocity( IFieldVector *_v );  
00096 
00100         void SetBoundaryConditions();
00101 
00105         void SetCoefficients( double _timestep );
00106 
00111         inline IParamPhysical * Mi()   { return mi; }
00112 
00117         inline IParamPhysical * Rho()  { return rho; }
00118 
00123         void SetFaceVelBCondInlet( IFieldVectorFace *_fvel, IFieldVector *_vel );
00124 
00125 
00126 protected:
00127         IParamPhysical  *mi, *rho;      
00128         IFieldScalar    *pre;       
00129 
00130         void SetupParameters();
00131         void SetupParametersSolidBlocks();
00132 
00133     void CalculateSourceTerm( double, int, int );
00134 
00135     double Phi( const IPoint & );
00136         double GammaPhi( const IPoint &, TDirection = diNULL );
00137                                 
00138         void SetBCondEdges();
00139         void SetBCondNorth();
00140         void SetBCondSouth();
00141         void SetBCondEast();
00142         void SetBCondWest();
00143 
00144 };
00145 } // csfl namespace
00146 
00147 #endif// __CSFL_MATH_EQUATION_MOMENTUM_U_H__
00148 

 

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

 

© SINMEC/EMC/UFSC, 2001.

All rights reserved.

Last Update: Jan. 18, 2002

 Webmaster