CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Transonic and compressible case with chtMultiRegion-Solver (https://www.cfd-online.com/Forums/openfoam-solving/240400-transonic-compressible-case-chtmultiregion-solver.html)

erebos23 January 3, 2022 08:10

Transonic and compressible case with chtMultiRegion-Solver
 
1 Attachment(s)
Hello all,

I would like to analyze the cooling of a plunger in a steady-state simulation. The plunger is cooled by air. The air enters the system at 4.5 bar (absolute pressure) and leaves at atmospheric pressure. On the outside of the plunger, a heat flow is specified that increases linearly from the top to the bottom of the plunger.

The attached picture shows a quarter of the geometry. The air flows into the system from the right, leaves the cooling tube via the small cooling holes. Then flows along between the cooling tube and the plunger and leaves the system again via the larger holes.

The mesh was created with Salome and checkMesh shows that this is OK. I would like to compare my results with similar simulations done with Ansys. In both cases tetrahedral meshes are/were used.

My problem is that the solution does not converge, but terminates prematurely due to negative temperatures. I have uploaded my case at the following link: https://www.dropbox.com/sh/pkq7ketpc...QbAeYKJAa?dl=0

Reducing the relaxation factors does lead to a slight improvement in the convergence behavior, but the simulation terminates here as well.

What else could I test out to get the simulation to work?

Thanks a lot for your help in advance.

With kind regards
erebos23

erebos23 January 4, 2022 15:34

I have checked my boundary conditions once with a compressible fluid, here the calculation also runs quite normally. However, when I switch to a compressible fluid, the simulation stops after a certain time at a pressure difference of 0.15 bar due to negative temperatures.


Do I probably have a mistake in the definition of the boundary conditions? I use the following boundary conditions for the fluid:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0/fluid";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 1 -1 -2 0 0 0 0 ];

internalField  uniform 95000;

boundaryField
{

    inlet
      {
            type              calculated;
            value        $internalField;           
      }
 
      outlet
      {
            type              calculated;
            value        $internalField;   
        }
     
      sym_fluid
      {   
            type              symmetry;   
      }
     
      fluid_to_solid
      {
            type              calculated;
            value        $internalField;   
      }
}

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0/fluid";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 1 -1 -2 0 0 0 0 ];

internalField  uniform 100000;

boundaryField
{
        inlet
        {
                type            prghTotalPressure;
                p0              uniform 110000;
                value        uniform 110000;
        }
   
        outlet
        {
                type          prghPressure;
                p              uniform 95000;
                value        uniform 95000;
        }
       
      sym_fluid
      {   
              type        symmetry;
      }
     
      fluid_to_solid
      {
                type            zeroGradient;       
      }
}

Code:


FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0/fluid";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 1 -1 0 0 0 0 ];

internalField  uniform (0 0 0);

boundaryField
{
        inlet
        {
            type            pressureInletVelocity;
            value          $internalField;
        }
   
        outlet
        {
            type            pressureInletOutletVelocity;
            value          $internalField;
        }
     
      sym_fluid
      {   
          type        symmetry;
      }
     
      fluid_to_solid
      {
            type              noSlip;       
      }
}

Or should I change something in my solver settings? Here I use the following settings for fvSchemes and fvSolution:



Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        steadyState;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default            none;

    div(phi,U)          bounded Gauss upwind;

    energy              bounded Gauss upwind;
    div(phi,K)          $energy;
    div(phi,h)          $energy;

    turbulence          bounded Gauss upwind;
    div(phi,k)          $turbulence;
    div(phi,epsilon)    $turbulence;
    div(phi,R)          $turbulence;
    div(R)              Gauss linear;

    div(Ji,Ii_h)        Gauss linearUpwind grad(U);
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear uncorrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        uncorrected;
}

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    rho
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-6;
        relTol          0;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance        1e-6;
        relTol          0.01;
        smoother        GaussSeidel;
    }

    "(U|h|k|epsilon|G|Ii)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance        1e-6;
        relTol          0.1;
    }
 
}

SIMPLE
{
    momentumPredictor yes;
    nNonOrthogonalCorrectors 1;
    rhoMin          0.2;
    rhoMax        10;
}

relaxationFactors
{
    fields
    {
        rho            0.1;
        p_rgh          0.1;
    }
    equations
    {
        U              0.1;
        h              0.1;
        "(k|epsilon|omega)" 0.1;
    }
  }

Or should I test the komegaSST turbulence model instead of kepsilon?



Thanks for your help in advance.


Best regards.
erebos23

barbarian_subhkaran April 30, 2024 00:27

Maybe the problem is with the mesh
 
I suffered from the same problem, with negative temperatures, while using rhoCentralFoam for supersonic flows. The answer was either a too-coarse or a too fine mesh. Find an optimized mesh resolution and try again.


All times are GMT -4. The time now is 07:28.