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

chtMultipleRegionFoam: quenching, temperature problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2021, 18:30
Default chtMultipleRegionFoam: quenching, temperature problem
  #1
New Member
 
Join Date: Mar 2021
Posts: 6
Rep Power: 5
velikaDjoka is on a distinguished road
Hello everyone ,

I have to modelise a quenching of a block ( at 1000 °C) in a chamber at the same temperature with a gas (air for now) injected a 20°C and a velocity of 10 m/s (through the tubes). The outlet is the dark blue circle at the back.

furnace.jpeg

All the time the simulation crashes after a few iterations due to either a temperature explosion or negative temperatures.

I have tried to refine the mesh, change some boundary conditions, lower the relaxation factors... Unfortunately, I always crashed for min/max T that diverged

Here is the error left by the log file:

log.txt

All my schemes are set to upwind ( except for K an the stress tensor which are set to linear) . I can't do more stable than that, the error should be in the boundary conditions .

Below there are a few details of the conditions I am imposing: I really don't know what is wrong. I tried to change for the temperature multiple times the only time it did not crash was when I set an internalField of temperature at the same temperature as the inlet ( 293 K ) , but the results had no sens and it is not the situation I want to study.

Can somebody give me some advice or how to do to solve that problem ? Or may be is there something else that the BCs that could be wrong in that kind of situation?

Sorry for this long message but I wanted to set correctly my problem.

Thank you in advance

Details:

For the fluid my change dictionary is
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

boundary
{
    outlet
    {
        type            patch;
    }
    "inlet.*"
    {
        type            patch;
    }
    walls
    {
        type            wall;
    }

}

U
{
    internalField   uniform (0 0 0);

    boundaryField
    {
        walls
        {
            type            noSlip;
        }
        vaccum_to_block ///// --------------------
        {
            type            noSlip;
        }
        outlet
        {
            type            zeroGradient;
            value           uniform (0 0 0);
        }

        "inlet.*" // change here in case of problem
        {
            type            codedFixedValue;
            value           uniform (0 0 0);
            name            inletNbc;

            code
            #{ 
                // Patch is an object of class fvPatch
                const fvPatch& patch = this->patch();

                // n stores all surface normal vectors
                const vectorField& n = patch.nf();

                scalar Uinlet = 10;

                scalarField U (this->size(), Uinlet);

                operator==(U * n);

            #};

        }

        "procBoundary.*"
        {
            type            processor;
        }
    }
}

T
{
    internalField   uniform 1273;

    boundaryField
    {
        walls
        {
            type            zeroGradient;
            value           $internalField;
        }
        outlet
        {
            type            zeroGradient;
            value           $internalField;
        }
        "inlet.*"
        {
            type            fixedValue;
            value           uniform 293; // 20 deg
        }

        "procBoundary.*"
        {
            type            processor;
        }

        "vaccum_to_.*"
        {
            type            compressible::turbulentTemperatureCoupledBaffleMixed; // check incompressible 
            // check : https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1temperatureCoupledBase.html
            Tnbr            T;
            kappaMethod     fluidThermo;
            value           $internalField;
        }
    }
}

epsilon
{
    // Set the value on all bc to non-zero. Not used in simulation
    // since zeroGradient; only used in initialisation.
    internalField   uniform 0.01;

    boundaryField
    {
        walls
        {
            type            epsilonWallFunction; //compressible::epsilonWallFunction;
            value           uniform 0.01;
        }

        "vaccum_to_.*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }

        "inlet.*" // ----------------------------------------------- check
        {
            type            inletOutlet;
            inletValue		$internalField;
            //turbulentMixingLengthDissipationRateInlet;
            //mixingLength    0.02;
            value           $internalField;
        }

        outlet
        {
            type            zeroGradient;
        }


        "procBoundary.*"
        {
            type            processor;
        }
    }
}

k
{
    internalField   uniform 0.1;

    boundaryField
    {
        "inlet.*"
        {
            type            inletOutlet;
            inletValue		$internalField;
            // turbulentIntensityKineticEnergyInlet;
            //intensity       0.05;
            value           $internalField;
        }
        outlet
        {
            type            zeroGradient;
        }
        walls
        {
            type            kqRWallFunction;
            value           $internalField;
        }
        "vaccum_to_.*"
        {
            type            kqRWallFunction;
            value           $internalField;
        }

        "procBoundary.*"
        {
            type            processor;
        }
    }
}

