Commit d92a461e authored by Jan Schäfer's avatar Jan Schäfer
Browse files

rozjeto mimo rotace u advekce

parent 36801887
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ operator()( const MeshFunction& u,
    const IndexType& east = neighbourEntities.template getEntityIndex< 1 >(); 
    const IndexType& west = neighbourEntities.template getEntityIndex< -1 >();
    return (0.5 / this->tau) * ( u[ west ] - 2.0 * u[ center ]  + u[ east ] ) 
          - 0.5 * hxInverse * ( u[ west ] * this->velocity[ west ] - u[ east ] * this->velocity[ east ] );
          - 0.5 * hxInverse * ( u[ east ] * this->velocity[ east ] - u[ west ] * this->velocity[ west ] );
}

template< typename MeshReal,
+2 −2
Original line number Diff line number Diff line
@@ -48,8 +48,8 @@ operator()( const MeshFunction& u,
   const IndexType& west = neighbourEntities.template getEntityIndex< -1 >();
   return (0.5 / this->tau) * ( u[ west ] - 2.0 * u[ center ]  + u[ east ] ) 
          - 0.5 * hxInverse * 
          (( u[ west ] + this->pressure[ west ] ) * velocity[ west ]  
          - (u[ east ] + this->pressure[ east ] ) * velocity[ east ] );
          (( u[ east ] + this->pressure[ east ] ) * velocity[ east ]  
          -( u[ west ] + this->pressure[ west ] ) * velocity[ west ] );
}

template< typename MeshReal,
+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ operator()( const MeshFunction& u,
   const IndexType& west = neighbourEntities.template getEntityIndex< -1 >();
   return (0.5 / this->tau) * ( u[ west ] - 2.0 * u[ center ]  + u[ east ] ) 
          - 0.5 * hxInverse * 
          (( u[ west ] * this -> velocity[ west ] + this -> pressure [ west ] ) 
          - (u[ east ] * this -> velocity[ east ] + this -> pressure [ east ] ));
          (( u[ east ] * this -> velocity[ east ] + this -> pressure [ east ] ) 
          -( u[ west ] * this -> velocity[ west ] + this -> pressure [ west ] ));
}

template< typename MeshReal,
+17 −5
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#include <functions/tnlConstantFunction.h>
#include "eulerProblem.h"
#include "LaxFridrichs.h"
#include "tnlMyMixedBoundaryConditions.h"

#include "eulerRhs.h"
#include "eulerBuildConfigTag.h"
@@ -31,6 +32,7 @@ template< typename ConfigTag >class eulerConfig
         config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet");
            config.addEntryEnum< tnlString >( "dirichlet" );
            config.addEntryEnum< tnlString >( "neumann" );
            config.addEntryEnum< tnlString >( "mymixed" );
         config.addEntry< double >( "boundary-conditions-constant", "This sets a value in case of the constant boundary conditions." );
         config.addEntry< double >( "left-density", "This sets a value of left density." );
         config.addEntry< double >( "left-velocity", "This sets a value of left velocity." );
@@ -98,11 +100,21 @@ class eulerSetter
             SolverStarter solverStarter;
             return solverStarter.template run< Problem >( parameters );
          }
          if( boundaryConditionsType == "mymixed" )
          {
             typedef tnlMyMixedBoundaryConditions< MeshType, MeshFunction, MeshType::getMeshDimensions(), Real, Index > BoundaryConditions;
             typedef eulerProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
             SolverStarter solverStarter;
             return solverStarter.template run< Problem >( parameters );
          }
          if( boundaryConditionsType == "neumann" )
          {
             typedef tnlNeumannBoundaryConditions< MeshType, MeshFunction, Real, Index > BoundaryConditions;
             typedef eulerProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
             SolverStarter solverStarter;
             return solverStarter.template run< Problem >( parameters );
          }
        }

};

+1 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ class EulerVelGetter

      static tnlString getType();
      
      EulerVelGetter( const MeshFunctionType& rhoX,
      EulerVelGetter( const MeshFunctionType& rho,
                      const MeshFunctionType& rhoVelX,
                      const MeshFunctionType& rhoVelY)
      : rho( rho ), rhoVelX( rhoVelX ), rhoVelY( rhoVelY )
@@ -37,7 +37,6 @@ class EulerVelGetter
      __cuda_callable__
      Real operator[]( const IndexType& idx ) const
      {
cout << idx << endl;
         if (this->rho[ idx ]==0) return 0; else return sqrt( pow( this->rhoVelX[ idx ] / this->rho[ idx ], 2) + pow( this->rhoVelY[ idx ] / this->rho[ idx ], 2) ) ;
      }

Loading