Skip to content
Snippets Groups Projects
Commit 864e6b1c authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

fix ViskomatXL and Multiphase setup

parent 85e9f997
No related branches found
No related tags found
2 merge requests!171Newest Update,!83Fix MPICommunicator
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
......
......@@ -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));
......
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
......@@ -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>(
......
#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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment