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

Correct BCs for known outlet conditions and unknown inlet conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2021, 17:51
Default Correct BCs for known outlet conditions and unknown inlet conditions
  #1
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Hello,

I'm relatively new to OpenFoam and have been through some of the tutorials to get myself familiar with the set up etc. I wanted to try developing my own case. So I decided to work out a slightly difficult gas flow through pipe/diffuser problem based on the squareBend tutorial (rhoSimpleFoam). But the solver crashes. I think due to my case set up. One of my professors suggested to post here for any possible answers.

I have the geometry as shown in the attached figure with smaller inlet, larger outlet patches with the top and bottom being walls. I want to solve for the inlet conditions (p and T) from known outlet conditions (p and T). I'm using mass flow rate at inlet for U and zeroGradient at outlet. When I ran the case I get following error, I can't make heads or tails of it. I have tried to look for similar threads but it all confused me.

Code:
smoothSolver:  Solving for Ux, Initial residual = 0.0409229, Final residual = 0.00265484, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.040267, Final residual = 0.00225028, No Iterations 6
smoothSolver:  Solving for e, Initial residual = 0.0162476, Final residual = 0.00118569, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.31707, Final residual = 0.0155303, No Iterations 3
time step continuity errors : sum local = 10.3722, global = 0.977032, cumulative = 5.69359
ExecutionTime = 222.02 s  ClockTime = 246 s

Time = 3465

smoothSolver:  Solving for Ux, Initial residual = 0.0430797, Final residual = 0.00281743, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0427385, Final residual = 0.00243391, No Iterations 6
smoothSolver:  Solving for e, Initial residual = 0.0170845, Final residual = 0.0012902, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.344003, Final residual = 0.0151794, No Iterations 3
time step continuity errors : sum local = 11.275, global = -0.197278, cumulative = 5.49631
ExecutionTime = 222.1 s  ClockTime = 246 s

Time = 3466

