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

Pressure driven flow with rhoSimpleFoam Error

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

Like Tree1Likes
  • 1 Post By cfdcheckers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2020, 07:27
Question Pressure driven flow with rhoSimpleFoam Error
  #1
New Member
 
Join Date: May 2019
Posts: 3
Rep Power: 7
OpenFOOL is on a distinguished road
Hi folks,


I am still a bloody beginner and I think I need some help of you. Currently I am facing problems with a rhoSimpleFoam case. The simulation won't run (sigFpe after a few iterations) and I am quiet sure that I made some basic mistakes, but I can't find them. Originally the geometry is a bit more complex, but to make things not more complicated than necessary I made a simple case. In the end I want to simulate the transient case with turbulence and in parallel, for now just laminar and on a single core.

It's a simple pressure driven flow of nitrogen at 293K with a total pressure of 1113mBar at the inlet and a static pressure of 1013mBar (atmosphere) at the outlet. Now I want to know the velocity field behind the capillary. (see attached picture)



CheckMesh outputs just one fail:
Code:
***Concave cells (using face planes) found, number of cells: 30
The error message output: (I used the limitTemperature option, because I got negative initial temperatures)


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.0
Exec   : rhoSimpleFoam
Date   : May 11 2020
Time   : 13:10:09
Host   : "o2.box"
PID    : 8473
I/O    : uncollated
Case   : /home/leon/OpenFOAM/leon-5.0/run/CapillaryHead_Reduced_CFDONLINE
nProcs : 1
sigFpe : Enabling floating point exception trapping (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 1e-05
    field h      tolerance 0.0001

Reading thermophysical properties

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

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

Creating finite volume options from "constant/fvOptions"

Selecting finite volume options model type limitTemperature
    Source: limitT
    - selecting all cells
    - selected 1062441 cell(s) with volume 2.90662e-06

Starting time loop

Time = 1e-06

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0739827, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0777189, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0755014, No Iterations 1
smoothSolver:  Solving for h, Initial residual = 0.512191, Final residual = 0.52304, No Iterations 1000
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00624987, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.00244342, Final residual = 1.55703e-05, No Iterations 4
time step continuity errors : sum local = 4.17756e-05, global = -7.39803e-06, cumulative = -7.39803e-06
ExecutionTime = 41.59 s  ClockTime = 41 s

Time = 2e-06

smoothSolver:  Solving for Ux, Initial residual = 0.116653, Final residual = 0.0102574, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 0.164785, Final residual = 0.0162303, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.116716, Final residual = 0.0103955, No Iterations 1
smoothSolver:  Solving for h, Initial residual = 1, Final residual = 0.0105551, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.919701, Final residual = 0.00886947, No Iterations 5
GAMG:  Solving for p, Initial residual = 8.3929e-06, Final residual = 6.02233e-07, No Iterations 2
time step continuity errors : sum local = 0.0203171, global = -0.00860199, cumulative = -0.00860938
ExecutionTime = 43.7 s  ClockTime = 43 s

Time = 3e-06

smoothSolver:  Solving for Ux, Initial residual = 0.140316, Final residual = 0.00638256, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 0.126721, Final residual = 0.0102169, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.13993, Final residual = 0.00640871, No Iterations 1
smoothSolver:  Solving for h, Initial residual = 0.996934, Final residual = 0.0110586, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8  Foam::fvMatrix<double>::solve() at ??:?
#9  ? at ??:?
#10  __libc_start_main in "/lib64/libc.so.6"
#11  ? at /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:122
Floating point exception (core dumped)
My pressure boundary conditions are as follows:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 101325;

boundaryField
{
    CylIn
    {
        type            zeroGradient;
    }
    
    Cone
    {
        type            zeroGradient;
    }

    ConeIn
    {
        type            zeroGradient;
    }

    CylInCone
    {
        type            zeroGradient;
    }

    CylOutCone
    {
        type            zeroGradient;
    }

    HeadWalls
    {
        type            zeroGradient;
    }

    ShotWall
    {
        type            zeroGradient;
    }
    
    Inlet
    {
        type            totalPressure;
        p0              uniform 111325;
        gamma           1;
        value           uniform 111325;
    } 
    Outlet
    {
        type            fixedValue;
        value           uniform 101325;
    }
}
My velocity BCs look like this:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    CylIn
    {
        type            noSlip;
    }
    
    Cone
    {
        type            noSlip;
    }

    ConeIn
    {
        type            noSlip;
    }

    CylInCone
    {
        type            noSlip;
    }

    CylOutCone
    {
        type            noSlip;
    }

    HeadWalls
    {
        type            noSlip;
    }

    ShotWall
    {
        type            noSlip;
    }
    
    Inlet
    {
        
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    } 
    
    Outlet
    {
        type            inletOutlet;
        value           $internalField;
        inletValue      uniform (0 0 0);
    }
}
My temperature BCs:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;

