#include <utilities/aslParametersManager.h>
#include <aslDataInc.h>
#include <math/aslTemplates.h>
#include <aslGeomInc.h>
#include <acl/aclGenerators.h>
#include <writers/aslVTKFormatWriters.h>
#include <num/aslLBGK.h>
#include <num/aslLBGKBC.h>
#include <utilities/aslTimer.h>
#include <acl/aclUtilities.h>
{
double r(2.);
double spacing(4.);
for (
int i = 0; i < block.
getSize()[0] / (2 * r + spacing); ++i)
{
for (
int j = 0; j < block.
getSize()[1] / (2 * r + spacing); ++j)
{
resultGeometry = resultGeometry | cylinder;
}
}
return resultGeometry;
}
int main(
int argc,
char* argv[])
{
"1.0");
appParamsManager.load(argc, argv);
auto gSize(
dx.v()*AVec<>(size));
std::cout << "Flow: Data initialization...";
auto cylindersMapMem(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
std::cout << "Finished" << endl;
std::cout << "Flow: Numerics initialization...";
lbgk->init();
bcNoSlip->init();
bcNoSlipM->init();
bcNoSlipV->init();
bcIn.init();
bcOut.init();
std::cout << "Finished" << endl;
std::cout << "Computing...";
writer.addScalars("map", *cylindersMapMem);
writer.addScalars("rho", *lbgk->getRho());
writer.addVector("v", *lbgk->getVelocity());
bcIn.execute();
bcOut.execute();
bcNoSlip->execute();
bcNoSlipM->execute();
bcNoSlipV->execute();
writer.write();
for (unsigned int i(0); i < 1000; ++i)
{
lbgk->execute();
bcIn.execute();
bcOut.execute();
bcNoSlip->execute();
bcNoSlipM->execute();
if (!(i%100))
{
cout << i << endl;
bcNoSlipV->execute();
writer.write();
}
}
cout << "Finished" << endl;
cout << "Computation statistic:" << endl;
cout <<
"Real Time = " << timer.
realTime() <<
"; Processor Time = "
return 0;
}
Bondary condition corresponding an in- or outflow boundary conditions with a given pressure.
const DV & getSize() const
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
int main(int argc, char *argv[])
asl::UValue< double > Param
asl::SPDistanceFunction generateOrderedCylinders(asl::Block &block)
acl::VectorOfElements dx(const TemplateVE &a)
differential operator
SPDistanceFunction generateDFCylinderInf(double r, const AVec< double > &l, const AVec< double > &c)
generates infinite cylinder
std::shared_ptr< DistanceFunction > SPDistanceFunction
const VectorTemplate & d3q15()
Vector template.
SPNumMethod generateBCNoSlipVel(SPLBGK nmU, SPAbstractDataWithGhostNodes map)
SPBCond generateBCNoSlip(SPLBGK nm, const std::vector< SlicesNames > &sl)
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
std::shared_ptr< LBGK > SPLBGK
void initData(SPAbstractData d, double a)
std::shared_ptr< LBGKUtilities > SPLBGKUtilities