CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Unsteady simple-based sovler and dual time stepping (https://www.cfd-online.com/Forums/openfoam/88422-unsteady-simple-based-sovler-dual-time-stepping.html)

L1011 May 17, 2011 09:26

Unsteady simple-based sovler and dual time stepping
 
Hi Foamer!

I've been interested in implementing in openFoam the simple algorithm for the simulation of unsteady flows with a dual time stepping method. Before I start coding any stupid thing, I was wondering if:

  1. adding a time derivative in the currant simpleFoam solver is enough to make it become unsteady
  2. you could refer to me articles that discuss the dts implementation in incompressible solvers
It'll be interesting to see how an unsteady simple-based solver behave with respect to pisoFoam.

Great thanks!

L1011

niklas May 17, 2011 09:40

...and pimpleFoam is not good enough because?

nimasam May 17, 2011 09:48

i guess so, add fvm::ddt(U) to UEqn then
compare the result of simpleFoam for cavity with pisoFoam

L1011 May 18, 2011 11:28

Hi!
 
Thanks for your responses!

@Niklas: you're right pimpleFoam already provides the implementations I intended to do. But what about the dual time stepping? In fact what I'm trying to do is, for each physical iteration:
  1. move/deform a mesh
  2. execute sub-iterations until convergence is reached
  3. back to 1
and I'm wondering if the correction loops (nNonOrthogonalCorrectors, nOuterCorrectors, nCorrectors) can be considered as sub-iterations in the same meaning of the dual time step method?

L1011

L1011 May 20, 2011 11:17

1 Attachment(s)
Any guesses?

I used pimpleFoam to simulate the flow around a NACA0012 airfoil and the following settings:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \    /  O peration    | Version:  1.7.1                                |
|  \  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
    default        backward;
}
gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
}
divSchemes
{
    default        none;
    div(phi,U)        Gauss limitedLinearV 1;
    div(phi,k)        Gauss upwind;
    div(phi,omega)        Gauss upwind;
    div((nuEff*dev(grad(U).T())))        Gauss linear;
}
laplacianSchemes
{
    default        none;
    laplacian(nuEff,U)          Gauss linear corrected;
    laplacian((1|A(U)),p)          Gauss linear corrected;
    laplacian(DkEff,k)          Gauss linear corrected;
    laplacian(DomegaEff,omega)          Gauss linear corrected;
}
interpolationSchemes
{
    default        linear;
    interpolate(U)          linear;
}
snGradSchemes
{
    default        corrected;
}
fluxRequired
{
    default        no;
    p      ; 
}


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

Code:

/*--------------------------------*- C++ -*----------------------------------*\n| =========                |                                                |
| \      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \    /  O peration    | Version:  1.7.1                                |
|  \  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance      1e-7;
        relTol          0;
    mergeLevels  1;
    smoother  GaussSeidel;
    agglomerator faceAreaPair ;
    nCellsInCoarsestLevel  100;
    nPreSweeps 0;
    nPostSweeps 2;
    cacheAgglomeration true;
    }

    pFinal
    {
        solver          GAMG;
        tolerance      1e-7;
        relTol          0;
    mergeLevels  1;
    smoother  GaussSeidel;
    agglomerator faceAreaPair ;
    nCellsInCoarsestLevel  100;
    nPreSweeps 0;
    nPostSweeps 2;
    cacheAgglomeration true;
    }

    U
    {
        solver          smoothSolver;
        tolerance      1e-7;
        relTol          0;
    nSweeps  2;
    smoother  GaussSeidel;
    }
    UFinal
    {
        solver          smoothSolver;
        tolerance      1e-7;
        relTol          0;
    nSweeps  2;
    smoother  GaussSeidel;
    }


    k
    {
        solver          smoothSolver;
    smoother GaussSeidel ;
    nSweeps 1 ;
        tolerance        1e-7;
        relTol          0;
    }

    omega
    {
        solver          smoothSolver;
    smoother GaussSeidel ;
    nSweeps 1 ;
        tolerance        1e-7;
        relTol          0;
    };


    }
    PIMPLE
    {
        nNonOrthogonalCorrectors 4;
      pRefValue 1;
      pRefCell 0;   
        nOuterCorrectors 10;
        nCorrectors    2;
      };
      relaxationFactors
      {
      default                  1;
        p                  0.5;
        U                  0.5;
        k                  0.5;
        omega                  0.5;
      };
   

}

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

However,I made two strange observations:

1) Even-tough the aerodynamic coefficients get in absolute close to zero, they change significantly from one iteration to the other (see attached file).

2) The velocity field converges from the first outer iteration while the pressure needs couple iteration to get physical.

Do anyone has already experienced something similar?

Thanks in advance!

L1011


All times are GMT -4. The time now is 10:04.