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

rhoSimpleFoam - Newbie Issues

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sapujapu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2020, 12:05
Default rhoSimpleFoam - Newbie Issues
  #1
Member
 
Andy Robertson
Join Date: Mar 2009
Location: Long Island NY
Posts: 46
Rep Power: 17
AndyR is on a distinguished road
Folks,
First time using OpenFoam
about 30 yrs using other tools, but feeling like a newb ;-)

Running a small tube bundle problem.
Used the square bend as my starting template and it runs just fine.

The job starts, gets to time = 1 and then just stops.

attached is the dict, and log file.
I can upload the whole thing if necessary.
But first question.

Can I get more verbose output?

Is there a reference pressure in here somewhere? Not sure why the pressure control is showing pMin as low as it is. I have set the back pressure at the outlet to be just above atmospheric. I would expect the inlet pressure to rise to whatever is required to push the flow.

I have clearly made an error in my setup, but can't seem to find it.
Any help is appreciated.
Thanks
Andy
Attached Files
File Type: txt controlDict.txt (1.2 KB, 18 views)
File Type: txt log.txt (2.2 KB, 19 views)
AndyR is offline   Reply With Quote

Old   January 29, 2020, 15:02
Default Follow Up #1
  #2
Member
 
Andy Robertson
Join Date: Mar 2009
Location: Long Island NY
Posts: 46
Rep Power: 17
AndyR is on a distinguished road
So I ran
rhoSimpleFoam -dry-run

And... it looks like the solver tries to run

Starting time loop

Time = 1

GAMG: Solving for Uy, Initial residual = 0.40392, Final residual = 0.000781681, No Iterations 1
GAMG: Solving for Uz, Initial residual = 1, Final residual = 0.000715822, No Iterations 1
GAMG: Solving for e, Initial residual = 1, Final residual = 0.00697091, No Iterations 1
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0537728, No Iterations 1
time step continuity errors : sum local = 18767.5, global = 18767.5, cumulative = 18767.5
GAMG: Solving for epsilon, Initial residual = 1, Final residual = 2.09567e-16, No Iterations 1
GAMG: Solving for k, Initial residual = 1, Final residual = 3.25556e-07, No Iterations 1
ExecutionTime = 0.68 s ClockTime = 1 s

End
So....
Is running -dry-run really just running the first time step /iter?
If so , why does it seem to hang when I try and run the whole job?

Hmmm

Any help is appreciated
Thanks
Andy
AndyR is offline   Reply With Quote

Old   January 29, 2020, 17:56
Default Follow Up # 2
  #3
Member
 
Andy Robertson
Join Date: Mar 2009
Location: Long Island NY
Posts: 46
Rep Power: 17
AndyR is on a distinguished road
So Dry run does not as far as I can tell give me an snapshot of the initial field. That is always an useful debugging tool. Is there a way to do that in OpenFoam?

I did try some different smoother settings and was told residuals were 1e200.
Clearly something wrong. My guess is my initialization of BCs, but I cant find it.

On question.
nCellsInCoarsestLevel was set to some number of order 10 in the example.

For a 625,000 cell model that seems ludicrously small.

Is there any documentation on solver/bc dependencies? solver initial condition dependencies? I have my sym boundaries in all my time 0 files. Not sure that is necessary, or that I specified them correctly.

My mesh has 4 sym planes, 2 define discontinuous boundaries. Do those need to be broken up?

Any help is appreciated
Thanks
Andy
Attached Images
File Type: png HX_PointwiseGrid_ExtrudedTrisAndQuads.png (11.0 KB, 28 views)
AndyR is offline   Reply With Quote

Old   January 30, 2020, 04:33
Default
  #4
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19
tas38 is on a distinguished road
Andy,


More information is needed. Most notably, your boundary condition files and a log file after the simulation has run for a while. I would not overly focus on the specifics of the linear solver settings at this stage.



I assume that since your first post your simulation now runs for a bit as you have stated the residuals are very large, i.e. the solution is diverging.
tas38 is offline   Reply With Quote

Old   January 30, 2020, 11:09
Default Status
  #5
Member
 
Andy Robertson
Join Date: Mar 2009
Location: Long Island NY
Posts: 46
Rep Power: 17
AndyR is on a distinguished road
Troy,
So it doesn't really run, I fiddled with changed to simpler diagonal solver and got a little output.

