FaceFluxWithoutGravity Class Reference

#include <facefluxwithoutgravity.h>

Inheritance diagram for FaceFluxWithoutGravity:
Inheritance graph
[legend]
Collaboration diagram for FaceFluxWithoutGravity:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FaceFluxWithoutGravity (OrthoMesh &mesh, Function1D &fMobW, Function1D &DfMobW)
virtual ~FaceFluxWithoutGravity ()
virtual double fluxAtFace (OrthoMesh::Face_It &faceIt, int face, int cell1, int cell2, double u1, double u2)
virtual void updateDynamicData (DynamicBase &dynMod)
virtual void maxGlobalCharVelocity (double vel[3])
virtual double maxLocalCharVelocity (OrthoMesh::Face_It &faceIt, int face, int cell1, int cell2, double u1, double u2)
virtual double exactFluxAtFace (OrthoMesh::Face_It &faceIt, int face, int cell1, int cell2, double ul, double ur)

Private Attributes

OrthoMeshm_mesh
Function1Dm_fMobW
Function1Dm_DfMobW
VecDouble m_Vn

Detailed Description

Definition at line 10 of file facefluxwithoutgravity.h.


Constructor & Destructor Documentation

FaceFluxWithoutGravity::FaceFluxWithoutGravity ( OrthoMesh mesh,
Function1D fMobW,
Function1D DfMobW 
)

Definition at line 3 of file facefluxwithoutgravity.cpp.

00004   :FaceFluxFunction(1),m_mesh(mesh),m_fMobW(fMobW),m_DfMobW(DfMobW),m_Vn(mesh.numFaces())
00005 {
00006 
00007 }

virtual FaceFluxWithoutGravity::~FaceFluxWithoutGravity (  )  [inline, virtual]

Definition at line 19 of file facefluxwithoutgravity.h.

00019 {}


Member Function Documentation

double FaceFluxWithoutGravity::exactFluxAtFace ( OrthoMesh::Face_It faceIt,
int  face,
int  cell1,
int  cell2,
double  ul,
double  ur 
) [virtual]

Definition at line 58 of file facefluxwithoutgravity.cpp.

00059 {
00060   assert( (unsigned) face < m_Vn.size());
00061 
00062   
00063      
00064   double v = m_Vn(face);
00065   double fMin,fMax;
00066 
00067   if (v > 0)
00068   {
00069     if (ul > ur)
00070     {
00071       m_fMobW.getMinMaxValues(ur,ul,fMin,fMax);
00072       return fMax*v;
00073     }
00074     else 
00075     {
00076       m_fMobW.getMinMaxValues(ul,ur,fMin,fMax);
00077       return fMin*v;
00078     }
00079 
00080   }
00081   else
00082   {
00083     if (ul > ur)
00084     {
00085       m_fMobW.getMinMaxValues(ur,ul,fMin,fMax);
00086       return fMin*v;
00087     }
00088     else 
00089     {
00090       m_fMobW.getMinMaxValues(ul,ur,fMin,fMax);
00091       return fMax*v;
00092     }
00093   }
00094 
00095 }

double FaceFluxWithoutGravity::fluxAtFace ( OrthoMesh::Face_It faceIt,
int  face,
int  cell1,
int  cell2,
double  u1,
double  u2 
) [virtual]

This method compute the flux at a face using the values of u1 and u2 located in the two cells that share the face.

Parameters:
faceIt The face iteratator of the OrthoMesh.
face Index of the face iterator.
cell1 Index of the cell that contains the face
cell2 Index of the second cell that contains the face
u1 Value of the numeric solution for cell1
u2 Value of the numeric solution for cell2
Returns:
The flux at face

Definition at line 22 of file facefluxwithoutgravity.cpp.

00023 {
00024   return (m_fMobW(u1) + m_fMobW(u2))/2.0*(m_Vn(face));
00025 
00026 }

void FaceFluxWithoutGravity::maxGlobalCharVelocity ( double  vel[3]  )  [virtual]

Reimplemented from FaceFluxFunction.

Definition at line 30 of file facefluxwithoutgravity.cpp.

00031 {
00032   static VecDouble normalVel(3);
00033   m_mesh.getMaxAbsVelocitiesInFacesByComponents(normalVel,m_Vn);
00034   vel[X]= normalVel(X)*m_DfMobW.getMaxNorm(0,1);
00035   vel[Y]= normalVel(Y)*m_DfMobW.getMaxNorm(0,1);
00036   vel[Z]= normalVel(Z)*m_DfMobW.getMaxNorm(0,1);
00037 
00038   
00039 }

double FaceFluxWithoutGravity::maxLocalCharVelocity ( OrthoMesh::Face_It faceIt,
int  face,
int  cell1,
int  cell2,
double  u1,
double  u2 
) [virtual]

Definition at line 43 of file facefluxwithoutgravity.cpp.

00044 {
00045   if (u1 > u2)
00046     std::swap(u1,u2);
00047   return  m_Vn(face)*m_DfMobW.getMaxNorm(u1,u2);
00048 }

void FaceFluxWithoutGravity::updateDynamicData ( DynamicBase dynMod  )  [virtual]

Reimplemented from FaceFluxFunction.

Definition at line 51 of file facefluxwithoutgravity.cpp.

00052 {
00053     dynMod.getNormalVelocityAtFaces(m_Vn);
00054 
00055 }


Member Data Documentation

Definition at line 14 of file facefluxwithoutgravity.h.

Definition at line 14 of file facefluxwithoutgravity.h.

Definition at line 13 of file facefluxwithoutgravity.h.

Definition at line 15 of file facefluxwithoutgravity.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:05 2012 for CO2INJECTION by  doxygen 1.6.3