ASL  0.1.7
Advanced Simulation Library
aslFDMultiPhase.h
Go to the documentation of this file.
1 /*
2  * Advanced Simulation Library <http://asl.org.il>
3  *
4  * Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5  *
6  *
7  * This file is part of Advanced Simulation Library (ASL).
8  *
9  * ASL is free software: you can redistribute it and/or modify it
10  * under the terms of the GNU Affero General Public License as
11  * published by the Free Software Foundation, version 3 of the License.
12  *
13  * ASL is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Affero General Public License for more details.
17  *
18  * You should have received a copy of the GNU Affero General Public License
19  * along with ASL. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 
24 #ifndef ASLFDMULTIPHASE_H
25 #define ASLFDMULTIPHASE_H
26 
27 #include "aslSingleKernelNM.h"
29 
30 namespace acl
31 {
32  class VectorOfElementsData;
33  class VectorOfElements;
34 }
35 
36 namespace asl
37 {
38  class VectorTemplate;
39  template <typename V> class DataWithGhostNodes;
40  typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
41  typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
42  class AbstractDataWithGhostNodes;
43  typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
44 
46 
59  {
60  public:
63 
64  private:
65  std::vector<Data> cData;
66  std::vector<Data> cInternalData;
67 
68  Field velocity;
69  bool compressibilityCorrectionFlag;
70 
71  const VectorTemplate* vectorTemplate;
72 
73  int t;
74  acl::VectorOfElements diffusionCoefficient;
75  acl::VectorOfElements repulsionConstant;
76 
77  virtual void init0();
78  virtual void postProcessing();
79  public:
80  FDMultiPhase();
81  FDMultiPhase(Data c,
82  const acl::VectorOfElements & dC,
83  const acl::VectorOfElements & rC,
84  const VectorTemplate* vT);
86  inline const acl::VectorOfElements & getDiffusionCoefficient() const;
88  inline const acl::VectorOfElements & getRepulsionConstant() const;
90  inline const VectorTemplate* getVectorTemplate() const;
91  void setVelocity(Field v, bool compressibilityCorrection=false);
92  inline Field getVelocity();
93  inline std::vector<Data> & getData();
94  void addComponent(Data c);
95  };
96 
97  typedef std::shared_ptr<FDMultiPhase> SPFDMultiPhase;
98 
112  const VectorTemplate* vt,
113  bool compressibilityCorrection = false);
114 
126  double diffustionCoeff,
127  const VectorTemplate* vt);
128 
129 // ------------------------- Implementation ------------------------
130 
132  {
133  return velocity;
134  }
135 
136  inline std::vector<FDMultiPhase::Data> & FDMultiPhase::getData()
137  {
138  return cData;
139  }
140 
142  {
143  return vectorTemplate;
144  }
145 
146  inline const acl::VectorOfElements &
148  {
149  return diffusionCoefficient;
150  }
151 
152 } // asl
153 #endif // ASLFDMULTIPHASE_H
const acl::VectorOfElements & getRepulsionConstant() const
void setVelocity(Field v, bool compressibilityCorrection=false)
void setDiffusionCoefficient(acl::VectorOfElements d)
SPFDMultiPhase generateFDMultiPhase(SPDataWithGhostNodesACLData c, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
Advanced Simulation Library.
Definition: aslDataInc.h:30
Advanced Computational Language.
Definition: acl.h:40
void setVectorTemplate(VectorTemplate *vT)
void setRepulsionConstant(acl::VectorOfElements d)
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
const acl::VectorOfElements & getDiffusionCoefficient() const
const VectorTemplate * getVectorTemplate() const
std::shared_ptr< FDMultiPhase > SPFDMultiPhase
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
std::vector< Data > & getData()
SPFDAdvectionDiffusion generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
The class represents several Element.
SPDataWithGhostNodesACLData Data
void addComponent(Data c)
Numerical method which computes multiphase transport processes.
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
Defines set of vectros with several properties.
Definition: aslTemplates.h:87
SPAbstractDataWithGhostNodes Field