smoothSolver:  Solving for Ux, Initial residual = 0.045539, Final residual = 0.00301992, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0456223, Final residual = 0.00261901, No Iterations 6
smoothSolver:  Solving for e, Initial residual = 0.0182324, Final residual = 0.00142681, No Iterations 2
          [7] iter          Test           e/h          Cv/p          Tnew
          [7] 0       6504.71   6.10886e+06       1062.32       9914.09
          [7] 1       9914.09   8.50204e+06      -159.875       2228.79
          [7] 2       2228.79   1.63643e+06        1001.8         10000
          [7] 3         10000   8.48479e+06      -242.216       4856.12
          [7] 4       4856.12   4.35195e+06       1055.93          9950
          [7] 5          9950   8.49569e+06      -193.827       3578.17
          [7] 6       3578.17   3.01634e+06       1035.59         10000
          [7] 7         10000   8.48479e+06      -242.216       4856.12
          [7] 8       4856.12   4.35195e+06       1055.93          9950
          [7] 9          9950   8.49569e+06      -193.827       3578.17
          [7] 10       3578.17   3.01634e+06       1035.59         10000
          [7] 11         10000   8.48479e+06      -242.216       4856.12
          [7] 12       4856.12   4.35195e+06       1055.93          9950
          [7] 13          9950   8.49569e+06      -193.827       3578.17
          [7] 14       3578.17   3.01634e+06       1035.59         10000
          [7] 15         10000   8.48479e+06      -242.216       4856.12
          [7] 16       4856.12   4.35195e+06       1055.93          9950
          [7] 17          9950   8.49569e+06      -193.827       3578.17
          [7] 18       3578.17   3.01634e+06       1035.59         10000
          [7] 19         10000   8.48479e+06      -242.216       4856.12
          [7] 20       4856.12   4.35195e+06       1055.93          9950
          [7] 21          9950   8.49569e+06      -193.827       3578.17
          [7] 22       3578.17   3.01634e+06       1035.59         10000
          [7] 23         10000   8.48479e+06      -242.216       4856.12
          [7] 24       4856.12   4.35195e+06       1055.93          9950
          [7] 25          9950   8.49569e+06      -193.827       3578.17
          [7] 26       3578.17   3.01634e+06       1035.59         10000
          [7] 27         10000   8.48479e+06      -242.216       4856.12
          [7] 28       4856.12   4.35195e+06       1055.93          9950
          [7] 29          9950   8.49569e+06      -193.827       3578.17
          [7] 30       3578.17   3.01634e+06       1035.59         10000
          [7] 31         10000   8.48479e+06      -242.216       4856.12
          [7] 32       4856.12   4.35195e+06       1055.93          9950
          [7] 33          9950   8.49569e+06      -193.827       3578.17
          [7] 34       3578.17   3.01634e+06       1035.59         10000
          [7] 35         10000   8.48479e+06      -242.216       4856.12
          [7] 36       4856.12   4.35195e+06       1055.93          9950
          [7] 37          9950   8.49569e+06      -193.827       3578.17
          [7] 38       3578.17   3.01634e+06       1035.59         10000
          [7] 39         10000   8.48479e+06      -242.216       4856.12
          [7] 40       4856.12   4.35195e+06       1055.93          9950
          [7] 41          9950   8.49569e+06      -193.827       3578.17
          [7] 42       3578.17   3.01634e+06       1035.59         10000
          [7] 43         10000   8.48479e+06      -242.216       4856.12
          [7] 44       4856.12   4.35195e+06       1055.93          9950
          [7] 45          9950   8.49569e+06      -193.827       3578.17
          [7] 46       3578.17   3.01634e+06       1035.59         10000
          [7] 47         10000   8.48479e+06      -242.216       4856.12
          [7] 48       4856.12   4.35195e+06       1055.93          9950
          [7] 49          9950   8.49569e+06      -193.827       3578.17
          [7] 50       3578.17   3.01634e+06       1035.59         10000
          [7] 51         10000   8.48479e+06      -242.216       4856.12
          [7] 52       4856.12   4.35195e+06       1055.93          9950
          [7] 53          9950   8.49569e+06      -193.827       3578.17
          [7] 54       3578.17   3.01634e+06       1035.59         10000
          [7] 55         10000   8.48479e+06      -242.216       4856.12
          [7] 56       4856.12   4.35195e+06       1055.93          9950
          [7] 57          9950   8.49569e+06      -193.827       3578.17
          [7] 58       3578.17   3.01634e+06       1035.59         10000
          [7] 59         10000   8.48479e+06      -242.216       4856.12
          [7] 60       4856.12   4.35195e+06       1055.93          9950
          [7] 61          9950   8.49569e+06      -193.827       3578.17
          [7] 62       3578.17   3.01634e+06       1035.59         10000
          [7] 63         10000   8.48479e+06      -242.216       4856.12
          [7] 64       4856.12   4.35195e+06       1055.93          9950
          [7] 65          9950   8.49569e+06      -193.827       3578.17
          [7] 66       3578.17   3.01634e+06       1035.59         10000
          [7] 67         10000   8.48479e+06      -242.216       4856.12
          [7] 68       4856.12   4.35195e+06       1055.93          9950
          [7] 69          9950   8.49569e+06      -193.827       3578.17
          [7] 70       3578.17   3.01634e+06       1035.59         10000
          [7] 71         10000   8.48479e+06      -242.216       4856.12
          [7] 72       4856.12   4.35195e+06       1055.93          9950
          [7] 73          9950   8.49569e+06      -193.827       3578.17
          [7] 74       3578.17   3.01634e+06       1035.59         10000
          [7] 75         10000   8.48479e+06      -242.216       4856.12
          [7] 76       4856.12   4.35195e+06       1055.93          9950
          [7] 77          9950   8.49569e+06      -193.827       3578.17
          [7] 78       3578.17   3.01634e+06       1035.59         10000
          [7] 79         10000   8.48479e+06      -242.216       4856.12
          [7] 80       4856.12   4.35195e+06       1055.93          9950
          [7] 81          9950   8.49569e+06      -193.827       3578.17
          [7] 82       3578.17   3.01634e+06       1035.59         10000
          [7] 83         10000   8.48479e+06      -242.216       4856.12
          [7] 84       4856.12   4.35195e+06       1055.93          9950
          [7] 85          9950   8.49569e+06      -193.827       3578.17
          [7] 86       3578.17   3.01634e+06       1035.59         10000
          [7] 87         10000   8.48479e+06      -242.216       4856.12
          [7] 88       4856.12   4.35195e+06       1055.93          9950
          [7] 89          9950   8.49569e+06      -193.827       3578.17
          [7] 90       3578.17   3.01634e+06       1035.59         10000
          [7] 91         10000   8.48479e+06      -242.216       4856.12
          [7] 92       4856.12   4.35195e+06       1055.93          9950
          [7] 93          9950   8.49569e+06      -193.827       3578.17
          [7] 94       3578.17   3.01634e+06       1035.59         10000
          [7] 95         10000   8.48479e+06      -242.216       4856.12
          [7] 96       4856.12   4.35195e+06       1055.93          9950
          [7] 97          9950   8.49569e+06      -193.827       3578.17
          [7] 98       3578.17   3.01634e+06       1035.59         10000
          [7] 99         10000   8.48479e+06      -242.216       4856.12
          [7] 100       4856.12   4.35195e+06       1055.93          9950
          [7] 101          9950   8.49569e+06      -193.827       3578.17
