77 void load(
int argc,
char * argv[]);
84 appParamsManager(
"pitot_tube_ice",
"0.1"),
86 dx(0.000125,
"dx",
"space step"),
87 dt(1.,
"dt",
"time step"),
88 tSimulation(2e-3,
"simulation_time",
"simulation time"),
89 tOutput(1e-4,
"output_interval",
"output interval"),
90 nu(6.25e-10/4.,
"nu",
"viscosity"),
91 rIn(0.0015,
"r_in",
"Internal radius, m"),
92 rEx(0.005,
"r_ex",
"External radius, m"),
93 lCyl(0.002,
"l_cyl",
"Length of cylindric part, m"),
94 lCone(0.02,
"l_cone",
"Length of conic part, m"),
95 temperature(253,
"temperature",
"temperature, K"),
96 humidity(.5,
"humidity",
"relative humidity, K"),
97 flowVel(0.08,
"flow_vel",
"flow velocity")
119void Parameters::init()
133 auto centerCyl(center);
134 centerCyl[0] = params.
lCyl.
v()*.45;
135 auto centerHole(centerCyl+(params.
lCone.
v()*.6)*orientation);
138 auto apexCone(centerCyl+orientation*(params.
lCyl.
v()*.49+params.
lCone.
v()));
140 tubeGeometry = ((generateDFCylinder(params.
rEx.
v(), orientation*params.
lCyl.
v(), centerCyl) |
141 generateDFCone(params.
rEx.
v()*.98, -orientation*params.
lCone.
v(), apexCone)) &
142 -generateDFCylinder(params.
rIn.
v(), orientation*lHole, centerHole)) &
143 generateDFPlane(orientation, apexCone-orientation*params.
lCone.
v()*.5);
148int main(
int argc,
char *argv[])
151 params.
load(argc, argv);
153 std::cout <<
"Data initialization...";
164 std::cout <<
"Finished" << endl;
166 std::cout <<
"Flow: Numerics initialization...";
178 auto flowVel(lbgk->getVelocity());
182 std::vector<asl::SPNumMethod> bc;
183 std::vector<asl::SPNumMethod> bcV;
184 std::vector<asl::SPNumMethod> bcDif;
186 bc.push_back(generateBCNoSlip(lbgk, mcfMapMem));
187 bc.push_back(generateBCConstantPressure(lbgk,1.,{
asl::ZE}));
188 bc.push_back(generateBCConstantPressureVelocity(lbgk, 1.,
190 {asl::X0,asl::XE,asl::Y0,asl::YE,asl::Z0,asl::ZE}));
192 bcDif.push_back(generateBCNoSlipVel(lbgk, mcfMapMem));
193 bcV.push_back(generateBCNoSlipRho(lbgk, mcfMapMem));
202 std::cout <<
"Finished" << endl;
203 std::cout <<
"Computing..." << endl;
219 for(
unsigned int i(1); i < 8001; ++i)
229 cout << i <<
"/8000; time left (estimated): " << timer.
estimatedRemainder(
double(i)/8000.) << endl;
237 cout <<
"Finished" << endl;
239 cout <<
"Computation statistic:" << endl;
240 cout <<
"Real Time = " << timer.
realTime() <<
"; Processor Time = "
asl::Parameter< double > lCone
asl::Parameter< double > tOutput
asl::Parameter< double > humidity
asl::UValue< double > nuNum
asl::Parameter< double > lCyl
asl::Parameter< double > tSimulation
asl::Parameter< double > nu
asl::Parameter< double > rEx
asl::Parameter< double > flowVel
asl::Parameter< double > dx
asl::Parameter< double > rIn
asl::ApplicationParametersManager appParamsManager
asl::Parameter< double > temperature
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....
Updatable value. This class stores value and its TimeStamp.
void addVector(std::string name, AbstractData &data)
void addScalars(std::string name, AbstractData &data)
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
SPDistanceFunction normalize(SPDistanceFunction a, double dx)
std::shared_ptr< DistanceFunction > SPDistanceFunction
const VectorTemplate & d3q15()
Vector template.
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)
asl::SPDistanceFunction generateGeometry(asl::Block &block, Parameters ¶ms)
asl::UValue< double > Param