76 void load(
int argc,
char * argv[]);
83 appParamsManager(
"multicomponent_flow",
"0.1"),
85 dx(0.0005,
"dx",
"space step"),
86 dt(1.,
"dt",
"time step"),
87 tSimulation(2e-3,
"simulation_time",
"simulation time"),
88 tOutput(1e-4,
"output_interval",
"output interval"),
89 nu(4e-8/1.6,
"nu",
"viscosity"),
90 tubeL(0.25,
"tubeL",
"tube's length"),
91 tubeD(0.05,
"tubeD",
"tube's diameter"),
92 pumpL(0.025,
"pumpL",
"pump's length"),
93 pumpD(0.03,
"pumpD",
"pump's diameter"),
94 component1InVel(0.16,
"component1_in_velocity",
"flow velocity in the component1 input"),
95 component2InVel(0.08,
"component2_in_velocity",
"flow velocity in the component2 input"),
96 component3InVel(0.1,
"component3_in_velocity",
"flow velocity in the component3 input")
117 void Parameters::init()
135 orientation[1] = 1.0;
136 orientation[2] = 0.0;
137 center[2] = params.
pumpD.
v() * 1.5;
139 orientation, center);
145 int main(
int argc,
char *argv[])
148 params.
load(argc, argv);
150 cout <<
"Data initialization..." << endl;
154 auto mcfMapMem(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
157 auto component1Frac(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
159 auto component3Frac(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
163 cout <<
"Finished" << endl;
165 cout <<
"Numerics initialization..." << endl;
177 auto flowVel(lbgk->getVelocity());
179 flowVel, templ,
true));
180 nmcomponent1->init();
183 nmcomponent3->init();
185 std::vector<asl::SPNumMethod> bc;
186 std::vector<asl::SPNumMethod> bcV;
187 std::vector<asl::SPNumMethod> bcDif;
215 cout <<
"Finished" << endl;
216 cout <<
"Computing..." << endl;
221 writer.
addScalars(
"component1", *component1Frac);
222 writer.
addScalars(
"component3", *component3Frac);
233 for (
unsigned int i(1); i < 10001; ++i)
237 nmcomponent1->execute();
238 nmcomponent3->execute();
244 cout << i <<
"/10000; time left (estimated): " << timer.
estimatedRemainder(
double(i)/10000.) << endl;
252 cout <<
"Finished" << endl;
254 cout <<
"Computation statistic:" << endl;
255 cout <<
"Real Time = " << timer.
realTime() <<
"; Processor Time = "
asl::Parameter< double > pumpD
asl::Parameter< double > tubeL
asl::Parameter< double > component1InVel
asl::Parameter< double > tubeD
asl::Parameter< double > component3InVel
asl::Parameter< double > dt
asl::Parameter< double > tOutput
asl::Parameter< double > pumpL
asl::UValue< double > nuNum
asl::Parameter< double > tSimulation
asl::Parameter< double > nu
asl::Parameter< double > dx
asl::ApplicationParametersManager appParamsManager
asl::Parameter< double > component2InVel
void load(int argc, char *argv[])
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
const double estimatedRemainder(double completeness)
Returns estimated time till finishing current task based on its current completeness [0....
void addVector(std::string name, AbstractData &data)
void addScalars(std::string name, AbstractData &data)
acl::VectorOfElements dx(const TemplateVE &a)
differential operator
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
SPBCond generateBCConstantGradient(SPAbstractDataWithGhostNodes d, double v, const VectorTemplate *const t, const std::vector< SlicesNames > &sl)
Bondary condition that makes fixed gradient <>
SPBCond generateBCConstantValue(SPAbstractDataWithGhostNodes d, double v, const std::vector< SlicesNames > &sl)
Bondary condition that puts fixed value in each point.
SPDistanceFunction generateDFInBlock(const Block &b, unsigned int nG)
generates map corresponding to external (ghost) part of the block
SPDistanceFunction normalize(SPDistanceFunction a, double dx)
SPDistanceFunction generateDFCylinderInf(double r, const AVec< double > &l, const AVec< double > &c)
generates infinite cylinder
std::shared_ptr< DistanceFunction > SPDistanceFunction
SPFDAdvectionDiffusion generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
const VectorTemplate & d3q15()
Vector template.
SPBCond generateBCConstantPressure(SPLBGK nm, double p, const std::vector< SlicesNames > &sl)
SPNumMethod generateBCNoSlipVel(SPLBGK nmU, SPAbstractDataWithGhostNodes map)
SPBCond generateBCConstantPressureVelocity(SPLBGK nm, double p, AVec<> v, const std::vector< SlicesNames > &sl)
SPBCond generateBCNoSlip(SPLBGK nm, const std::vector< SlicesNames > &sl)
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
int main(int argc, char *argv[])
asl::SPDistanceFunction generateMixer(asl::Block &block, Parameters ¶ms)
std::shared_ptr< LBGKUtilities > SPLBGKUtilities
void initAll(std::vector< T * > &v)
std::shared_ptr< LBGK > SPLBGK
void initData(SPAbstractData d, double a)
void executeAll(std::vector< T * > &v)