Skip to content
Snippets Groups Projects
Commit 08d26f93 authored by LEGOLAS\lenz's avatar LEGOLAS\lenz
Browse files

reduces the value of the velocity inflow imiter and modifies the Candle...

reduces the value of the velocity inflow imiter and modifies the Candle target, to obtain a stable 3D simulation
parent 14753cdb
No related branches found
No related tags found
No related merge requests found
......@@ -148,11 +148,11 @@ __host__ __device__ inline void boundaryConditionFunction(const DataBaseStruct&
real velocity = sqrt( ghostCellPrim.U * ghostCellPrim.U + ghostCellPrim.V * ghostCellPrim.V + ghostCellPrim.W * ghostCellPrim.W );
if( velocity > two )
if( velocity > c1o2 )
{
ghostCellPrim.U *= two / velocity;
ghostCellPrim.V *= two / velocity;
ghostCellPrim.W *= two / velocity;
ghostCellPrim.U *= c1o2 / velocity;
ghostCellPrim.V *= c1o2 / velocity;
ghostCellPrim.W *= c1o2 / velocity;
}
ghostCellData = toConservedVariables(ghostCellPrim, parameters.K);
......
......@@ -63,11 +63,11 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
uint nx = 128;
uint nx = 256;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
real L = 8.0;
real L = 4.0;
real H = 8.0;
real W = 0.125;
......@@ -76,7 +76,7 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
real U = 0.025;
real eps = 2.0;
real Pr = 0.25;
real Pr = 0.71;
real K = 5.0;
real g = 9.81;
......@@ -90,7 +90,7 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
real cs = sqrt( ( ( K + 5.0 ) / ( K + 3.0 ) ) / ( 2.0 * prim.lambda ) );
real CFL = 0.25;0.125;
real CFL = 0.5;0.125;
real dt = CFL * ( dx / ( ( U + cs ) * ( one + ( two * mu ) / ( U * dx * rho ) ) ) );
......@@ -135,7 +135,7 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool threeDimensional = false;
bool threeDimensional = true;
if( threeDimensional )
{
......@@ -162,12 +162,12 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VerticalCylinder cylinder( 0.0, 0.0, 0.0, 1.0, 8.0 );
VerticalCylinder cylinder( 0.0, 0.0, 0.0, 0.6, 8.0 );
gridBuilder->setNumberOfLayers(20,20);
gridBuilder->addGrid(&cylinder, 2);
gridBuilder->addGrid(stl, 3);
gridBuilder->addGrid(&cylinder, 1);
gridBuilder->addGrid(stl, 2);
if( threeDimensional ) gridBuilder->setPeriodicBoundaryCondition(false, false, false);
else gridBuilder->setPeriodicBoundaryCondition(false, true, false);
......@@ -214,13 +214,13 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
//SPtr<BoundaryCondition> bcMX_2 = std::make_shared<IsothermalWall>( dataBase, Vec3(0, 0, 0), prim.lambda, false );
//SPtr<BoundaryCondition> bcPX_2 = std::make_shared<IsothermalWall>( dataBase, Vec3(0, 0, 0), prim.lambda, false );
SPtr<BoundaryCondition> bcMX_2 = std::make_shared<Symmetry>( dataBase, 'x' );
SPtr<BoundaryCondition> bcPX_2 = std::make_shared<Symmetry>( dataBase, 'x' );
//SPtr<BoundaryCondition> bcMX_2 = std::make_shared<Symmetry>( dataBase, 'x' );
//SPtr<BoundaryCondition> bcPX_2 = std::make_shared<Symmetry>( dataBase, 'x' );
//SPtr<BoundaryCondition> bcMX_2 = std::make_shared<Pressure2>( dataBase, c1o2 * prim.rho / prim.lambda );
//SPtr<BoundaryCondition> bcPX_2 = std::make_shared<Pressure2>( dataBase, c1o2 * prim.rho / prim.lambda );
bcMX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x < -0.5*L && center.z > 1.0; } );
bcPX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x > 0.5*L && center.z > 1.0; } );
//bcMX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x < -0.5*L && center.z > 1.0; } );
//bcPX_2->findBoundaryCells( meshAdapter, false, [&](Vec3 center){ return center.x > 0.5*L && center.z > 1.0; } );
//////////////////////////////////////////////////////////////////////////
......@@ -269,7 +269,7 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
burner->findBoundaryCells( meshAdapter, false, [&](Vec3 center){
return center.z > 0.8 && center.z < 1.0 && std::sqrt(center.x*center.x + center.y*center.y) < 0.1;
return center.z > 0.8 && center.z < 1.5 && std::sqrt(center.x*center.x + center.y*center.y) < 0.1;
} );
//////////////////////////////////////////////////////////////////////////
......@@ -277,8 +277,8 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
dataBase->boundaryConditions.push_back( bcMX );
dataBase->boundaryConditions.push_back( bcPX );
dataBase->boundaryConditions.push_back( bcMX_2 );
dataBase->boundaryConditions.push_back( bcPX_2 );
//dataBase->boundaryConditions.push_back( bcMX_2 );
//dataBase->boundaryConditions.push_back( bcPX_2 );
dataBase->boundaryConditions.push_back( bcMY );
dataBase->boundaryConditions.push_back( bcPY );
......@@ -376,7 +376,7 @@ void thermalCavity( std::string path, std::string simulationName, uint restartIt
if(
//( iter >= 7000 && iter % 10 == 0 ) ||
( iter % 1000 == 0 )
( iter % 10000 == 0 )
)
{
dataBase->copyDataDeviceToHost();
......@@ -426,7 +426,7 @@ int main( int argc, char* argv[])
try
{
uint restartIter = INVALID_INDEX;
//uint restartIter = 13000;
//uint restartIter = 80000;
if( argc > 1 ) restartIter = atoi( argv[1] );
......
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