[7] 
[7] 
[7] --> FOAM FATAL ERROR: 
[7] Maximum number of iterations exceeded: 100
[7] 
[7]      From function Foam::scalar Foam::species::thermo<Thermo,  Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar  (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar,  Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo,  Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar  (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const,  bool) const [with Thermo =  Foam::janafThermo<Foam::perfectGas<Foam::specie> >; Type =  Foam::sensibleInternalEnergy; Foam::scalar = double;  Foam::species::thermo<Thermo, Type> =  Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>]
[7]     in file /home/ubuntu/OpenFOAM/OpenFOAM-7/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 106.
[7] 
FOAM parallel run aborting
[7] 
[7] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[7] #1  Foam::error::abort() at ??:?
[7]  #2   Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::T(double, double, double,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double, double) const,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double, double) const,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const  at ??:?
[7] #3   Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::T(double, double, double,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double, double) const,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double, double) const,  double  (Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const  at ??:?
[7] #4  Foam::hePsiThermo<Foam::psiThermo,  Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy> > > >::calculate() at  ??:?
[7] #5  Foam::hePsiThermo<Foam::psiThermo,  Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie>  >, Foam::sensibleInternalEnergy> > > >::correct() at  ??:?
[7] #6  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
[7] #7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[7] #8  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 7 in communicator MPI COMMUNICATOR 3 SPLIT FROM 0
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Are the BCs or ICs used problematic? What BCs can I use if I want to evaluate inlet based on outlet as explained? I attach my case folder here for reference: https://www.dropbox.com/s/r9jmjq33up...fuser.zip?dl=0

Can anyone help find me some answers

Last edited by cfdcheckers; June 5, 2021 at 05:22.
cfdcheckers is offline   Reply With Quote

Old   June 2, 2021, 16:43
Default
  #2
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
I realised I didn't attach a picture. I attach it here.
Attached Images
File Type: png snap.png (41.7 KB, 67 views)
cfdcheckers is offline   Reply With Quote

Old   June 4, 2021, 21:20
Default Changing the geometry - modifying squareBend tutorial
  #3
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Ok, update. I decided to give up this case and try modifying the squareBend tutorial BCs instead. Again, am trying to have a pressure driven flow. So initially set the inlet to totalPressure and inletOutlet. It crashes after 1st iteration with large tie step continuity errors. Additionally, the mesh I used is twice finer than the original tutorial (I read a thread suggesting rhoSimpleFoam being sensitive to coarse mesh).



Instead, decided to have more stable flowRateVelocity-fixedValue pressure combination as suggested here: https://www.openfoam.com/documentati...inations.html: nothing changes, crash after 1st iteration. I'm suspecting I've ill posed BCs somewhere. Can someone help me?


This is the case: https://www.dropbox.com/s/nnby0jn8v4...ified.zip?dl=0
The terminal output with error:
Code:
Create time

Create mesh for time = 0


SIMPLE: Convergence criteria found
        p: tolerance 0.001
        U: tolerance 0.0001
        e: tolerance 0.001
        "(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 200000
    pMin 10000

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 = 1

GAMG:  Solving for Ux, Initial residual = 1, Final residual = 0.00336763, No Iterations 1
GAMG:  Solving for Uy, Initial residual = 1, Final residual = 0.000111569, No Iterations 1
GAMG:  Solving for Uz, Initial residual = 1, Final residual = 0.000286413, No Iterations 1
GAMG:  Solving for e, Initial residual = 1, Final residual = 1.59746e-05, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0750234, No Iterations 3
time step continuity errors : sum local = 2722.23, global = 2181.85, cumulative = 2181.85
GAMG:  Solving for epsilon, Initial residual = 0.999659, Final residual = 0.00731869, No Iterations 1
GAMG:  Solving for k, Initial residual = 1, Final residual = 0.0100923, No Iterations 1
ExecutionTime = 7.8 s  ClockTime = 8 s

Time = 2

GAMG:  Solving for Ux, Initial residual = 0.0866151, Final residual = 0.00137142, No Iterations 1
GAMG:  Solving for Uy, Initial residual = 0.706089, Final residual = 0.00924131, No Iterations 1
GAMG:  Solving for Uz, Initial residual = 0.860164, Final residual = 0.0379424, No Iterations 1
GAMG:  Solving for e, Initial residual = 0.949371, Final residual = 0.0135489, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
Floating point exception (core dumped)
cfdcheckers is offline   Reply With Quote

Old   June 8, 2021, 06:08
Default
  #4
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Still stuck.. Can anyone help me with this? Where am I going wrong?
cfdcheckers is offline   Reply With Quote

Old   June 9, 2021, 03:24
Default
  #5
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Lewis,
i am not an expert of myself in OF, but i think that youīve 2 main problems. First, rhoSimpleFoam is a special solver which is kind of unstable. I canīt open your case (Laptop problem),but maybe solving this case compressible isn't needed. So i suggest you to try SimpleFoam. Furthermore, these BC with pressure driven flows are quite unstable, maybe they run with SimpleFoam, but i dont think so.
DevilX is offline   Reply With Quote

Old   June 9, 2021, 10:44
Default
  #6
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Hey Lewis,
i am not an expert of myself in OF, but i think that youīve 2 main problems. First, rhoSimpleFoam is a special solver which is kind of unstable. I canīt open your case (Laptop problem),but maybe solving this case compressible isn't needed. So i suggest you to try SimpleFoam. Furthermore, these BC with pressure driven flows are quite unstable, maybe they run with SimpleFoam, but i dont think so.

Hi Daniel,


Thanks for a pointer. I think I can do away with even pressure driven flow and a different solver but what I really am stuck with what BCs apply for T, especially if I want to simulate a situation (as described above) where I have knowledge of exit pressure and temperature (fixedValues). How do I set the rest of the BCs?
cfdcheckers is offline   Reply With Quote

Old   June 9, 2021, 10:49
Default
  #7
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by cfdcheckers View Post
Hi Daniel,


Thanks for a pointer. I think I can do away with even pressure driven flow and a different solver but what I really am stuck with what BCs apply for T, especially if I want to simulate a situation (as described above) where I have knowledge of exit pressure and temperature (fixedValues). How do I set the rest of the BCs?

Also, can simpleFoam be really used for such a case? I need the energy equation be solved. I think simpleFoam doesn't deal with T (energy equation).
cfdcheckers is offline   Reply With Quote

Old   June 10, 2021, 04:12
Default
  #8
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Quote:
Originally Posted by cfdcheckers View Post
Also, can simpleFoam be really used for such a case? I need the energy equation be solved. I think simpleFoam doesn't deal with T (energy equation).
Hey Lewis,

yeah, true, if this is needed, then SimpleFoam isn't the one to go. Can you write your BC's, fvSolution, thermoProperties and fvSchemes File here? At Dropbox, i can't have a look at them.
DevilX is offline   Reply With Quote

Old   June 10, 2021, 14:46
Default Latest case
  #9
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Hey Lewis,

yeah, true, if this is needed, then SimpleFoam isn't the one to go. Can you write your BC's, fvSolution, thermoProperties and fvSchemes File here? At Dropbox, i can't have a look at them.
Hi Daniel,



In the meanwhile, I tried a few other variations so what's posted below isn't exactly the same as above dropbox cases. But here you go:
p

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       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 110000;

boundaryField
{
    Default_Boundary_Region
    {
        type            zeroGradient;
    }
    inlet
    {
        type            zeroGradient;

/*        type            totalPressure;*/
/*        p0              uniform 1.25e5;*/
/*        gamma           1.4;*/
/*        value           uniform 1.1e5;*/
    }
    outlet
    {
        type            fixedValue;
        value           uniform 1e5;
    }
}


// ************************************************************************* //
T
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       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 500;

boundaryField
{
    Default_Boundary_Region
    {
        type            zeroGradient;
    }

    inlet
    {

        type            zeroGradient;
/*        type            totalTemperature;*/
/*        T0              uniform 200;*/
/*        gamma           1.4;*/
/*        value           uniform 250;*/
    }

    outlet
    {
        type            fixedValue;
        value           uniform 500;
    }
}

// ************************************************************************* //
U

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       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    Default_Boundary_Region
    {
        type            noSlip;
    }
    inlet
    {
        type            flowRateInletVelocity;
        massFlowRate    constant 0.5;
        rhoInlet        2;    // Guess for rho

/*        type            pressureInletUniformVelocity;*/
/*        value           uniform (0 0 0);*/
    }
    outlet
    {
        type                pressureInletOutletVelocity;
        phi                 phi;
        tangentialVelocity  uniform (0 0 0);
        value               uniform (0 0 0);
    }
}


