diff --git a/apps/cpu/Multiphase/Multiphase.cfg b/apps/cpu/Multiphase/Multiphase.cfg index c294ea68ce96c751030380d52d16eb35d06f9faa..b2f435db04ce51f915c3994b8418ba97b49c4843 100644 --- a/apps/cpu/Multiphase/Multiphase.cfg +++ b/apps/cpu/Multiphase/Multiphase.cfg @@ -1,11 +1,11 @@ -pathname = d:/temp/MultiphaseNew5 +pathname = d:/temp/JetBreakup #pathGeo = d:/Projects/VirtualFluids-Multiphase/source/Applications/Multiphase/backup pathGeo = d:/Projects/VirtualFluidsCombined/apps/cpu/Multiphase/backup #geoFile = JetBreakupR.ASCII.stl #geoFile = inlet1.stl geoFile = tubeTransformed.stl -numOfThreads = 4 +numOfThreads = 1 availMem = 10e9 #Grid @@ -22,21 +22,23 @@ availMem = 10e9 #boundingBox = -40e-3 40e-3 1.0e-3 11.0e-3 -403-3 40e-3 #(Jet Breakup2) (Original without inlet length) #blocknx = 20 20 20 -boundingBox = 6.0e-3 46.0e-3 -5e-3 5e-3 -5e-3 5e-3 -blocknx = 20 20 20 +#boundingBox = 6.0e-3 46.0e-3 -5e-3 5e-3 -5e-3 5e-3 +#blocknx = 20 20 20 +boundingBox = 0 9 0 9 0 9 +blocknx = 10 10 10 -dx = 1.66666666667e-4 +dx = 1 #1.66666666667e-4 refineLevel = 0 #Simulation uLB = 0.005 #inlet velocity #uF2 = 0.0001 Re = 10 -nuL =1e-2# 1.0e-5 #!1e-2 -nuG =1e-2# 1.16e-4 #!1e-2 +nuL =1e-3# 1.0e-5 #!1e-2 +nuG =1e-6# 1.16e-4 #!1e-2 densityRatio = 1000 -sigma = 1e-5 #4.66e-3 #surface tension 1e-4 ./. 1e-5 -interfaceThickness = 5 +sigma = 0 #1e-5 #4.66e-3 #surface tension 1e-4 ./. 1e-5 +interfaceWidth = 5 radius = 615.0 (Jet Breakup) contactAngle = 110.0 gravity = 0.0 diff --git a/apps/cpu/Multiphase/Multiphase.cpp b/apps/cpu/Multiphase/Multiphase.cpp index 77eb317e98ea019c983b3f150ca7f4c98d5a034a..407ca2d2914336722d92bf3811e648359b0ed847 100644 --- a/apps/cpu/Multiphase/Multiphase.cpp +++ b/apps/cpu/Multiphase/Multiphase.cpp @@ -28,7 +28,7 @@ void run(string configname) double nuG = config.getValue<double>("nuG"); double densityRatio = config.getValue<double>("densityRatio"); double sigma = config.getValue<double>("sigma"); - int interfaceThickness = config.getValue<int>("interfaceThickness"); + int interfaceWidth = config.getValue<int>("interfaceWidth"); //double radius = config.getValue<double>("radius"); double theta = config.getValue<double>("contactAngle"); double gr = config.getValue<double>("gravity"); @@ -49,8 +49,8 @@ void run(string configname) double cpStep = config.getValue<double>("cpStep"); bool newStart = config.getValue<bool>("newStart"); - double beta = 12 * sigma / interfaceThickness; - double kappa = 1.5 * interfaceThickness * sigma; + double beta = 12 * sigma / interfaceWidth; + double kappa = 1.5 * interfaceWidth * sigma; SPtr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance(); int myid = comm->getProcessID(); @@ -89,7 +89,8 @@ void run(string configname) //kernel = SPtr<LBMKernel>(new MultiphaseCumulantLBMKernel()); //kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsCumulantLBMKernel()); //kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel()); - kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsPressureFilterLBMKernel()); + // kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsPressureFilterLBMKernel()); + kernel = SPtr<LBMKernel>(new MultiphasePressureFilterLBMKernel()); kernel->setWithForcing(true); kernel->setForcingX1(0.0); @@ -107,6 +108,7 @@ void run(string configname) kernel->setDensityRatio(densityRatio); kernel->setMultiphaseModelParameters(beta, kappa); kernel->setContactAngle(theta); + kernel->setInterfaceWidth(interfaceWidth); SPtr<BCProcessor> bcProc(new BCProcessor()); // BCProcessorPtr bcProc(new ThinWallBCProcessor()); @@ -114,9 +116,9 @@ void run(string configname) kernel->setBCProcessor(bcProc); SPtr<Grid3D> grid(new Grid3D(comm)); - // grid->setPeriodicX1(true); - // grid->setPeriodicX2(true); - // grid->setPeriodicX3(true); + //grid->setPeriodicX1(true); + //grid->setPeriodicX2(true); + //grid->setPeriodicX3(true); grid->setGhostLayerWidth(2); @@ -363,10 +365,52 @@ void run(string configname) mu::Parser fct1; fct1.SetExpr("phiL"); fct1.DefineConst("phiL", phiL); - MultiphaseInitDistributionsBlockVisitor initVisitor(interfaceThickness); + //MultiphaseInitDistributionsBlockVisitor initVisitor(interfaceThickness); + MultiphaseVelocityFormInitDistributionsBlockVisitor initVisitor; initVisitor.setPhi(fct1); grid->accept(initVisitor); - +/////////////////////////////////////////////////////////////////////////////////////////// + //{ + // std::vector<std::vector<SPtr<Block3D>>> blockVector; + // int gridRank = comm->getProcessID(); + // int minInitLevel = grid->getCoarsestInitializedLevel(); + // int maxInitLevel = grid->getFinestInitializedLevel(); + // blockVector.resize(maxInitLevel + 1); + // for (int level = minInitLevel; level <= maxInitLevel; level++) { + // grid->getBlocks(level, gridRank, true, blockVector[level]); + //} + // for (int level = minInitLevel; level <= maxInitLevel; level++) { + // for (SPtr<Block3D> block : blockVector[level]) { + // if (block) { + // int ix1 = block->getX1(); + // int ix2 = block->getX2(); + // int ix3 = block->getX3(); + // int level = block->getLevel(); + + // for (int dir = 0; dir < D3Q27System::ENDDIR; dir++) { + // SPtr<Block3D> neighBlock = grid->getNeighborBlock(dir, ix1, ix2, ix3, level); + + // if (!neighBlock) { + + // } + // } + // } + // } + //} + // SPtr<Block3D> block = grid->getBlock(0, 0, 0, 0); + // SPtr<LBMKernel> kernel = dynamicPointerCast<LBMKernel>(block->getKernel()); + // SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + + // for (int ix3 = 0; ix3 <= 13; ix3++) { + // for (int ix2 = 0; ix2 <= 13; ix2++) { + // for (int ix1 = 0; ix1 <= 13; ix1++) { + // if (ix1 == 0 || ix2 == 0 || ix3 == 0 || ix1 == 13 || ix2 == 13 || ix3 == 13) + // bcArray->setUndefined(ix1, ix2, ix3); + // } + // } + // } + //} + //////////////////////////////////////////////////////////////////////////////////////////// // boundary conditions grid { SPtr<UbScheduler> geoSch(new UbScheduler(1)); @@ -403,9 +447,10 @@ void run(string configname) //ThreeDistributionsSetConnectorsBlockVisitor setConnsVisitor(comm); - grid->accept(bcVisitor); + grid->accept(bcVisitor); - ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm); + //ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm); + TwoDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm); grid->accept(setConnsVisitor); SPtr<UbScheduler> visSch(new UbScheduler(outTime)); diff --git a/apps/cpu/ViskomatXL/viskomat.cfg b/apps/cpu/ViskomatXL/viskomat.cfg index 75833bef60efc726a7d2e46fd11cdb386aa40104..c46760239722b590e6f08fc1dd6505168780c84c 100644 --- a/apps/cpu/ViskomatXL/viskomat.cfg +++ b/apps/cpu/ViskomatXL/viskomat.cfg @@ -1,33 +1,37 @@ -outputPath = d:/temp/viskomatXL -geoPath = d:/Projects/TRR277/Project/WP1/Rheometer/Aileen -#geoPath = d:/Projects/TRR277/Project/WP1/Rheometer -geoFile = fishboneT.stl -#geoFile = cylinder.stl +outputPath = d:/temp/viskomatXL_dx_0.5 +#geoPath = d:/Projects/TRR277/Project/WP1/Rheometer/Aileen +geoPath = d:/Projects/TRR277/Project/WP1/Rheometer +#geoFile = fishboneT.stl +geoFile = cylinder.stl -numOfThreads = 4 +numOfThreads = 1 availMem = 15e9 logToFile = false -blocknx = 14 14 14 -boundingBox = 0 140 -82.5 82.5 -82.5 82.5 +#blocknx = 14 14 14 +#blocknx = 14 15 15 +#blocknx = 35 83 83 +#boundingBox = 0 140 -82.5 82.5 -82.5 82.5 + +blocknx = 32 12 12 +boundingBox = 0 32 -12 12 -12 12 +#boundingBox = 0 64 -24 24 -24 24 +#boundingBox = 0 64 -24 24 -24 24 + +deltax = 0.5 -deltax = 1 refineLevel = 0 -#nuLB = 1.5e-4 OmegaLB = 1e-5 -N = 80 #rpm -mu = 1 # Pa s +mu = 5 # Pa s +N = 80 # rpm tau0 = 20e-7 -resolution = 32 -scaleFactor = 1 - -newStart = false -restartStep = 50 +newStart = true +restartStep = 1.3e6 -cpStart = 50 -cpStep = 50 +cpStart = 100000 +cpStep = 100000 -outTime = 10000 -endTime = 100 #0000 \ No newline at end of file +outTime = 1 +endTime = 200 \ No newline at end of file diff --git a/apps/cpu/ViskomatXL/viskomat.cpp b/apps/cpu/ViskomatXL/viskomat.cpp index c29e8699d04cafaa654026ecba6a6e65c068240c..bef8fa53a92ef3aac3ac7a055ab1778b03c12ef4 100644 --- a/apps/cpu/ViskomatXL/viskomat.cpp +++ b/apps/cpu/ViskomatXL/viskomat.cpp @@ -111,16 +111,18 @@ void bflow(string configname) //// rotation around X-axis mu::Parser fctVy; - fctVy.SetExpr("-Omega*(x3-z0-r)"); + fctVy.SetExpr("-Omega*(x3-z0-r)/deltax"); fctVy.DefineConst("Omega", OmegaLB); fctVy.DefineConst("r", 0.5 * (g_maxX3 - g_minX3)); fctVy.DefineConst("z0", g_minX3); + fctVy.DefineConst("deltax", deltax); mu::Parser fctVz; - fctVz.SetExpr("Omega*(x2-y0-r)"); + fctVz.SetExpr("Omega*(x2-y0-r)/deltax"); fctVz.DefineConst("Omega", OmegaLB); fctVz.DefineConst("r", 0.5 * (g_maxX2 - g_minX2)); fctVz.DefineConst("y0", g_minX2); + fctVz.DefineConst("deltax", deltax); mu::Parser fctVx; fctVx.SetExpr("0.0"); @@ -218,6 +220,8 @@ void bflow(string configname) SPtr<GbTriFaceMesh3D> stator = make_shared<GbTriFaceMesh3D>(); stator->readMeshFromSTLFileBinary(geoPath + "/" + geoFile, false); + //stator->scale(2.0, 2.0, 2.0); + //stator->translate(16.0, 0.0, 0.0); //stator->translate(4.0, -73.0, -6.0); SPtr<D3Q27Interactor> statorInt = SPtr<D3Q27TriFaceMeshInteractor>( diff --git a/apps/cpu/rheometer/rheometer.cfg b/apps/cpu/rheometer/rheometer.cfg index 9eec8c6ded9b7a5ab8d1e6177c43354a4514ccc3..9b739bc67ed42d46c89adaefab1b020ad67da660 100644 --- a/apps/cpu/rheometer/rheometer.cfg +++ b/apps/cpu/rheometer/rheometer.cfg @@ -1,4 +1,4 @@ -#outputPath = d:/temp/rheometer/rheometerBinghamqQBB/rheometerBingham_tau_20e-7_nu_1.5e-3_new_lim_test +#outputPath = d:/temp/rheometerTest outputPath = d:/temp/Taylor-CouetteFlowIncompCum viscosityPath = d:/Projects/VirtualFluidsCombined/apps/cpu/rheometer @@ -8,7 +8,7 @@ logToFile = false blocknx = 16 16 1 #8 8 1 #boundingBox = 32 32 1 -deltax = 1 +deltax = 0.5 #boundingBox = 0.02 0.02 0.00125 #deltax = 0.000625