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

Sudden Increase of residuals

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By shock77

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2020, 04:46
Default Sudden Increase of residuals
  #1
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Hi,


I am trying to run a simulation with openfoam4 and rhoCentralFoam. I am trying to model the supersonic outflow from a pressure vessel and I am interested in transient effects.


I have attached an image of the residuals. They rise slighty and then basically explode. I have tracked the min and max values of U, p and T during runtime. Just before the crash, the temperature drops close to 0 in some areas and rises to 1e200 in other parts. I have tried to limit the temperature but it didnt work (I dont know why):


Code:
temperatureLimit
{
    type            limitTemperature;
    active          true;

        limitTemperatureCoeffs
        {
            selectionMode   all;
            Tmin     10;
            Tmax     10000;
        }
}
It works if I run the simulation first order, but I want it to run second order for more accuracy. Here is my fvSchemes dict:


Code:
fluxScheme      Kurganov;

ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         cellLimited Gauss linear 1;
}

divSchemes
{
    default         Gauss linear;
    div(tauMC)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
    reconstruct(rho) vanAlbada;
    reconstruct(U)   vanAlbadaV;
    reconstruct(T)   vanAlbada;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}
I also tried CrankNicolson with varying coefficient and tried different Courant numbers (0.1 - 0.5). Nothing helped so far.


My Boundary Conditions are:


Inlet: Outlet:



p - uniformTotalPressure; p - waveTransmissive;

T - uniformTotalTemperature; T - inletOutlet;

U - pressureInletOutletVelocity; U - inletOutlet;



Walls are all slip.


Maybe someone has some good advice.
Attached Images
File Type: jpg residuals.jpg (64.0 KB, 67 views)
shock77 is offline   Reply With Quote

Old   October 21, 2020, 07:51
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
I have noticed, that fvOptions is not included in rhoCentralFoam.


So I have added a few lines into a custom solver and included fvOption.H and createFvOptions.H:


Code:
if (!inviscid)
        {
    fvScalarMatrix EEqnRCF
    (
     fvm::ddt(rho, e) - fvc::ddt(rho, e)
        - fvm::laplacian(turbulence->alphaEff(), e) ==
        fvOptions(rho, e)
    );

    fvOptions.constrain(EEqnRCF);
        EEqnRCF.solve();

        fvOptions.correct(e);
            thermo.correct();
            rhoE = rho*(e + 0.5*magSqr(U));
        }



limitTemperature seems to work now.
acgnipper and saladbowl like this.
shock77 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
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 172 December 6, 2024 07:20
RhoCentralFoam sudden increase of u and drop of T Friendly OpenFOAM Running, Solving & CFD 2 December 15, 2019 07:21
under-relaxation factors -> level of residuals Zigainer FLUENT 19 July 21, 2017 17:53
About the differences between residuals and imbalance Stabum CFX 2 November 27, 2015 05:11
what to monitor besides residuals? franzdrs FLUENT 5 March 21, 2013 04:59


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