// ************************************************************************* //
thermophysicalProps
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    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

mixture
{
    specie
    {
        molWeight   28.9;
    }
    thermodynamics
    {
        Cp          1007;
        Hf          0;
    }
    transport
    {
        As          1.4792e-06;
        Ts          116;
    }
}


// ************************************************************************* //
fvSolution
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-08;
        relTol          0.1;
        smoother        GaussSeidel;
        nCellsInCoarsestLevel 20;
    }

    "(U|e|k|epsilon)"
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.1;
        smoother        GaussSeidel;
        nCellsInCoarsestLevel 20;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    pMinFactor      0.1;
    pMaxFactor      2;
    transonic       yes;
    consistent      yes;

    residualControl
    {
        p               1e-3;
        U               1e-4;
        e               1e-3;

        // possibly check turbulence fields
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        p               1;
    }
    equations
    {
        p               1;
        U               0.9;
        e               0.8;
        k               0.9;
        epsilon         0.9;
    }
}

// ************************************************************************* //
fvSchemes
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      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default             steadyState;
}

gradSchemes
{
    default             Gauss linear;
}

divSchemes
{
    default             none;

    div(phi,U)          bounded Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U)))))      Gauss linear;
    div(phi,e)          bounded Gauss upwind;
    div(phi,epsilon)    bounded Gauss upwind;
    div(phi,k)          bounded Gauss upwind;

    div(phid,p)         Gauss upwind;
    div(phi,Ekp)        bounded Gauss upwind;
    div((phi|interpolate(rho)),p)  Gauss upwind;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}


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

