55 vector<AVec<>> rect({.5*makeAVec( .866*a,-b,-a*.5),.5*makeAVec(-.866*a,-b, a*.5),
56 .5*makeAVec(-.866*a, b, a*.5),.5*makeAVec( .866*a, b,-a*.5)});
57 vector<AVec<>> r1(rect.size());
58 vector<AVec<>> r2(rect.size());
59 auto r1C(makeAVec(x,y+rCyl*.5+b*.5,hCyl));
60 auto r2C(makeAVec(x,y-rCyl*.5-b*.5,hCyl));
61 for(
unsigned int i(0); i<rect.size();++i)
69 generateDFPlane(makeAVec(.5,0.,.866), r1C + makeAVec(rCyl,0.,0.)) &
70 generateDFPlane(makeAVec(-.5,0.,-.866), r1C - makeAVec(rCyl,0.,0.))) |
71 generateDFCylinder(rCyl, makeAVec(0.,0.,hCyl), makeAVec(x,y,hCyl*.5));
77 vector<double> xValues;
78 vector<double> yValues;
80 for(
unsigned int i(0); i < 8; ++i)
81 for(
unsigned int j(0); j < 10; ++j)
83 xValues.push_back(25.+ 20.*i);
84 yValues.push_back(25.+ 15.*j);
88 for(
unsigned int i(1); i < xValues.size(); ++i)
95int main(
int argc,
char* argv[])
101 appParamsManager.
load(argc, argv);
107 Param nuNum(nu.
v()*dt.
v()/dx.v()/dx.v());
113 std::cout <<
"Data initialization... ";
117 auto mirrorsMapMem(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
120 std::cout <<
"Finished" << endl;
122 std::cout <<
"Numerics initialization... ";
134 auto bcNoSlipM(generateBCNoSlip(lbgk, mirrorsMapMem));
135 auto bcNoSlipV(generateBCNoSlipVel(lbgk, mirrorsMapMem));
145 std::cout <<
"Finished" << endl;
146 std::cout <<
"Computing...";
152 writer.
addVector(
"v", *lbgk->getVelocity());
159 bcNoSlipM->execute();
161 bcNoSlipV->execute();
165 for (
unsigned int i(0); i < 1000 ; ++i)
171 bcNoSlipM->execute();
175 bcNoSlipV->execute();
182 cout <<
"Finished" << endl;
184 cout <<
"Computation statistic:" << endl;
185 cout <<
"Real Time = " << timer.
realTime() <<
"; Processor Time = "
void load(int argc, char *argv[])
Numerical method for fluid flow.
contains different kernels for preprocessing and posprocessing of data used by LBGK
const double realTime() const
const double processorTime() const
const double processorLoad() const
Updatable value. This class stores value and its TimeStamp.
void addVector(std::string name, AbstractData &data)
void addScalars(std::string name, AbstractData &data)
asl::SPDistanceFunction generateMirrors()
asl::UValue< double > Param
asl::SPDistanceFunction generateMirror(double x, double y)
SPDistanceFunction generateDFConvexPolygonPrism(std::vector< AVec< double > > points)
generates infinite prism with convex polygon at its base
std::shared_ptr< DistanceFunction > SPDistanceFunction
const VectorTemplate & d3q15()
Vector template.
SPBCond generateBCConstantVelocity(SPLBGK nm, AVec<> v, const std::vector< SlicesNames > &sl)
SPBCond generateBCConstantPressure(SPLBGK nm, double p, const std::vector< SlicesNames > &sl)
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
std::shared_ptr< LBGKUtilities > SPLBGKUtilities
std::shared_ptr< LBGK > SPLBGK
void initData(SPAbstractData d, double a)