diff --git a/apps/cpu/JetBreakup/JetBreakup.cfg b/apps/cpu/JetBreakup/JetBreakup.cfg index abc2436d34371e663eca09ce83c3052cd2e71c37..0900bcc997331ecdb4993e35e96d48aa888709cc 100644 --- a/apps/cpu/JetBreakup/JetBreakup.cfg +++ b/apps/cpu/JetBreakup/JetBreakup.cfg @@ -7,9 +7,9 @@ availMem = 10e9 #Grid blocknx = 25 25 25 -factorLx = 2.0 -factorLy = 2.5 -factorLz = 2.5 +factorLx = 16 +factorLy = 5 +factorLz = 5 #Simulation case = 3 diff --git a/apps/cpu/ShotcreteJet/jet.cpp b/apps/cpu/ShotcreteJet/jet.cpp index baaa572353ecfa91a14c12ab0f7c5ae1bcfd97c1..83ad6984cf30937caeaf449320eee205bb63b191 100644 --- a/apps/cpu/ShotcreteJet/jet.cpp +++ b/apps/cpu/ShotcreteJet/jet.cpp @@ -40,6 +40,7 @@ int main(int argc, char *argv[]) double cpStart = config.getValue<double>("cpStart"); double restartStep = config.getValue<int>("restartStep"); int endTime = config.getValue<int>("endTime"); + int numOfThreads = config.getValue<int>("numOfThreads"); std::shared_ptr<vf::parallel::Communicator> comm = vf::parallel::MPICommunicator::getInstance(); int myid = comm->getProcessID(); @@ -97,7 +98,7 @@ int main(int argc, char *argv[]) double g_minX1 = -1.49631e3; double g_minX2 = 0.193582e3; - double g_minX3 = g_maxX3_box - 0.03e3;//-0.095; //-0.215; + double g_minX3 = g_maxX3_box - 0.39e3;//-0.095; //-0.215; double g_maxX1 = -1.10631e3; double g_maxX2 = 0.583582e3; @@ -114,7 +115,7 @@ int main(int argc, char *argv[]) // concrete double d_part = 1e-3; - double V = 0.4; // flow rate [m^3/h] + double V = 0.4*7.0; // flow rate [m^3/h] double D = 0.026; // shotcrete inlet diameter [m] double R = D / 2.0; // radius [m] double A = UbMath::PI * R * R; @@ -521,8 +522,8 @@ int main(int argc, char *argv[]) //SPtr<LBMKernel> kernel = make_shared<CumulantK17LBMKernel>(); // SPtr<LBMKernel> kernel = make_shared<MultiphaseTwoPhaseFieldsPressureFilterLBMKernel>(); // SPtr<LBMKernel> kernel = make_shared<MultiphaseSimpleVelocityBaseExternalPressureLBMKernel>(); - SPtr<LBMKernel> kernel = make_shared<MultiphaseSharpInterfaceLBMKernel>(); - //SPtr<LBMKernel> kernel = make_shared<MultiphaseScaleDistributionLBMKernel>(); + //SPtr<LBMKernel> kernel = make_shared<MultiphaseSharpInterfaceLBMKernel>(); + SPtr<LBMKernel> kernel = make_shared<MultiphaseScaleDistributionLBMKernel>(); //SPtr<LBMKernel> kernel = make_shared<IBcumulantK17LBMKernel>(); //SPtr<LBMKernel> kernel = make_shared<IBsharpInterfaceLBMKernel>(); @@ -736,7 +737,7 @@ int main(int argc, char *argv[]) ////////////////////////////////////////////////////////// SPtr<GbObject3D> geoOutflow1 = make_shared<GbCuboid3D>(g_minX1 - 2.0 * dx, g_minX2 - 2.0 * dx, g_minX3 - 2.0 * dx, g_maxX1 + 2.0 * dx, g_maxX2 + 2.0 * dx, g_minX3); if (myid == 0) GbSystem3D::writeGeoObject(geoOutflow1.get(), outputPath + "/geo/geoOutflow1", WbWriterVtkXmlBinary::getInstance()); - SPtr<D3Q27Interactor> intrOutflow1 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow1, grid, outflowBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> intrOutflow1 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow1, grid, noSlipBC, Interactor3D::SOLID)); SPtr<GbObject3D> geoOutflow2 = make_shared<GbCuboid3D>(g_minX1 - 2.0 * dx, g_minX2 - 2.0 * dx, g_minX3 - 2.0 * dx, g_minX1, g_maxX2 + 2.0 * dx, g_maxX3 + 2.0 * dx); if (myid == 0) GbSystem3D::writeGeoObject(geoOutflow2.get(), outputPath + "/geo/geoOutflow2", WbWriterVtkXmlBinary::getInstance()); @@ -978,10 +979,10 @@ int main(int argc, char *argv[]) if (newStart) { - double x1c = -1.31431 + R; - double x2c = 0.375582 + R; - double Ri = 5; - double x3c = 0.136 + Ri; + double x1c = -1.31431e3 + R; + double x2c = 0.375582e3 + R; + double Ri = 5e3; + double x3c = 0.136e3 + Ri; mu::Parser fct1; // fct1.SetExpr(" 0.5 - 0.5 * tanh(2 * (sqrt((x1 - x1c) ^ 2 + (x2 - x2c) ^ 2 + (x3 - x3c) ^ 2) - radius) / interfaceThickness)"); @@ -993,7 +994,7 @@ int main(int argc, char *argv[]) fct1.DefineConst("interfaceThickness", interfaceThickness * dx); MultiphaseVelocityFormInitDistributionsBlockVisitor initVisitor; - //initVisitor.setPhi(fct1); + initVisitor.setPhi(fct1); grid->accept(initVisitor); } //else @@ -1032,7 +1033,7 @@ int main(int argc, char *argv[]) // ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm); grid->accept(setConnsVisitor); - int numOfThreads = 18; + //int numOfThreads = 18; omp_set_num_threads(numOfThreads); SPtr<UbScheduler> nupsSch = std::make_shared<UbScheduler>(10, 10, 100); diff --git a/src/cpu/MultiphaseFlow/BoundaryConditions/MultiphasePressureBCStrategy.cpp b/src/cpu/MultiphaseFlow/BoundaryConditions/MultiphasePressureBCStrategy.cpp index f85d3c6503fbe645ecef115351c6e8fd11c287d1..2c0344b232893664f56b6aa48168265c033de044 100644 --- a/src/cpu/MultiphaseFlow/BoundaryConditions/MultiphasePressureBCStrategy.cpp +++ b/src/cpu/MultiphaseFlow/BoundaryConditions/MultiphasePressureBCStrategy.cpp @@ -96,11 +96,24 @@ void MultiphasePressureBCStrategy::applyBC() for (int fdir = D3Q27System::STARTF; fdir <= D3Q27System::ENDF; fdir++) { if (bcPtr->hasDensityBoundaryFlag(fdir)) { - LBMReal ftemp = -f[D3Q27System::INVDIR[fdir]] + feq[fdir] + feq[D3Q27System::INVDIR[fdir]]; - distributions->setDistributionForDirection(ftemp, x1, x2, x3, D3Q27System::INVDIR[fdir]); + // //if(D3Q27System::DX1[fdir]*vx1+D3Q27System::DX2[fdir]*vx2+D3Q27System::DX3[fdir]*vx3 <= 0) + // if (false)//(phi<0.01) + // { + // LBMReal ftemp = -f[D3Q27System::INVDIR[fdir]] + feq[fdir] + feq[D3Q27System::INVDIR[fdir]]; + // distributions->setDistributionForDirection(ftemp, x1, x2, x3, D3Q27System::INVDIR[fdir]); - LBMReal hReturn = -h[D3Q27System::INVDIR[fdir]] + htemp[fdir] + htemp[D3Q27System::INVDIR[fdir]]; - distributionsH->setDistributionForDirection(hReturn, x1, x2, x3, D3Q27System::INVDIR[fdir]); + // LBMReal hReturn = 0; + // //h[fdir]; //-h[D3Q27System::INVDIR[fdir]] + htemp[fdir] + + // //htemp[D3Q27System::INVDIR[fdir]]; + // distributionsH->setDistributionForDirection(hReturn, x1, x2, x3, D3Q27System::INVDIR[fdir]); + // } + + // else{ + // // //distributions->setDistributionForDirection(rhoBC*D3Q27System::WEIGTH[fdir], x1, x2, x3, D3Q27System::INVDIR[fdir]); + // // //distributionsH->setDistributionForDirection(phiBC*D3Q27System::WEIGTH[fdir], x1, x2, x3, D3Q27System::INVDIR[fdir]); + distributions->setDistributionForDirection(0.7*f[D3Q27System::INVDIR[fdir]], x1, x2, x3, D3Q27System::INVDIR[fdir]); + distributionsH->setDistributionForDirection(0.7*h[D3Q27System::INVDIR[fdir]], x1, x2, x3, D3Q27System::INVDIR[fdir]); + // } } } }