Log file is fairly sparse. I know the mistake is mine, but just not getting enough feedback from the code to determine the issue. Can I get a more verbose log file?

It is also not clear what the difference is between
symmetry and symmetryPlane

The Log and BC files are below

Any help is appreciated
Thanks
Andy


Log file:

PHP Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  [url]www.openfoam.com[/url]                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  _f3950763fe-20191219 OPENFOAM=1912
Arch   
"LSB;label=32;scalar=64"
Exec   : /opt/OpenFOAM/OpenFOAM-v1912/platforms/linux64Gcc63DPInt32Opt/bin/rhoSimpleFoam
Date   
Jan 30 2020
Time   
09:51:33
Host   
FLWS03
PID    
28327
I
/O    uncollated
Case   : /home/arobertson/OpenFOAM/arobertson-v1912/run/HXER
nProcs 
1
trapFpe
Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh 
for time 0


SIMPLE
convergence criteria
    field p     tolerance 0.001
    field U     tolerance 0.0001
    field e     tolerance 0.001
    field 
"(k|epsilon|omega)"     tolerance 0.001

Reading thermophysical properties

Selecting thermodynamics package 
{
    
type            hePsiThermo;
    
mixture         pureMixture;
    
transport       sutherland;
    
thermo          hConst;
    
equationOfState perfectGas;
    
specie          specie;
    
energy          sensibleInternalEnergy;
}

Reading field U

Reading
/calculating face flux field phi

pressureControl
    pMax 206820
    pMin 10341

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    
RASModel        kEpsilon;
    
turbulence      on;
    
printCoeffs     on;
    
Cmu             0.09;
    
C1              1.44;
    
C2              1.92;
    
C3              0;
    
sigmak          1;
    
sigmaEps        1.3;
}

No MRF models present

No finite volume options present

Starting time loop

Time 

Note it just ends. No time 1 folder is created

Clearly I have a major problem with my setup


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

dimensions      [--1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
Inlet
    
{
        
type            calculated;
        
value           $internalField;
    }

    
Outlet
    
{
        
type            calculated;
        
value           $internalField;
    }

    
TubeWall1
    
{
        
type            compressible::alphatWallFunction;
        
Prt             0.85;
        
value           $internalField;
    }
   
    
Sym_Xmax
    

        
type symmetry;
    } 
    
Sym_Xmin
    

        
type symmetry;
    } 
    
Sym_Ymax
    

        
type symmetry;
    } 
    
Sym_Ymin
    

        
type symmetry;
    }
}


// ************************************************************************* // 
epsilon

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

dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 0.1;

boundaryField
{
    
Inlet
    
{
        
type            turbulentMixingLengthDissipationRateInlet;
        
mixingLength    0.005;
        
value           $internalField;
    }

    
Outlet
    
{
        
type            inletOutlet;
        
value           $internalField;
        
inletValue      $internalField;
    }

    
TubeWall1
    
{
        
type            epsilonWallFunction;
        
Cmu             0.09;
        
kappa           0.41;
        
E               9.8;
        
value           $internalField;
    }


    
Sym_Xmax
    

        
type symmetry;
    } 
    
Sym_Xmin
    

        
type symmetry;
    } 
    
Sym_Ymax
    

        
type symmetry;
    } 
    
Sym_Ymin
    

        
type symmetry;
    }
}


// ************************************************************************* // 
K

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

dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 0.1;

boundaryField
{
    
Inlet
    
{
        
type            turbulentMixingLengthDissipationRateInlet;
        
mixingLength    0.005;
        
value           $internalField;
    }

    
Outlet
    
{
        
type            inletOutlet;
        
value           $internalField;
        
inletValue      $internalField;
    }

    
TubeWall1
    
{
        
type            epsilonWallFunction;
        
Cmu             0.09;
        
kappa           0.41;
        
E               9.8;
        
value           $internalField;
    }


    
Sym_Xmax
    

        
type symmetry;
    } 
    
Sym_Xmin
    

        
type symmetry;
    } 
    
Sym_Ymax
    

        
type symmetry;
    } 
    
Sym_Ymin
    

        
type symmetry;
    }
}


// ************************************************************************* '// 
nut

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

dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0.01;

