diff --git a/src/GksGpu/CellUpdate/CellUpdate.cu b/src/GksGpu/CellUpdate/CellUpdate.cu index 6c9b6c2522be948a0f6ae44fd3b4534dc1c837df..0dc40ceebb3171c5353ecb68b33a0047522d47d8 100644 --- a/src/GksGpu/CellUpdate/CellUpdate.cu +++ b/src/GksGpu/CellUpdate/CellUpdate.cu @@ -137,7 +137,7 @@ __host__ __device__ inline void cellUpdateFunction(DataBaseStruct dataBase, Para const real reactionRateCoefficient = 2.119e11; const real activationEnergy = 2.027e5; - const real heatOfReaction = 8.0e5; + const real heatOfReaction = 4.0e5; const real B = 0.2; const real C = 1.3; diff --git a/src/GksVtkAdapter/VTKAdapter.cpp b/src/GksVtkAdapter/VTKAdapter.cpp index 7f7936f2604a2121ff77fa48280138aa1f83e8a5..28752ce9c2b16e5d4733dc5be3a63bde4fe9acab 100644 --- a/src/GksVtkAdapter/VTKAdapter.cpp +++ b/src/GksVtkAdapter/VTKAdapter.cpp @@ -203,11 +203,13 @@ void addBaseData(vtkGridPtr grid, SPtr<DataBase> dataBase, Parameters parameters #ifdef USE_PASSIVE_SCALAR addScalarRealCellData( grid, dataBase->numberOfCells, "PassiveScalar_1", [&] (uint cellIdx) { - return dataBase->dataHost[ RHO_S_1(cellIdx, dataBase->numberOfCells) ]; + return dataBase->dataHost[ RHO_S_1(cellIdx, dataBase->numberOfCells) ] + / dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; } ); addScalarRealCellData( grid, dataBase->numberOfCells, "PassiveScalar_2", [&] (uint cellIdx) { - return dataBase->dataHost[ RHO_S_2(cellIdx, dataBase->numberOfCells) ]; + return dataBase->dataHost[ RHO_S_2(cellIdx, dataBase->numberOfCells) ] + / dataBase->dataHost[ RHO__(cellIdx, dataBase->numberOfCells) ]; } ); #endif // USE_PASSIVE_SCALAR diff --git a/targets/apps/GKS/ConfinedCombustion/ConfinedCombustion.cpp b/targets/apps/GKS/ConfinedCombustion/ConfinedCombustion.cpp index 7d3d1c558f4e5b8b94b0cbe04ecde75d139e016d..2729d9ce78e8407463fc9410622a6144eeb3c436 100644 --- a/targets/apps/GKS/ConfinedCombustion/ConfinedCombustion.cpp +++ b/targets/apps/GKS/ConfinedCombustion/ConfinedCombustion.cpp @@ -49,7 +49,7 @@ void thermalCavity( std::string path, std::string simulationName ) { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - uint nx = 64; + uint nx = 128; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ void thermalCavity( std::string path, std::string simulationName ) real Ba = 0.1; real eps = 1.2; real Pr = 0.71; - real K = 2.0; + real K = 8.0; real g = 9.81; real rho = 1.2; @@ -75,7 +75,7 @@ void thermalCavity( std::string path, std::string simulationName ) real lambdaCold = 0.5 / ( R_Mixture * 300 ); real lambdaHot = 0.5 / ( R_Mixture * 1200 ); - real mu = 1.0e-3; + real mu = 1.0e-1; //real cs = sqrt( ( ( K + 5.0 ) / ( K + 3.0 ) ) / ( 2.0 * lambda ) ); //real U = cs; @@ -155,14 +155,16 @@ void thermalCavity( std::string path, std::string simulationName ) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - SPtr<BoundaryCondition> bcMX = std::make_shared<AdiabaticWall>( dataBase, Vec3(0.0, 0.0, 0.0), false ); + //SPtr<BoundaryCondition> bcMX = std::make_shared<AdiabaticWall>( dataBase, Vec3(0.0, 0.0, 0.0), false ); SPtr<BoundaryCondition> bcPX = std::make_shared<AdiabaticWall>( dataBase, Vec3(0.0, 0.0, 0.0), false ); - //SPtr<BoundaryCondition> bcMX = std::make_shared<IsothermalWall>( dataBase, Vec3(0.0, 0.0, 0.0), lambdaHot, false ); + SPtr<BoundaryCondition> bcMX = std::make_shared<IsothermalWall>( dataBase, Vec3(0.0, 0.0, 0.0), lambdaCold, false ); //SPtr<BoundaryCondition> bcPX = std::make_shared<IsothermalWall>( dataBase, Vec3(0.0, 0.0, 0.0), lambdaCold, 0.0, false ); - - //bcMX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x < -0.5*L; } ); + bcMX->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x < -0.5*L; } ); bcPX->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x > 0.5*L; } ); + + SPtr<BoundaryCondition> bcMX_2 = std::make_shared<AdiabaticWall>( dataBase, Vec3(0.0, 0.0, 0.0), false ); + bcMX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x < -0.5*L; } ); ////////////////////////////////////////////////////////////////////////// @@ -227,7 +229,7 @@ void thermalCavity( std::string path, std::string simulationName ) //rhoLocal = rho * lambdaLocal / lambdaCold; - lambdaLocal = lambdaCold + ( lambdaHot - lambdaCold ) * exp( - 10. * ( (cellCenter.x-0.5)*(cellCenter.x-0.5) ) ); + //lambdaLocal = lambdaCold + ( lambdaHot - lambdaCold ) * exp( - 10. * ( (cellCenter.x-0.5)*(cellCenter.x-0.5) ) ); return toConservedVariables( PrimitiveVariables( rhoLocal, 0.0, 0.0, 0.0, lambdaLocal, S_1, S_2 ), parameters.K ); }); @@ -263,15 +265,15 @@ void thermalCavity( std::string path, std::string simulationName ) for( uint iter = 1; iter <= 100000000; iter++ ) { - //if( iter < 40000 ) - //{ - // std::dynamic_pointer_cast<IsothermalWall>(bcMX)->lambda = lambdaCold + ( lambdaHot - lambdaCold ) * ( real(iter) / 40000.0 ); - //} - //if( iter == 40000 ) - //{ - // //std::dynamic_pointer_cast<IsothermalWall>(bcMX)->lambda = lambdaHot; - // dataBase->boundaryConditions[4] = bcMX_2; - //} + if( iter < 100000 ) + { + std::dynamic_pointer_cast<IsothermalWall>(bcMX)->lambda = lambdaCold + ( lambdaHot - lambdaCold ) * ( real(iter) / 100000.0 ); + } + if( iter == 100000 ) + { + //std::dynamic_pointer_cast<IsothermalWall>(bcMX)->lambda = lambdaHot; + dataBase->boundaryConditions[4] = bcMX_2; + } TimeStepping::nestedTimeStep(dataBase, parameters, nullptr, 0); @@ -280,8 +282,9 @@ void thermalCavity( std::string path, std::string simulationName ) //( iter < 100 && iter % 10 == 0 ) || //( iter < 1000 && iter % 100 == 0 ) || //( iter < 10000 && iter % 1000 == 0 ) || - ( iter < 1000000 && iter % 10000 == 0 ) || - ( iter < 10000000 && iter % 100000 == 0 ) + //( iter < 1000000 && iter % 10000 == 0 ) || + //( iter < 10000000 && iter % 100000 == 0 ) + ( iter > 90000 && iter % 1000 == 0 ) ) { dataBase->copyDataDeviceToHost();