This runs for just the first iteration and then crashes. I see that I have mostly big time step continuity errors. The mesh is good there's no problem there. Do you spot anything wrong here?
cfdcheckers is offline   Reply With Quote

Old   June 11, 2021, 07:03
Default
  #10
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Lewis,

Well the BCīs are correct in terms of physic as far as my small knowledge allow the verification.
But i would try the following in Fvschemes:

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

}

"(U|e|k|epsilon)"
{
solver PBiCGStab;
preconditioner DILU;
nSweeps 2;
tolerance 1e-05;
}
}

and:

relaxationFactors
{
fields
{
p 0.6;
}
equations
{
p 0.6;
U 0.65;
e 0.7
k 0.7;
epsilon 0.7;
}
}

I think one main issue are the relaxation factors, because at 1, you allow for fast convergence as possible, but its more unstable. Try to play with these a bit.
DevilX is offline   Reply With Quote

Old   June 11, 2021, 10:21
Default
  #11
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Hey Lewis,

Well the BCīs are correct in terms of physic as far as my small knowledge allow the verification.
But i would try the following in Fvschemes:

I think one main issue are the relaxation factors, because at 1, you allow for fast convergence as possible, but its more unstable. Try to play with these a bit.

Hi Daniel,


I made changes in fvSolution as you suggested but there's no change infact the time step continuity error increases.

Code:
Starting time loop

Time = 1

