79 void load(
int argc,
char * argv[]);
87 appParamsManager(
"multiphase_flow",
"0.1"),
89 dx(0.002,
"dx",
"space step"),
90 dt(1.,
"dt",
"time step"),
91 tSimulation(2e-3,
"simulation_time",
"simulation time"),
92 tOutput(1e-4,
"output_interval",
"output interval"),
93 nu(4e-8,
"nu",
"viscosity"),
94 tubeL(0.5,
"tubeL",
"tube's length"),
95 tubeD(0.05,
"tubeD",
"tube's diameter"),
96 pumpL(0.025,
"pumpL",
"pump's length"),
97 pumpD(0.03,
"pumpD",
"pump's diameter"),
98 oilInVel(0.02,
"oil_in_velocity",
"flow velocity in the oil input"),
99 waterInVel(0.04,
"water_in_velocity",
"flow velocity in the water input"),
100 gasInVel(0.03,
"gas_in_velocity",
"flow velocity in the gas input")
128void Parameters::init()
143 mixerGeometry = generateDFCylinderInf(params.
tubeD.
v() / 2., orientation, center);
145 orientation[1] = 1.0;
146 orientation[2] = 0.0;
147 center[2]=params.
pumpD.
v() * 1.5;
148 mixerGeometry = mixerGeometry | generateDFCylinderInf(params.
pumpD.
v() / 2., orientation, center);
153int main(
int argc,
char *argv[])
156 params.
load(argc, argv);
158 std::cout <<
"Data initialization...";
162 auto mpfMapMem(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
165 auto waterFrac(asl::generateDataContainerACL_SP<FlT>(block, 1, 1u));
168 std::cout <<
"Finished" << endl;
170 std::cout <<
"Numerics initialization...";
182 auto flowVel(lbgk->getVelocity());
186 std::vector<asl::SPNumMethod> bc;
187 std::vector<asl::SPNumMethod> bcV;
188 std::vector<asl::SPNumMethod> bcDif;
190 bc.push_back(generateBCNoSlip(lbgk, mpfMapMem));
191 bc.push_back(generateBCConstantPressure(lbgk,1.,{
asl::ZE}));
192 bc.push_back(generateBCConstantPressureVelocity(lbgk, 1.,
195 bc.push_back(generateBCConstantPressureVelocity(lbgk, 1.,
199 bcDif.push_back(generateBCNoSlipVel(lbgk, mpfMapMem));
200 bc.push_back(generateBCConstantGradient(waterFrac, 0., mpfMapMem, templ));
201 bc.push_back(generateBCConstantValue(waterFrac, 1., {
asl::Y0,
asl::YE}));
202 bc.push_back(generateBCConstantValue(waterFrac, 0., {
asl::Z0,
asl::ZE}));
208 std::cout <<
"Finished" << endl;
209 std::cout <<
"Computing..." << endl;
225 for (
unsigned int i(1); i < 2001; ++i)
235 cout << i <<
"/2000; time left (estimated): " << timer.
estimatedRemainder(
double(i)/2000.) << endl;
243 cout <<
"Finished" << endl;
245 cout <<
"Computation statistic:" << endl;
246 cout <<
"Real Time = " << timer.
realTime() <<
"; Processor Time = "
asl::Parameter< double > pumpD
asl::Parameter< double > tubeL
asl::Parameter< double > tubeD
asl::Parameter< double > tOutput
asl::Parameter< double > pumpL
asl::Parameter< double > oilInVel
asl::UValue< double > nuNum
asl::Parameter< double > tSimulation
asl::Parameter< double > nu
asl::Parameter< double > waterInVel
asl::Parameter< double > gasInVel
asl::Parameter< double > dx
asl::ApplicationParametersManager appParamsManager
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)
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
SPDistanceFunction generateDFInBlock(const Block &b, unsigned int nG)
generates map corresponding to external (ghost) part of the block
SPDistanceFunction normalize(SPDistanceFunction a, double dx)
std::shared_ptr< DistanceFunction > SPDistanceFunction
SPFDMultiPhase generateFDMultiPhase(SPDataWithGhostNodesACLData c, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
const VectorTemplate & d3q15()
Vector template.
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
asl::UValue< double > Param
asl::SPDistanceFunction generateMixer(asl::Block &block, Parameters ¶ms)
std::shared_ptr< LBGKUtilities > SPLBGKUtilities
std::shared_ptr< LBGK > SPLBGK
void initData(SPAbstractData d, double a)