boundaryField
{
    CylIn
    {
        type            zeroGradient;
    }
    
    Cone
    {
        type            zeroGradient;
    }

    ConeIn
    {
        type            zeroGradient;
    }

    CylInCone
    {
        type            zeroGradient;
    }

    CylOutCone
    {
        type            zeroGradient;
    }

    HeadWalls
    {
        type            zeroGradient;
    }

    ShotWall
    {
        type            zeroGradient;
    }
    
    Inlet
    {
        
        type            fixedValue;
        value           uniform 293;
    } 
    Outlet
    {
        type            inletOutlet;
        value           $internalField;
        inletValue      $internalField;
    }
}
My thermophysicalProperties:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        molWeight   28.013;
    }
    thermodynamics
    {
        Cp          1040;
        //Hf          22e-6;
        Hf          0;
    }
    transport
    {
        mu          17.58e-06;
        Pr          0.8;
    }
}
Anything completely wrong with those settings?
Maybe it's my fvSchemes or fvSolution file? I have to admit with those settings I am most unsecure. Currently I am trying to get more knowledge about them, but it's quiet hard.



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

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;   
}

divSchemes
{
    default         Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}
And fvSolution:


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

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.01; 
        smoother    GaussSeidel;
        nPreSweeps    0;
        nPostSweeps    2;
        cacheAgglomeration    on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel    10;
        mergeLevels    1;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "(rho|U|h)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0.1;
    }

    "(rho|U|h)Final"
    {
        $U;
        tolerance       1e-05;
        relTol          0;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 1;
    residualControl
    {
        p               1e-3;
        U               1e-5;
        h               1e-4;

    }
}

relaxationFactors
{
    fields
    {
        p               0.1;
    }
    equations
    {
        U               0.7;
        h               0.2;
    }
}
Could you please give me a hint or lead me in the right direction? I would really appreciate it, because I'm quiet desperate.





Best regards


Leon
Attached Images
File Type: jpg Capillary_Overview.jpg (70.7 KB, 30 views)
OpenFOOL is offline   Reply With Quote

Old   June 9, 2021, 15:36
Default
  #2
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Hi,did you manage to get past this? What was wrong?

I have a similarish case I'm struggling with: Correct BCs for known outlet conditions and unknown inlet conditions.
If you did manage to get a grip on your case, can you give me some hints?
Artur.Ant likes this.
cfdcheckers is offline   Reply With Quote

Old   February 22, 2023, 11:41
Default
  #3
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 100
Rep Power: 6
Sakun is on a distinguished road
Hello guys,

I am having the same issue as well.

Quote:
Quote:
Originally Posted by Sakun View Post
Hi,

I am trying to replicate isentropic mach number graph as shown in the attached picture(research paper link is attached) and i am using rhoSimpleFOAM to validate this case since paper has validated using RANS.

Basically velocity is developed using total and static pressure difference in INLET (115775) and OUTLET (97251) respectively and i am running the simulation using ESI version of openfoam v2122.

Problem occurs when the developed flow is about exit the OUTLET, such as pressure become unsteady and continuity error increased but simulation doesn’t diverge.

Research paper link :
https://drive.google.com/file/d/1two...ew?usp=sharing

Pictures of the openFOAM case file :
https://drive.google.com/file/d/1IWJ...usp=share_link

I can share the case file upon on request and would like to post openFOAM files as well.

Can someone help me to overcome this issue, i have been stuck on this case for 7 months now


Highly appreciate your time, please help me.
Did you all managed to solve the issue ? highly appreciate if you guys can help.
Sakun is offline   Reply With Quote

Reply

Tags
pressure driven flow, rhosimplefoam error, settings, sigfpe

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
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 18:11
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


All times are GMT -4. The time now is 07:20.