boundaryField
{
    
Inlet
    
{
        
type            calculated;
        
value           $internalField;
    }

    
Outlet
    
{
        
type            calculated;
        
value           $internalField;
    }

    
TubeWall1
    
{
        
type            nutkWallFunction;
        
Cmu             0.09;
        
kappa           0.41;
        
E               9.8;
        
value           $internalField;
    }
    
Sym_Xmax
    

        
type symmetry;
    } 

    
Sym_Xmin
    

        
type symmetry;
    } 

    
Sym_Ymax
    

        
type symmetry;
    } 

    
Sym_Ymin
    

        
type symmetry;
    }

P

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

dimensions      [--2 0 0 0 0];

internalField   uniform 103410;

boundaryField
{
    
Inlet
    
{
        
type            zeroGradient;
    }

    
Outlet
    
{
        
type            fixedValue;
        
value           uniform 103410;

    }

    
TubeWall1
    
{
        
type            zeroGradient;
    }
    
    
Sym_Xmax
    

        
type symmetry;
    }
 
    
Sym_Xmin
    

        
type symmetry;
    } 

    
Sym_Ymax
    

        
type symmetry;
    } 

    
Sym_Ymin
    

        
type symmetry;
    }
}


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

T

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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 1000;

boundaryField
{
    
Inlet
    
{
        
type            fixedValue;
        
value           uniform 1000;
    }

    
Outlet
    
{
        
type            inletOutlet;
        
value           $internalField;
        
inletValue      $internalField;
    }

    
TubeWall1
    
{
        
type            fixedValue;
        
value           uniform 1100;
    }

    
Sym_Xmax
    

        
type symmetry;
    } 

    
Sym_Xmin
    

        
type symmetry;
    } 

    
Sym_Ymax
    

        
type symmetry;
    } 

    
Sym_Ymin
    

        
type symmetry;
    }
}

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

U


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

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0.01);

boundaryField
{
    
Inlet
    
{
         
type      fixedValue;
         
value   uniform   (0.0 0.0 0.25);
    }

    
Outlet
    
{
        
type            inletOutlet;
        
value           $internalField;
        
inletValue      $internalField;
    }

    
TubeWall1
    
{
        
type            noSlip;
    }

    
Sym_Xmax
    

        
type symmetry;
    } 

    
Sym_Xmin
    

        
type symmetry;
    } 

    
Sym_Ymax
    

        
type symmetry;
    } 

    
Sym_Ymin
    

        
type symmetry;
    }
}
// ************************************************************************* // 
AndyR is offline   Reply With Quote

Old   March 10, 2020, 06:47
Default
  #6
New Member
 
james freak
Join Date: Jan 2020
Posts: 14
Rep Power: 6
me45 is on a distinguished road
I have similar trouble.

Last edited by me45; March 10, 2020 at 17:17.
me45 is offline   Reply With Quote

Old   March 10, 2020, 10:28
Default
  #7
New Member
 
Join Date: Feb 2020
Posts: 10
Rep Power: 6
sapujapu is on a distinguished road
Right now you're setting an inlet velocity as BC. However, I don't see any info on your inlet density. rhoSimpleFoam is a compressible solver so I think you need that.


When you use a compressible solver, there's two ways of combining BCs for the inlet and outlet.

First option: Set a total pressure at the inlet and a static pressure at the outlet. This can be quite unstable if you have a complicated flowfield.

Second option: Set a massflow at the inlet and a static pressure at the outlet. The massflow BC works as like this:

inlet
{
type flowRateInletVelocity;
massFlowRate constant $yourvalue;
rhoInlet 0.5; // This is just an optional first guess and can be left out completely.
}
This method is quite stable, I've used it successfully to simulate very similar cases to yours.

If you really want to use a total pressure/static pressure setup, you can use the massflow to initialize the solution and then later change it to total pressure. I've found this to be quite stable.
lpz456 likes this.
sapujapu 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
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 8 July 1, 2022 07:54
Convergence issues for Flat plate with sharp edge rajnarayang FLUENT 3 June 20, 2017 13:02
rhoSimpleFoam angledDuctExplicitFixedCoeff tutorial fails in parallel donQi OpenFOAM Running, Solving & CFD 1 February 22, 2016 20:47
Multigrid Stability Issues ThomasHermann SU2 1 November 5, 2014 17:18
rhoSimpleFoam. patchField error. 123 OpenFOAM Running, Solving & CFD 4 June 6, 2014 16:22


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