DILUPBiCGStab:  Solving for Ux, Initial residual = 1, Final residual = 7.98734e-06, No Iterations 2
DILUPBiCGStab:  Solving for Uy, Initial residual = 1, Final residual = 7.27505e-06, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 7.27505e-06, No Iterations 1
DILUPBiCGStab:  Solving for e, Initial residual = 1, Final residual = 6.00494e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.000309568, No Iterations 1
time step continuity errors : sum local = 11485.9, global = 10929.9, cumulative = 10929.9
DILUPBiCGStab:  Solving for epsilon, Initial residual = 0.999967, Final residual = 1.40979e-07, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 1, Final residual = 2.52291e-07, No Iterations 1
ExecutionTime = 7.8 s  ClockTime = 8 s

Time = 2

DILUPBiCGStab:  Solving for Ux, Initial residual = 0.226688, Final residual = 3.63397e-06, No Iterations 2
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.948871, Final residual = 1.98926e-06, No Iterations 2
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.948984, Final residual = 1.99523e-06, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.998349, Final residual = 8.80251e-06, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
Floating point exception (core dumped)
I reduced the p relaxation factor a lot (0.1) but it didn't change anything.
Is there any way I can send you the entire case?


A tiny update: I changed the internalField for U to some nonzero finite value. This leads to slightly more iterations - up to 4 -eventually failing all the same.
cfdcheckers is offline   Reply With Quote

Old   June 14, 2021, 11:23
Default Update
  #12
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Still no solution but I set up the fvSolutions like this: https://develop.openfoam.com/Develop...tem/fvSolution


This seems to have reduced the time step continuity error magnitude. It crashes just the same - at 2nd iteration.
Code:
Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0776218, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000356864, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000356864, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.999994, Final residual = 0.000306533, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0152728, No Iterations 2
time step continuity errors : sum local = 242.912, global = 24.9666, cumulative = 24.9666
smoothSolver:  Solving for epsilon, Initial residual = 0.999989, Final residual = 6.61679e-05, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 3.64272e-07, No Iterations 2
ExecutionTime = 7.09 s  ClockTime = 7 s

Time = 2

smoothSolver:  Solving for Ux, Initial residual = 0.176222, Final residual = 0.000578538, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.514575, Final residual = 0.00196745, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.531615, Final residual = 0.00134655, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.999995, Final residual = 0.0254177, No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
 Floating point exception (core dumped)

Anyone has any clues? Why does a simple straight forward case fail?
cfdcheckers is offline   Reply With Quote

Old   June 15, 2021, 02:47
Default
  #13
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Well try to reduce your case to the simplest way possible, disable turbulence, set mu to constant instead of sutherland and delete this in your Fv solution file:

nNonOrthogonalCorrectors 0;
pMinFactor 0.1;
pMaxFactor 2;
transonic yes;
consistent yes;

Also the last step you can do, is to set an inflow (mass inflow or a velocity) at the inlet to see, if the general case is working in terms of mesh and BCīs.
DevilX is offline   Reply With Quote

Old   June 15, 2021, 04:32
Default
  #14
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Well try to reduce your case to the simplest way possible, disable turbulence, set mu to constant instead of sutherland and delete this in your Fv solution file:

nNonOrthogonalCorrectors 0;
pMinFactor 0.1;
pMaxFactor 2;
transonic yes;
consistent yes;

Also the last step you can do, is to set an inflow (mass inflow or a velocity) at the inlet to see, if the general case is working in terms of mesh and BCīs.
Hi Daniel,

Good suggestions. I did have the simplest BC combination earlier - which included massflowrate (or velocity) at the inlet - it had not worked.
Nevertheless, I did try this just now along with other flow settings. So I have:
Code:
Inlet: p --> zeroGradient, T --> fixedValue, U --> flowRateInletVelocity
Outlet: p --> fixedValue, T --> inletOutlet, U -->zeroGradient
No turbulence and transport  "const"
And this is the result:
Code:
Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.00337986, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.00917013, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0203077, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 1, Final residual = 1.74539e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0149735, No Iterations 2
time step continuity errors : sum local = 4607.36, global = 434.119, cumulative = 434.119
ExecutionTime = 8.99 s  ClockTime = 10 s

Time = 2

smoothSolver:  Solving for Ux, Initial residual = 0.238832, Final residual = 0.000474178, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.230004, Final residual = 0.000605253, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.233121, Final residual = 0.00060806, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.999996, Final residual = 0.0167968, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.999982, Final residual = 0.0301897, No Iterations 3
time step continuity errors : sum local = 2572.7, global = -353.035, cumulative = 81.0839
ExecutionTime = 14.39 s  ClockTime = 15 s

