Memosa-FVM  0.2
FlowModel.h
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #ifndef _FLOWMODEL_H_
6 #define _FLOWMODEL_H_
7 
8 #include "Model.h"
9 
10 #include "GeomFields.h"
11 #include "FlowFields.h"
12 
13 #include "Mesh.h"
14 #include "LinearSolver.h"
15 
16 #include "FlowBC.h"
17 
18 template<class T>
19 class FlowModel : public Model
20 {
21 public:
22 
23  typedef std::map<int,FlowBC<T>*> FlowBCMap;
24  typedef std::map<int,FlowVC<T>*> FlowVCMap;
25 
26  class Impl;
27 
28 
29  FlowModel(const GeomFields& geomFields,
30  FlowFields& thermalFields, const MeshList& meshes);
31 
32  virtual ~FlowModel();
33 
34  virtual void init();
35 
36  virtual map<string,shared_ptr<ArrayBase> >&
38 
39  virtual void restart();
40 
43 
45 
46  void printBCs();
47 
48  // do the specified number of iterations, return true if converged
49  bool advance(const int niter);
50 
51 #ifdef PV_COUPLED
52  bool advanceCoupled(const int niter);
53 #endif
54 
55  void updateTime();
56 
57  Vector<T,3> getPressureIntegral(const Mesh& mesh, const int faceGroupID);
58  Vector<T,3> getMomentumFluxIntegral(const Mesh& mesh, const int faceGroupID);
60 
61 
64  void getTraction(const Mesh& mesh);
65 
66  boost::shared_ptr<ArrayBase> getStressTensor(const Mesh& mesh, const ArrayBase& cellIds);
67 
68 
72 
73  void computeIBFaceVelocity(const StorageSite& particles);
74  void computeSolidSurfaceForce(const StorageSite& particles);
75  void computeSolidSurfaceForcePerUnitArea(const StorageSite& particles);
76  void ComputeStressTensorES(const StorageSite& particles);
77 
78 #if !(defined(USING_ATYPE_TANGENT) || defined(USING_ATYPE_PC))
79 
80  void dumpContinuityMatrix(const string fileBase);
81 
82 #endif
83 
84 private:
85  shared_ptr<Impl> _impl;
86 };
87 
88 #endif
89 
virtual map< string, shared_ptr< ArrayBase > > & getPersistenceData()
void getTraction(const Mesh &mesh)
Vector< T, 3 > getPressureIntegralonIBFaces(const Mesh &mesh)
virtual void restart()
void printBCs()
Definition: Mesh.h:49
FlowModelOptions< T > & getOptions()
virtual ~FlowModel()
Vector< T, 3 > getPressureIntegral(const Mesh &mesh, const int faceGroupID)
FlowModel(const GeomFields &geomFields, FlowFields &thermalFields, const MeshList &meshes)
void ComputeStressTensorES(const StorageSite &particles)
void printPressureIntegrals()
virtual void init()
FlowVCMap & getVCMap()
bool advance(const int niter)
Vector< T, 3 > getMomentumFluxIntegral(const Mesh &mesh, const int faceGroupID)
boost::shared_ptr< ArrayBase > getStressTensor(const Mesh &mesh, const ArrayBase &cellIds)
void updateTime()
shared_ptr< Impl > _impl
Definition: FlowModel.h:85
Definition: Model.h:13
void computeSolidSurfaceForcePerUnitArea(const StorageSite &particles)
void computeSolidSurfaceForce(const StorageSite &particles)
std::map< int, FlowBC< T > * > FlowBCMap
Definition: FlowModel.h:23
void computeIBFaceVelocity(const StorageSite &particles)
FlowBCMap & getBCMap()
void printMassFluxIntegrals()
Vector< T, 3 > getMomentumDerivativeIntegral(const Mesh &mesh)
Vector< T, 3 > getMomentumFluxIntegralonIBFaces(const Mesh &mesh)
void dumpContinuityMatrix(const string fileBase)
void printMomentumFluxIntegrals()
vector< Mesh * > MeshList
Definition: Mesh.h:439
std::map< int, FlowVC< T > * > FlowVCMap
Definition: FlowModel.h:24