ASL
0.1.7
Advanced Simulation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
num
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
"
28
#include "
acl/aclMath/aclVectorOfElementsDef.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
58
class
FDMultiPhase
:
public
SingleKernelNM
59
{
60
public
:
61
typedef
SPDataWithGhostNodesACLData
Data
;
62
typedef
SPAbstractDataWithGhostNodes
Field
;
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);
85
void
setDiffusionCoefficient
(
acl::VectorOfElements
d);
86
inline
const
acl::VectorOfElements
&
getDiffusionCoefficient
()
const
;
87
void
setRepulsionConstant
(
acl::VectorOfElements
d);
88
inline
const
acl::VectorOfElements
&
getRepulsionConstant
()
const
;
89
void
setVectorTemplate
(
VectorTemplate
* vT);
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
110
SPFDMultiPhase
generateFDMultiPhase
(
SPDataWithGhostNodesACLData
c,
111
SPAbstractDataWithGhostNodes
v,
112
const
VectorTemplate
* vt,
113
bool
compressibilityCorrection =
false
);
114
125
SPFDMultiPhase
generateFDAdvectionDiffusion
(
SPDataWithGhostNodesACLData
c,
126
double
diffustionCoeff,
127
const
VectorTemplate
* vt);
128
129
// ------------------------- Implementation ------------------------
130
131
inline
FDMultiPhase::Field
FDMultiPhase::getVelocity
()
132
{
133
return
velocity;
134
}
135
136
inline
std::vector<FDMultiPhase::Data> &
FDMultiPhase::getData
()
137
{
138
return
cData;
139
}
140
141
inline
const
VectorTemplate
*
FDMultiPhase::getVectorTemplate
()
const
142
{
143
return
vectorTemplate;
144
}
145
146
inline
const
acl::VectorOfElements
&
147
FDMultiPhase::getDiffusionCoefficient
()
const
148
{
149
return
diffusionCoefficient;
150
}
151
152
}
// asl
153
#endif
// ASLFDMULTIPHASE_H
aclVectorOfElementsDef.h
aslSingleKernelNM.h
acl::VectorOfElementsData
The class represents several ElementData.
Definition
aclVectorOfElementsDef.h:57
acl::VectorOfElements
The class represents several Element.
Definition
aclVectorOfElementsDef.h:92
asl::AbstractDataWithGhostNodes
Definition
aslDataWithGhostNodes.h:39
asl::DataWithGhostNodes
Definition
aslDataWithGhostNodes.h:58
asl::FDMultiPhase::getRepulsionConstant
const acl::VectorOfElements & getRepulsionConstant() const
asl::FDMultiPhase::getDiffusionCoefficient
const acl::VectorOfElements & getDiffusionCoefficient() const
Definition
aslFDMultiPhase.h:147
asl::FDMultiPhase::getVectorTemplate
const VectorTemplate * getVectorTemplate() const
Definition
aslFDMultiPhase.h:141
asl::FDMultiPhase::setVectorTemplate
void setVectorTemplate(VectorTemplate *vT)
asl::FDMultiPhase::FDMultiPhase
FDMultiPhase(Data c, const acl::VectorOfElements &dC, const acl::VectorOfElements &rC, const VectorTemplate *vT)
asl::FDMultiPhase::addComponent
void addComponent(Data c)
asl::FDMultiPhase::FDMultiPhase
FDMultiPhase()
asl::FDMultiPhase::Field
SPAbstractDataWithGhostNodes Field
Definition
aslFDMultiPhase.h:62
asl::FDMultiPhase::setDiffusionCoefficient
void setDiffusionCoefficient(acl::VectorOfElements d)
asl::FDMultiPhase::setVelocity
void setVelocity(Field v, bool compressibilityCorrection=false)
asl::FDMultiPhase::getVelocity
Field getVelocity()
Definition
aslFDMultiPhase.h:131
asl::FDMultiPhase::Data
SPDataWithGhostNodesACLData Data
Definition
aslFDMultiPhase.h:61
asl::FDMultiPhase::setRepulsionConstant
void setRepulsionConstant(acl::VectorOfElements d)
asl::FDMultiPhase::getData
std::vector< Data > & getData()
Definition
aslFDMultiPhase.h:136
asl::SingleKernelNM::SingleKernelNM
SingleKernelNM(const acl::KernelConfiguration &kernelCongig)
asl::SingleKernelNM::postProcessing
virtual void postProcessing()
the function executed after kernel->compute()
asl::SingleKernelNM::init0
virtual void init0()=0
full initialisation but without kernel->setup()
asl::VectorTemplate
Defines set of vectros with several properties.
Definition
aslTemplates.h:88
asl::generateFDAdvectionDiffusion
SPFDAdvectionDiffusion generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
asl::generateFDMultiPhase
SPFDMultiPhase generateFDMultiPhase(SPDataWithGhostNodesACLData c, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
acl
Advanced Computational Language.
Definition
acl.h:41
asl
Advanced Simulation Library.
Definition
aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition
aslGenerators.h:46
asl::SPFDMultiPhase
std::shared_ptr< FDMultiPhase > SPFDMultiPhase
Definition
aslFDMultiPhase.h:97
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition
aslGenerators.h:51
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition
aslGenerators.h:47
Generated by
1.17.0