ASL 0.1.7
Advanced Simulation Library
aslFDStefanMaxwell.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 ASLFDSTEFANMAXWELL_H
25#define ASLFDSTEFANMAXWELL_H
26
27#include "aslSingleKernelNM.h"
28
29namespace acl
30{
31 class VectorOfElementsData;
32 class VectorOfElements;
33}
34
35namespace asl
36{
37 class VectorTemplate;
38 template <typename V> class DataWithGhostNodes;
39 typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
40 typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
41 class AbstractDataWithGhostNodes;
42 typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
43
45
69 {
70 public:
74
75 private:
76 std::vector<Data> cData;
77 std::vector<Data> cInternalData;
78
79 Field efPhi;
80 std::vector<Param> efCharge;
81
82 Field velocity;
83
84 const VectorTemplate* vectorTemplate;
85
86 std::vector<std::vector<Param>> diffusionCoefficients;
87 std::vector<Param> dustDiffusionCoefficients;
88
89 virtual void init0();
90 virtual void postProcessing();
91 public:
94 Data c2,
95 const acl::VectorOfElements & dC,
96 const VectorTemplate* vT);
98 unsigned int i = 0,unsigned int j = 1);
99 inline const Param & getDiffusionCoefficient(unsigned int i=0, unsigned int j=1) const;
100 inline const Param & getDustDiffusionCoefficient(unsigned int i=0) const;
101 void setDustDiffusionCoefficient(unsigned int i, const Param & dd);
103 inline const VectorTemplate* getVectorTemplate() const;
106 inline const Param & getCharge(unsigned int i) const;
107 void setCharge(unsigned int i, const Param & q);
109 inline Field getVelocity();
110 inline std::vector<Data> & getData();
111 void addComponent(Data c, const Param & dC);
112 void addComponent(Data c, const Param & dC, const Param & q);
113 };
114
115 typedef std::shared_ptr<FDStefanMaxwell> SPFDStefanMaxwell;
116
136 double diffustionCoeff,
138 const VectorTemplate* vt);
139
158 double diffustionCoeff,
159 const VectorTemplate* vt);
160
162 {
163 public:
166
167 private:
168 SPFDStefanMaxwell smSolver;
169 Data phi;
170 Data phiInternalData;
171 Field phiS;
172 const double stepFactor=1e-3;
173
174 virtual void init0();
175 virtual void postProcessing();
176 public:
178 void setPhiS(Field pS);
179 };
180
181 typedef std::shared_ptr<FDStefanMaxwellElectricField> SPFDStefanMaxwellElectricField;
182
183// ------------------------- Implementation ------------------------
184
186 {
187 return velocity;
188 }
189
190 inline std::vector<FDStefanMaxwell::Data> & FDStefanMaxwell::getData()
191 {
192 return cData;
193 }
194
196 {
197 return vectorTemplate;
198 }
199
200 inline const acl::VectorOfElements &
201 FDStefanMaxwell::getDiffusionCoefficient(unsigned int i, unsigned int j) const
202 {
203 return diffusionCoefficients[i][j];
204 }
205
206 inline const acl::VectorOfElements &
208 {
209 return dustDiffusionCoefficients[i];
210 }
211
212 inline const acl::VectorOfElements &
213 FDStefanMaxwell::getCharge(unsigned int i) const
214 {
215 return efCharge[i];
216 }
217
218
219} // asl
220#endif // ASLFDADVECTIONDIFFUSION_H
The class represents several Element.
SPAbstractDataWithGhostNodes Field
SPDataWithGhostNodesACLData Data
FDStefanMaxwellElectricField(SPFDStefanMaxwell sm, Data phi)
Numerical method which computes multicomponent transport processes.
SPAbstractDataWithGhostNodes Field
const Param & getDustDiffusionCoefficient(unsigned int i=0) const
acl::VectorOfElements Param
void addComponent(Data c, const Param &dC)
void setCharge(unsigned int i, const Param &q)
void setDiffusionCoefficient(acl::VectorOfElements d, unsigned int i=0, unsigned int j=1)
const Param & getCharge(unsigned int i) const
void addComponent(Data c, const Param &dC, const Param &q)
const Param & getDiffusionCoefficient(unsigned int i=0, unsigned int j=1) const
void setElectricField(Field phi)
std::vector< Data > & getData()
FDStefanMaxwell(Data c1, Data c2, const acl::VectorOfElements &dC, const VectorTemplate *vT)
SPDataWithGhostNodesACLData Data
const VectorTemplate * getVectorTemplate() const
void setDustDiffusionCoefficient(unsigned int i, const Param &dd)
void setVectorTemplate(VectorTemplate *vT)
Field getElectricField() const
void setVelocity(Field v)
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
SPFDStefanMaxwell generateFDStefanMaxwell(SPDataWithGhostNodesACLData c1, SPDataWithGhostNodesACLData c2, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt)
Advanced Computational Language.
Definition: acl.h:41
Advanced Simulation Library.
Definition: aslDataInc.h:31
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:46
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:51
std::shared_ptr< FDStefanMaxwellElectricField > SPFDStefanMaxwellElectricField
std::shared_ptr< FDStefanMaxwell > SPFDStefanMaxwell
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47