Time = 3

smoothSolver:  Solving for Ux, Initial residual = 0.218869, Final residual = 0.00199649, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.228497, Final residual = 0.00339992, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.228458, Final residual = 0.00345241, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.365216, Final residual = 0.00726762, No Iterations 1


--> FOAM FATAL ERROR: 
Negative initial temperature T0: -184246

    From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const, bool) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-7/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const at ??:?
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
 Aborted (core dumped)
So a new error :|
"Negative initial temperature T0: -184246"
cfdcheckers is offline   Reply With Quote

Old   June 15, 2021, 05:08
Default
  #15
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Okay, as far as may limited experience goes, negative initial temps often come from a bad mesh - try checkMesh with additional -allGeometry and -allTopology and look what it spits out.
Next thing would be to set the Inlet in U to a table like this:

Zylinder_Inlet
{
type flowRateInletVelocity;
value uniform (0 0 0);
rho rhoInlet;
rhoInlet 188.663615;
massFlowRate table
(
(0 0)
(1 0)
(5 0.00001)
(30 0.00005)
(60 0.0001)
(90 0.000586742)
(120 0.00586742)
(160 0.00999999)
(200 0.049009527)

(50000 0.049009527)
);

With this table, you reduce the initial moment in the system and then it should really be going, if the mesh is not the worst one.
DevilX is offline   Reply With Quote

Old   June 15, 2021, 06:02
Default
  #16
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Okay, as far as may limited experience goes, negative initial temps often come from a bad mesh - try checkMesh with additional -allGeometry and -allTopology and look what it spits out.
Next thing would be to set the Inlet in U to a table like this:

Zylinder_Inlet
{
type flowRateInletVelocity;
value uniform (0 0 0);
rho rhoInlet;
rhoInlet 188.663615;
massFlowRate table
(
(0 0)
(1 0)
(5 0.00001)
(30 0.00005)
(60 0.0001)
(90 0.000586742)
(120 0.00586742)
(160 0.00999999)
(200 0.049009527)

(50000 0.049009527)
&nbsp;

With this table, you reduce the initial moment in the system and then it should really be going, if the mesh is not the worst one.
Hi Daniel,


I was pretty sure mesh was alright since this is the squareBend tutorial case just with 2x finer mesh. So the output of this is all OK:
Code:
Create time

Create polyMesh for time = 0

Enabling all (cell, face, edge, point) topology checks.

Enabling all geometry checks.

Time = 0

Mesh stats
    points:           943041
    faces:            2734400
    internal faces:   2641600
    cells:            896000
    faces per cell:   6
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       4

Overall number of cells of each type:
    hexahedra:     896000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                   Bounding box
    Default_Boundary_Region89600    89760    ok (non-closed singly connected)   (-0.5 -0.075 -0.025) (0.075 0.075 0.025)
    inlet               1600     1681     ok (non-closed singly connected)   (-0.05 0.025 -0.025) (-0.05 0.075 0.025)
    outlet              1600     1681     ok (non-closed singly connected)   (-0.5 -0.075 -0.025) (-0.5 -0.025 0.025)

Checking geometry...
    Overall domain bounding box (-0.5 -0.075 -0.025) (0.075 0.075 0.025)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.97958e-15 7.56723e-16 -6.77251e-17) OK.
    Max cell openness = 2.27979e-16 OK.
    Max aspect ratio = 2.11465 OK.
    Minimum face area = 8.1811e-07. Maximum face area = 2.4543e-06.  Face area magnitudes OK.
    Min volume = 1.0481e-09. Max volume = 3.04205e-09.  Total volume = 0.00176765.  Cell volumes OK.
    Mesh non-orthogonality Max: 0.394027 average: 0.00930873
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.0175888 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 0.000654488 0.00196344 OK.
    All angles in faces OK.
    Face flatness (1 = flat, 0 = butterfly) : min = 1  average = 1
    All face flatness OK.
    Cell determinant (wellposedness) : minimum: 0.825675 average: 7.49966
    Cell determinant check OK.
    Concave cell check OK.
    Face interpolation weight : minimum: 0.349272 average: 0.49976
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.536634 average: 0.997823
    Face volume ratio check OK.

Mesh OK.

End
Then I tested what you suggested with table:
Code:
Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0740813, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.00917109, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.02031, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 3.6033e-06, Final residual = 1.08664e-07, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0130202, No Iterations 2
time step continuity errors : sum local = 3998.97, global = 1102.33, cumulative = 1102.33
ExecutionTime = 8.94 s  ClockTime = 10 s

Time = 2

smoothSolver:  Solving for Ux, Initial residual = 0.242732, Final residual = 0.000471172, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.234024, Final residual = 0.000614199, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.23404, Final residual = 0.000609038, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 1, Final residual = 0.0165778, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.999984, Final residual = 0.0266166, No Iterations 3
time step continuity errors : sum local = 2248.4, global = -317.012, cumulative = 785.314
ExecutionTime = 14.05 s  ClockTime = 15 s

Time = 3

smoothSolver:  Solving for Ux, Initial residual = 0.218235, Final residual = 0.00201508, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.228422, Final residual = 0.00343249, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.227512, Final residual = 0.00345775, No Iterations 2
DILUPBiCGStab:  Solving for e, Initial residual = 0.661826, Final residual = 0.0188366, No Iterations 1


--> FOAM FATAL ERROR: 
Negative initial temperature T0: -184855

    From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const, bool) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-7/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const at ??:?
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam"
Aborted (core dumped)
Negative temperature error persists.
BTW, thanks for sticking with me through this. I see that OF can sometimes get a bit frustrating.
cfdcheckers is offline   Reply With Quote

Old   June 15, 2021, 06:09
Default
  #17
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Well then itīs really strange. So the Mesh is alright, okay. At least something. Have you adapted the table accordingly to your values? You can also try to let the first 50 Iterations the Value really close to 0 - if this helps, then increase it. Otherwise, there is a bigger problem with the BCīs i guess.
No problem, i think CFD is hard to learn and much harder to master.
DevilX is offline   Reply With Quote

Old   June 15, 2021, 19:06
Default
  #18
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
Well then itīs really strange. So the Mesh is alright, okay. At least something. Have you adapted the table accordingly to your values? You can also try to let the first 50 Iterations the Value really close to 0 - if this helps, then increase it. Otherwise, there is a bigger problem with the BCīs i guess.
No problem, i think CFD is hard to learn and much harder to master.

Yes, I have. This was the first time I saw a table entry in use so I didn't know what the entries meant but I found out and edited. The first number indicates the time not the iterations, I think. So do you suppose we can control it by iteration number?
cfdcheckers is offline   Reply With Quote

Old   June 16, 2021, 02:50
Default
  #19
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
The left side are the iterations, while the right ones are the values that you want by the formula M dot (massflow) = Velocity * Area of Inlet Patch * Density. So in example below, for the first 4 Iterations, no massflow goes through the patch, then it starts at 5th Iteration with 0.00001. But it still doesnt work?

massFlowRate table
(
(0 0)
(1 0)
(5 0.00001)
(30 0.00005)
(60 0.0001)
(90 0.000586742)
(120 0.00586742)
(160 0.00999999)
(200 0.049009527)

(50000 0.049009527)
DevilX is offline   Reply With Quote

Old   June 16, 2021, 06:41
Default
  #20
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 5
cfdcheckers is on a distinguished road
Quote:
Originally Posted by DevilX View Post
The left side are the iterations, while the right ones are the values that you want by the formula M dot (massflow) = Velocity * Area of Inlet Patch * Density. So in example below, for the first 4 Iterations, no massflow goes through the patch, then it starts at 5th Iteration with 0.00001. But it still doesnt work?

massFlowRate table
(
(0 0)
(1 0)
(5 0.00001)
(30 0.00005)
(60 0.0001)
(90 0.000586742)
(120 0.00586742)
(160 0.00999999)
(200 0.049009527)

(50000 0.049009527)
As per the description I found here, it is time. But I suppose for a steady state solver it doesn't matter and it will essentially be iterations. But yes, I tried to do as you suggested and there's no change. It crashes with negative temperature error.
cfdcheckers is offline   Reply With Quote

Reply

Tags
openfoam 7, rhosimplefoam


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
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 17:14
pressure inlet conditions for unknown pressure dEntropy OpenFOAM Pre-Processing 5 July 15, 2015 17:27
mass flow and pressure BC known at inlet, outlet BCs unknown akashmpatil FLUENT 1 December 12, 2013 14:02
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


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