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

Case termination pisoFOAM after certain residual threshold

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2020, 16:46
Unhappy Case termination pisoFOAM after certain residual threshold
  #1
New Member
 
MW
Join Date: Mar 2020
Location: UK
Posts: 1
Rep Power: 0
Mwill is on a distinguished road
Hi Foamers,

I am a relatively new CFD user and I'm interested in setting up case termination for my transient simulation in my custom solver based on PISOfoam (essentially I have just added a scalar transport equation for psi after the PISO algorithm).
I'm interested in stopping the simulation after the residuals in U, p have reached their steady value and after psi has dropped below a residual threshold e.g. at around 100s in my residual plot https://imgur.com/a/ojKUKQV before reaching endTime prescribed.
I'm not sure if the oscillations in residuals are affecting this in anyway but the actual solution seems to be fine - the physical situation is a simple laminar scalar transport case in a simple parallel plate so I don't think there is anything strange going on.

I think the functionality I'm interested in is implemented in residualControl.I've tried using it inside the PISO brackets and just inside fvSolution but neither seems to work for the parameters I set.
It seems e.g. in documentation https://www.openfoam.com/documentati...rmination.html this only works for SIMPLE and PIMPLE solvers but not PISO. I want an automated termination since I will be doing parameter sweeps so need to save on computation once a sufficiently steady state has been reached but for later simulations I will be interested in transient effects which is why I am using PISO at the moment so switching to SIMPLE wouldn't work for me.

Thanks,
MW

Example fvSolution file below:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-5;
        relTol          0.05;
        smoother        GaussSeidel;
        miniter         5;

    }

    pFinal
    {
        $p;
        smoother        DICGaussSeidel;
        tolerance       1e-5;
        relTol          0.0;
        minIter         5;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-6;
        relTol          0;
        miniter         5;
    }

    psi
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-6;
        relTol          0;
        minIter         5;
    }
}

PISO
{
    nCorrectors     3;
    nNonOrthogonalCorrectors 0; 

}

residualControl
   {
       p 0.8e-5;
       U 0.8e-6;
       // Uz 1e-5;
       psi 0.8e-6;
   }

// ************************************************************************* //
Mwill is offline   Reply With Quote

Reply

Tags
automation, residual control, termination


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
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 10:10
Segmentation fault when using reactingFOAM for Fluids Tommy Floessner OpenFOAM Running, Solving & CFD 4 April 22, 2018 13:30
HeatSource BC to the whole region in chtMultiRegionHeater xsa OpenFOAM Running, Solving & CFD 3 November 7, 2016 06:07
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 07:37


All times are GMT -4. The time now is 18:51.