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

How to run in transient the airFoil2D (simpleFoam) tutorial case?

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

Like Tree1Likes
  • 1 Post By Kina

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2017, 05:38
Default How to run in transient the airFoil2D (simpleFoam) tutorial case?
  #1
New Member
 
Join Date: Sep 2016
Posts: 5
Rep Power: 9
csacska is on a distinguished road
I am a beginner OpenFOAM user but it is clear that the simpleFoam solver is a steady one and the pimpleFoam or pisoFoam has to be used for incompressible transients simulations. I would like to run the airFoil2D case in transient and I need some help for it. I tried to modificate the controlDict, fvSchemes, fvSolution files in accordance with the pitzDaily pimpleFoam version with no success. Is there anyone who could explain what to modificate in this case exactly?
csacska is offline   Reply With Quote

Old   June 19, 2017, 05:58
Default
  #2
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Hi and welcome!
How did you modify the files and what error does OpenFOAM give you?
Can you post your files as code?

Cheers
Alex
csacska likes this.
Kina is offline   Reply With Quote

Old   June 19, 2017, 06:38
Default
  #3
New Member
 
Join Date: Sep 2016
Posts: 5
Rep Power: 9
csacska is on a distinguished road
No error message
.
/Allrun
then commander says that "Running pimpleFoam on ..."
then it returns after some seconds, no solution files

controlDict:
application pimpleFoam (from simpleFoam)
and
i added the following row to the end: maxCo 5;

fvschemes:
here i changed the ddtSchemes to Euler

fvsolution:
here i changed Simple to Pimple method

My codes:
controlDict:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application pimpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 500;

deltaT 1;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo 5;


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


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

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

wallDist
{
method meshWave;
}


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

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

solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.1;
smoother GaussSeidel;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-08;
relTol 0.1;
}

nuTilda
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-08;
relTol 0.1;
}
}

PIMPLE
{
nNonOrthogonalCorrectors 0;
nCorrectors 2;
}


// ************************************************** *********************** //
csacska is offline   Reply With Quote

Old   June 19, 2017, 07:49
Default
  #4
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
You didn't define a pRefCell and a pRefValue for PIMPLE, which is sometimes needed when running with freestreamPressure BCs. I modified your fvSolution a little so you can see a better converged solution.

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

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.1;
        smoother        GaussSeidel;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-08;
        relTol          0.1;
    }

    nuTilda
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-08;
        relTol          0.1;
    }
    
    pFinal
    {
        $p;
        relTol    0;
    }
    UFinal
    {
        $U;
        relTol    0;
    }
    nuTildaFinal
    {
        $nuTilda;
        relTol     0;
    }
    
}

PIMPLE
{
    nNonOrthogonalCorrectors 0;
    nCorrectors 2;
    nOuterCorrectors        50;
    pRefCell        0;
    pRefValue       0;
    
    residualControl
    {
        p
        {
            relTol          0;
            tolerance      0.0001;
        }
        
        U
        {
            relTol          0;
            tolerance      0.0001;
        }
    }
    
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;
        nuTilda         0.7;
    }
}


// ************************************************************************* //
Kina is offline   Reply With Quote

Old   June 19, 2017, 09:08
Default
  #5
New Member
 
Join Date: Sep 2016
Posts: 5
Rep Power: 9
csacska is on a distinguished road
Thank you very much, it works. There is weird thing that I obtain results at random time steps such as 1.23234, 2.324234, 3.3159923, 4.25559, 5.157234...and so on

Meanwhile :
deltaT is 1
and writeInterval is every 50th timestep
csacska is offline   Reply With Quote

Old   June 19, 2017, 09:45
Default
  #6
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Yeah, this is because you initially set deltaT to 1 but then limit the whole thing by the MaxCo. This means that the initial time step will be 1, but then it gets much lower because of the Courant number. As you output the results not by information of time but timesteps, you get weird output times.
Put in your controlDict:

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

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         1;

deltaT          0.025;

writeControl    adjustableRunTime;

writeInterval   0.025;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           5;

// ************************************************************************* //
Kina is offline   Reply With Quote

Reply

Tags
airfoil2d, beginner, openfoam, transient

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
implementation of mapFields into parallel transient case simpomann OpenFOAM Pre-Processing 4 August 2, 2016 05:41
Unable to run the case parallel using foam-extend in the cluster farahaqilah OpenFOAM 0 July 28, 2016 00:49
Use XiFoam to run a laminar spherical flame case. fcrl-zxr OpenFOAM Running, Solving & CFD 0 June 8, 2015 12:11
Can't run a case in HelyxOS with an imported mesh from Fluent HHOS OpenFOAM Running, Solving & CFD 0 July 2, 2013 07:25
PS3 tutorial results mgarcia OpenFOAM 4 January 21, 2008 13:04


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