p_rgh
{
    internalField   uniform 5e5;

    boundaryField
    {
        walls // ------------------------ check for inlets 
        {
            type            fixedFluxPressure; // bc for walls 
            value           $internalField; // 1e5 pressure without static pressure
        }
        "inlet.*" // ------------------------ check for inlets : ok cht 33 
        {
            type            fixedFluxPressure; // bc for walls 
            value           $internalField; // 1e5 pressure without static pressure
        }

        outlet
        {
            type            zeroGradient;
        }
        vaccum_to_block // ------------------------ check for inlets 
        {
            type            fixedFluxPressure; // bc for walls 
            value           $internalField; // 1e5 pressure without static pressure
        }


        "procBoundary.*"
        {
            type            processor;
        }
    }
}

p
{
    internalField   uniform 1e5; // 1 bar 

    boundaryField
    {
        ".*"
        {
            type            calculated; // zeroGradient
            value           $internalField;
        }
        "procBoundary.*"
        {
            type            processor;
        }
    }
}

// ************************************************************************* //

the fluid's fvSolution

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "(rho|rhoFinal)"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-7;
        relTol          0;
    }

    p_rgh
    {
        solver           GAMG;
        tolerance        1e-7;
        relTol           0.01;

        smoother         GaussSeidel;

    }

    p_rghFinal
    {
        $p_rgh;
        tolerance        1e-7;
        relTol           0;
    }

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

    "(U|h|k|epsilon|R)Final"
    {
        $U;
        tolerance        1e-07;
        relTol           0;
    }
}

PIMPLE
{
    momentumPredictor   yes;
    nCorrectors         1;
    nOuterCorrectors 100;
    nNonOrthogonalCorrectors 0;
    pRefCell    0;
    pRefValue   1e5;

    outerCorrectorResidualControl // residualControl
    {
        p 
        {
            tolerance 1e-4;
            relTol 0;
        }

        U 
        {
            tolerance 1e-5;
            relTol 0;
        }

        h
        {
            tolerance 1e-4;
            relTol 0;
        }

    }

}

relaxationFactors
{
    fields
    {
        p_rgh 0.3;
    }
    equations
    {
        "U.*"  0.7;
        "(k|epsilon)" 0.5;
        "(h|e)"       0.5;
    }
}


// ************************************************************************* //


and the changeDirectory for the solid block


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

boundary
{
    // As there is no boundary (inside the block)
}

T
{
    internalField   uniform 1273;

    boundaryField
    {
        "procBoundary.*"
        {
            type            processor;
        }

        "block_to_.*"
        {
            type            compressible::turbulentTemperatureCoupledBaffleMixed;
            Tnbr            T;
            kappaMethod     solidThermo;
            value           uniform 1273; // 1000 deg 
        }
    }
}


// ************************************************************************* //
Attached Images
File Type: jpg Screenshot at 2021-03-17 23-36-56.jpg (170.4 KB, 25 views)
velikaDjoka is offline   Reply With Quote

Old   March 22, 2021, 00:23
Default
  #2
Member
 
W.T
Join Date: Oct 2012
Posts: 35
Rep Power: 13
dybuk is on a distinguished road
You can strictly bound temperature in the solver to the specified limits by using fvOption "limitTemperature"
https://www.openfoam.com/documentati...mperature.html
dybuk is offline   Reply With Quote

Old   March 23, 2021, 17:24
Default
  #3
New Member
 
Join Date: Mar 2021
Posts: 6
Rep Power: 5
velikaDjoka is on a distinguished road
Yes I applied this and I saw when I got the results that instead of injecting gas through the inlets, they were sucking the air from the chamber. So initially it was an error in the BCs. Now I don't need the limiter anymore.

Thank you very much !
velikaDjoka is offline   Reply With Quote

Reply


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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
Problem in temperature profiles while using rhoSimpleFoam for Nozzle case Nik_04 OpenFOAM Running, Solving & CFD 0 February 4, 2017 05:04
Problem with Turbulent Heat Flux Temperature boundary condition Manuel CFD OpenFOAM Running, Solving & CFD 11 March 17, 2016 15:12
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 17:00
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27


All times are GMT -4. The time now is 23:44.