CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

compressibleInterFoam: Negative temperature or printStack

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2020, 12:03
Default compressibleInterFoam: Negative temperature or printStack
  #1
New Member
 
Robson Leo Pachaly
Join Date: Oct 2019
Posts: 3
Rep Power: 2
rpachaly is on a distinguished road
Hello,

I'm trying to simulate a system with several inflows and one outflow that changes the flow rate during the simulation. I want to know the pressurization in three points when the outflow is reduced (see image attached and the U file). There is also some connections to the atmosphere where I am not interested in pressurization. The image attached shows the geometry of the system (don't judge the mesh, it's just an old mesh for demonstration).

I usually get two errors when I'm trying to solve this system: negative temperature and printStack error. What I've tried and not worked:
  • Limit Temperature
  • Increase the computational domain
  • Refine the mesh
  • Change fvSchemes and fvSolution

When I consider the atm locations as wall instead of atmosphere BC's, the model runs. But I really don't want this extra pressurization at the points where I have atm (see image).

I want to use the kOmegaSST as turbulence model in a near future. But at this moment I'm turning off the turbulence model.

My BC's for p, p_rgh, T, and U are:

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

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

internalField   uniform 100000;

boundaryField
{
    walls
    {
        type            calculated;
		value $internalField;
    }

	atm
	{
        type            calculated;
		value $internalField;
	}

    inletTop
    {
        type            calculated;
		value $internalField;
    }

    inletBottom
    {
        type            calculated;
		value $internalField;
    }
	
	inletPipe2
    {
        type            calculated;
		value $internalField;
    }
	
	inletPipe3
    {
        type            calculated;
		value $internalField;
    }
	
	inletPipe1
    {
        type            calculated;
		value $internalField;
    }

    outlet
    {
        type            calculated;
		value $internalField;
    }

}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 1e5;

boundaryField
{

	outlet
    {
        type            zeroGradient;
    }
	
	
    ".*"
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    walls
    {
        type            zeroGradient;
    }
	
    atm
    {
        type            inletOutlet;
		inletValue uniform 300;
    }

    inletTop
    {
        type            zeroGradient;
    }

    inletBottom
    {
        type            zeroGradient;
    }
	
	inletPipe1
    {
        type            zeroGradient;
    }

    inletPipe2
    {
        type            zeroGradient;
    }

    inletPipe3
    {
        type            zeroGradient;
    }


    outlet
    {
        type            zeroGradient;
    }

}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    walls
    {
        type            noSlip;
    }

	atm
    {
        type            pressureInletOutletVelocity;
        value           $internalField;
    }

    inletTop
    {
        type            flowRateInletVelocity;
        volumetricFlowRate constant 7.7;
    }
	
	inletBottom
    {
        type            flowRateInletVelocity;
        volumetricFlowRate constant 7.2;
    }
	
	inletPipe1
    {
        type            flowRateInletVelocity;
        volumetricFlowRate constant 3.4;
    }
	
	inletPipe2
    {
        type            flowRateInletVelocity;
        volumetricFlowRate constant 3.4;
    }
	
	inletPipe3
    {
        type            flowRateInletVelocity;
        volumetricFlowRate constant 3.4;
    }
		
	outlet
    {
		type            flowRateOutletVelocity;
		volumetricFlowRate  table
		(
			(0 27.5)
			(59 27.5)
			(60 12)
			(180 12)
			(181 27.5)
			(240 27.5)
		);
	}

}
My fvSolution and fvSchemes are:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;
        cAlpha          1;

        MULESCorr       no;
        nLimiterIter    5;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-10;
        relTol          0;
    }

    "pcorr.*"
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-12;
            relTol          0;
            smoother        DICGaussSeidel;
        }
        tolerance       1e-12;
        relTol          0;
        maxIter         200;
    }

    ".*(rho|rhoFinal)"
    {
        solver          diagonal;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance       1e-12;
        relTol          0.01;
        smoother        DIC;
    }

    p_rghFinal
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-12;
            relTol          0;
            nVcycles        2;
            smoother        DICGaussSeidel;
            nPreSweeps      2;
        }
        tolerance       1e-12;
        relTol          0;
        maxIter         20;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-10;
        relTol          0;
        nSweeps         1;
    }

    "(T|k|B|nuTilda).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-10;
        relTol          0;
    }
	
	"(U|k|omega|s).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        nSweeps         1;
        tolerance       1e-10;
        relTol          0.1;
    };
}



PIMPLE
{
    momentumPredictor no;
    transonic       no;
    nOuterCorrectors 1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes 
{
   default                  Euler;                           // first order in time
} 

gradSchemes
{
    default             Gauss linear;                
}

divSchemes // Convection Schemes Settings
{
 
   default                                            none;    
   div(phi,alpha)                                  Gauss vanLeer; 
   div(rhoPhi,U)                                   Gauss linearUpwind grad(U);  // UEqn
   div(((rho*nuEff)*dev2(T(grad(U)))))    Gauss linear; // vanLeer;
   div(rhoPhi,T)                                    Gauss upwind;    // TEqn
   div(rhoPhi,p)                                    Gauss linear;
   div(phi,p)                                        Gauss linear;
   div(rhoPhi,K)                                    Gauss linear;    // TEqn     
   div(phirb,alpha)                                Gauss interfaceCompression 1; // alphaEqn
}

laplacianSchemes
{
   default              Gauss linear corrected;
}

interpolationSchemes
// interpolating cell-centred values to face values
{
   default                      linear;                              
}
snGradSchemes
{
     default                  corrected;
}


wallDist
{
    method meshWave;
}

I believe that the problem is at my BC's. Are they making sense?

Thank you!
Attached Images
File Type: jpg image.jpg (27.3 KB, 7 views)
rpachaly is offline   Reply With Quote

Old   July 10, 2020, 04:09
Default
  #2
Member
 
Join Date: May 2016
Posts: 39
Rep Power: 6
dzordz is on a distinguished road
Hi,


I think, based on my own experience, that this negative temperatures crashes are happening because of the algebraic numerical method calculating the interface. Basically the use of MULES and artificial compression. I would suggest using a geometric description of the interface (isoADVECTOR). The compressible solver compressibleInterIsoFoam was just released with the v2006 release. This should greately stabilize your simulations and hopefully avoid any further crashes (while improving your solution accuracy).


Cheers.
dzordz is offline   Reply With Quote

Old   July 11, 2020, 14:28
Default
  #3
New Member
 
Robson Leo Pachaly
Join Date: Oct 2019
Posts: 3
Rep Power: 2
rpachaly is on a distinguished road
Thank you so much for your reply. I'm using the interIsoFoam and it is stable right now.
rpachaly is offline   Reply With Quote

Reply

Tags
compressible, compressibleinterfoam, multiphase, negative temperature, printstack

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 12 July 11, 2019 17:33
Negative Temperature chtMultiRegionSimpleFoam + thermalBaffle1D + Radiation jaydeep OpenFOAM 4 November 23, 2017 19:48
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
negative fluid temperature JeanPierre FLOW-3D 2 January 3, 2012 16:24


All times are GMT -4. The time now is 15:01.