diff --git a/source/Applications/AcousticPulse/ap.cpp b/source/Applications/AcousticPulse/ap.cpp index 518fe559472852bb84a31222fdd4a869e83de59e..ce4b07e7c6d487f44427e4a7579e873b94f1b3cf 100644 --- a/source/Applications/AcousticPulse/ap.cpp +++ b/source/Applications/AcousticPulse/ap.cpp @@ -43,15 +43,15 @@ void run() ////////////////////////////////////////////////////////////////////////// //DLR-F16 test ////dx_coarse = 0.003 mm - //string pathname = "d:/temp/AcousticPulseXZ-BV10nuLB-0.003"; - //int endTime = 20; - //double outTime = 20; - //LBMReal dx = 0.003; - //LBMReal rhoLB = 0.0; - //LBMReal nuLB = 8.66025e-6; + string pathname = "d:/temp/AcousticPulseXZ-4th-0.003"; + int endTime = 20; + double outTime = 20; + LBMReal dx = 0.003; + LBMReal rhoLB = 0.0; + LBMReal nuLB = 8.66025e-6; ////////////////////////////////////////////////////////////////////////// ////dx_coarse = 0.0015 mm - //string pathname = "d:/temp/AcousticPulseXZ-BV10nuLB-0.0015"; + //string pathname = "d:/temp/AcousticPulseXZ-4th-0.0015"; //double endTime = 40; //double outTime = 40; //LBMReal dx = 0.0015; @@ -59,12 +59,12 @@ void run() //LBMReal nuLB = 8.66025e-6*2.0; //////////////////////////////////////////////////////////////////////////// ////dx_coarse = 0.00075 mm - string pathname = "d:/temp/AcousticPulseXZ-BV10nuLB-0.00075"; - double endTime = 80; - double outTime = 80; - LBMReal dx = 0.00075; - LBMReal rhoLB = 0.0; - LBMReal nuLB = 8.66025e-6*4.0; + //string pathname = "d:/temp/AcousticPulseXZ-4th-0.00075"; + //double endTime = 80; + //double outTime = 80; + //LBMReal dx = 0.00075; + //LBMReal rhoLB = 0.0; + //LBMReal nuLB = 8.66025e-6*4.0; ////////////////////////////////////////////////////////////////////////// SPtr<LBMUnitConverter> conv = SPtr<LBMUnitConverter>(new LBMUnitConverter()); @@ -161,7 +161,7 @@ void run() double bulckViscosity = 10.0*nuLB; SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); - dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); + //dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulantLBMKernel()); //dynamicPointerCast<CompressibleCumulantLBMKernel>(kernel)->setBulkOmegaToOmega(true); // @@ -181,7 +181,7 @@ void run() //set connectors //SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetInterpolationProcessor()); SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetMomentsInterpolationProcessor()); - dynamicPointerCast<CompressibleOffsetMomentsInterpolationProcessor>(iProcessor)->setBulkViscosity(nuLB, bulckViscosity); + //dynamicPointerCast<CompressibleOffsetMomentsInterpolationProcessor>(iProcessor)->setBulkViscosity(nuLB, bulckViscosity); SetConnectorsBlockVisitor setConnsVisitor(comm, true, D3Q27System::ENDDIR, nuLB, iProcessor); UBLOG(logINFO, "SetConnectorsBlockVisitor:start"); diff --git a/source/Applications/DLR-F16-Solid/f16.cpp b/source/Applications/DLR-F16-Solid/f16.cpp index 1924e67aa76bfdbc34a191296cce6b137f246406..c1020963ab9fcc71f177ee502a32de58927c081b 100644 --- a/source/Applications/DLR-F16-Solid/f16.cpp +++ b/source/Applications/DLR-F16-Solid/f16.cpp @@ -168,19 +168,13 @@ void run(string configname) SPtr<BCProcessor> bcProc; bcProc = SPtr<BCProcessor>(new BCProcessor()); - //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulantLBMKernel()); - //dynamicPointerCast<CompressibleCumulantLBMKernel>(kernel)->setRelaxationParameter(CompressibleCumulantLBMKernel::NORMAL); - SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); - //dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(10.0*nuLB); - //dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(nuLB*2.0e3); - - //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new IncompressibleCumulantLBMKernel()); + double bulckViscosity = 10.0*nuLB; + dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); kernel->setBCProcessor(bcProc); SPtr<LBMKernel> spKernel = SPtr<LBMKernel>(new CompressibleCumulantLBMKernel()); - //SPtr<LBMKernel> spKernel = SPtr<LBMKernel>(new IncompressibleCumulantLBMKernel()); spKernel->setBCProcessor(bcProc); ////////////////////////////////////////////////////////////////////////// //restart @@ -606,7 +600,9 @@ void run(string configname) grid->accept(initVisitor1); ////set connectors - SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetInterpolationProcessor()); + //SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetInterpolationProcessor()); + SPtr<InterpolationProcessor> iProcessor(new CompressibleOffsetMomentsInterpolationProcessor()); + dynamicPointerCast<CompressibleOffsetMomentsInterpolationProcessor>(iProcessor)->setBulkViscosity(nuLB, bulckViscosity); SetConnectorsBlockVisitor setConnsVisitor(comm, true, D3Q27System::ENDDIR, nuLB, iProcessor); grid->accept(setConnsVisitor); @@ -631,10 +627,6 @@ void run(string configname) grid->accept(initVisitor); } - //domain decomposition for threads - //PQueuePartitioningGridVisitor pqPartVisitor(numOfThreads); - //grid->accept(pqPartVisitor); - //bcVisitor should be accept after initialization!!!! grid->accept(bcVisitor); if (myid==0) UBLOG(logINFO, "grid->accept(bcVisitor):end"); @@ -658,40 +650,10 @@ void run(string configname) UBLOG(logINFO, "PID = "<<myid<<" Physical Memory currently used by current process: "<<Utilities::getPhysMemUsedByMe()/1073741824.0<<" GB"); } - ////sponge layer - //////////////////////////////////////////////////////////////////////////// - - //GbCuboid3DPtr spongeLayerX1max(new GbCuboid3D(g_maxX1-0.35, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX1max.get(), pathOut+"/geo/spongeLayerX1max", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX1max(spongeLayerX1max, spKernel, nuLB, D3Q27System::E); - //grid->accept(slVisitorX1max); - - //GbCuboid3DPtr spongeLayerX1min(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_minX1+0.2, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX1min.get(), pathOut+"/geo/spongeLayerX1min", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX1min(spongeLayerX1min, spKernel, nuLB, D3Q27System::W); - //grid->accept(slVisitorX1min); - - //GbCuboid3DPtr spongeLayerX3min(new GbCuboid3D(g_minX1+0.2, g_minX2-blockLength, g_minX3-blockLength, g_maxX1-0.4, g_maxX2+blockLength, g_minX3+0.2)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX3min.get(), pathOut+"/geo/spongeLayerX3min", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX3min(spongeLayerX3min, spKernel, nuLB, D3Q27System::B); - //grid->accept(slVisitorX3min); - - //GbCuboid3DPtr spongeLayerX3max(new GbCuboid3D(g_minX1+0.2, g_minX2-blockLength, g_maxX3-0.2, g_maxX1-0.4, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX3max.get(), pathOut+"/geo/spongeLayerX3max", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX3max(spongeLayerX3max, spKernel, nuLB, D3Q27System::T); - //grid->accept(slVisitorX3max); - - ///////////////////////////////////////////////////////////////////////////// if (myid==0) UBLOG(logINFO, "Preprozess - end"); } else { - - //GbCuboid3DPtr mic5(new GbCuboid3D(0.3+deltaXfine, 0.015, 0.000517+0.00037+7.0*deltaXfine, 0.3+2.0*deltaXfine, 0.015+deltaXfine, 0.000517+0.00037+8.0*deltaXfine)); - //if (myid==0) GbSystem3D::writeGeoObject(mic5.get(), pathOut+"/geo/mic5", WbWriterVtkXmlBinary::getInstance()); - - //return; - restartCoProcessor->restart((int)restartStep); //migCoProcessor->restart((int)restartStep); grid->setTimeStep(restartStep); @@ -700,45 +662,10 @@ void run(string configname) SetConnectorsBlockVisitor setConnsVisitor(comm, true, D3Q27System::ENDDIR, nuLB, iProcessor); grid->accept(setConnsVisitor); -/////////////////////////////////////////////////////////////////////////////////////////////// - //SPtr<GbTriFaceMesh3D> fngMeshWhole2; - //if (myid==0) UBLOG(logINFO, "Read fngFileWhole2:start"); - //fngMeshWhole2 = SPtr<GbTriFaceMesh3D>(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile2(pathGeo+"/"+fngFileWhole2, "fngMeshWhole2", GbTriFaceMesh3D::KDTREE_SAHPLIT, false)); - //if (myid==0) UBLOG(logINFO, "Read fngFileWhole2:end"); - //fngMeshWhole2->rotate(0.0, 0.5, 0.0); - //if (myid==0) GbSystem3D::writeGeoObject(fngMeshWhole2.get(), pathOut+"/geo/fngMeshWhole3", WbWriterVtkXmlBinary::getInstance()); - //SPtr<Interactor3D> fngIntrWhole2 = SPtr<D3Q27TriFaceMeshInteractor>(new D3Q27TriFaceMeshInteractor(fngMeshWhole2, grid, noSlipBCAdapter, Interactor3D::SOLID, (Interactor3D::Accuracy)accuracy)); - //SetBcBlocksBlockVisitor v(fngIntrWhole2); - //grid->accept(v); - //fngIntrWhole2->initInteractor(); -/////////////////////////////////////////////////////////////////////////////////////////////// - grid->accept(bcVisitor); - - ////sponge layer - //////////////////////////////////////////////////////////////////////////// - - //GbCuboid3DPtr spongeLayerX1max(new GbCuboid3D(g_maxX1-0.35, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX1max.get(), pathOut+"/geo/spongeLayerX1max", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX1max(spongeLayerX1max, spKernel, nuLB, D3Q27System::E); - //grid->accept(slVisitorX1max); - - //GbCuboid3DPtr spongeLayerX1min(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_minX1+0.2, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX1min.get(), pathOut+"/geo/spongeLayerX1min", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX1min(spongeLayerX1min, spKernel, nuLB, D3Q27System::W); - //grid->accept(slVisitorX1min); - - //GbCuboid3DPtr spongeLayerX3min(new GbCuboid3D(g_minX1+0.2, g_minX2-blockLength, g_minX3-blockLength, g_maxX1-0.4, g_maxX2+blockLength, g_minX3+0.2)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX3min.get(), pathOut+"/geo/spongeLayerX3min", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX3min(spongeLayerX3min, spKernel, nuLB, D3Q27System::B); - //grid->accept(slVisitorX3min); - - //GbCuboid3DPtr spongeLayerX3max(new GbCuboid3D(g_minX1+0.2, g_minX2-blockLength, g_maxX3-0.2, g_maxX1-0.4, g_maxX2+blockLength, g_maxX3+blockLength)); - //if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX3max.get(), pathOut+"/geo/spongeLayerX3max", WbWriterVtkXmlASCII::getInstance()); - //SpongeLayerBlockVisitor slVisitorX3max(spongeLayerX3max, spKernel, nuLB, D3Q27System::T); - //grid->accept(slVisitorX3max); } + ////sponge layer GbCuboid3DPtr spongeLayerX1max(new GbCuboid3D(g_maxX1-0.35, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength)); if (myid==0) GbSystem3D::writeGeoObject(spongeLayerX1max.get(), pathOut+"/geo/spongeLayerX1max", WbWriterVtkXmlASCII::getInstance()); SpongeLayerBlockVisitor slVisitorX1max(spongeLayerX1max, spKernel, nuLB, D3Q27System::E); diff --git a/source/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp b/source/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp index 4eb41245fdf4440e43004fbddc74fd9f960a4dcb..c5e12a68b45a3e09f8433dd7c541c7e2debd01b2 100644 --- a/source/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp +++ b/source/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp @@ -6,6 +6,8 @@ CompressibleOffsetMomentsInterpolationProcessor::CompressibleOffsetMomentsInterpolationProcessor() : omegaC(0.0), omegaF(0.0) { + this->bulkViscosity = 0.0; + this->shearViscosity = 0.0; this->OxxPyyPzzC = one; this->OxxPyyPzzF = one; } @@ -13,6 +15,8 @@ CompressibleOffsetMomentsInterpolationProcessor::CompressibleOffsetMomentsInterp CompressibleOffsetMomentsInterpolationProcessor::CompressibleOffsetMomentsInterpolationProcessor(LBMReal omegaC, LBMReal omegaF) : omegaC(omegaC), omegaF(omegaF) { + this->bulkViscosity = 0.0; + this->shearViscosity = 0.0; this->OxxPyyPzzC = one; this->OxxPyyPzzF = one; }