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

About the totalPressure BC

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2021, 13:36
Default
  #41
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by Malkocoglu View Post
Yes, it is simply a half pipe (due to symmetry). I also do not think that it is mesh related problem but needed to ask just to be sure. On the other hand, I could not deploy the BCs that you suggested (job related time inconveniency). Hopefully, I will look onto it today.

Best,
Malkocoglu
I removed the injector due to eliminate push-back stuff (turned back to orifice), increased the solver tolerance from 1e-9 to 1e-6, and tried the BCs as below (in terms of U, p and T only, I did not touch the others):
  • U

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (605 0 0);
    
    boundaryField
    {
        bottom_wall
        {
            type            noSlip;
        }
        far_sides
        {
            type            freestream;
            freestreamValue uniform (605 0 0);
            value           uniform (605 0 0);
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform (605 0 0);
            value           uniform (605 0 0);
        }
        inlet
        {
    /*        type            freestream;*/
    /*        freestreamValue uniform (605 0 0);*/
    /*        value           uniform (605 0 0);*/
    	type 		fixedValue;
    	value		uniform (605 0 0);
        }
        jet_exit
        {
    //        type            zeroGradient; //fixedValue;
    //        value           uniform (0 0 0); //316.94
    	type 			pressureInletOutletVelocity;
    	phi			phi;
    	tangentialVelocity	uniform (0 0 0);
    	value			uniform (0 0 316.0); 
        }
        outlet
        {
            type            waveTransmissive;
            gamma           1.4;
            value           uniform (605 0 0);
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    
    // ************************************************************************* //
  • p

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [1 -1 -2 0 0 0 0];
    
    internalField   uniform 2300;
    
    boundaryField
    {
        bottom_wall
        {
            type            zeroGradient;
        }
        far_sides
        {
            type            freestream;
            freestreamValue uniform 2300;
            value           uniform 2300;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 2300;
            value           uniform 2300;
        }
        inlet
        {
    /*        type            freestream;*/
    /*        freestreamValue uniform 2500;*/
    /*        value           uniform 2500;*/
    	type 		fixedValue;
    	value		uniform 2500;
        }
        jet_exit
        {
        	type 		totalPressure;
        	p0		uniform 100000;
        	phi		phi;
        	gamma		1.4;    
    //        type            zeroGradient; 
    /*        type            uniformFixedValue;*/
    /*        uniformValue    */
    /*        {*/
    /*            type            table;*/
    /*            format          csv;*/
    /*            file            "jet_exit_BC.csv";*/
    /*            nHeaderLine     1;*/
    /*            refColumn       0;*/
    /*            componentColumns List<label> 1(4);*/
    /*            separator       ",";*/
    /*            mergeSeparators 0;*/
    /*        }*/
    /*        value           uniform 3890;*/
        }
        outlet
        {
    /*        type            freestream;*/
    /*        freestreamValue uniform 2300;*/
    /*        value           uniform 2300;*/
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 2300;
    	value		uniform 2300;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    
    // ************************************************************************* //
  • T

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      T;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 0 1 0 0 0];
    
    internalField   uniform 104.678;
    
    boundaryField
    {
        bottom_wall
        {
            type            zeroGradient;
        }
        far_sides
        {
            type            freestream;
            freestreamValue uniform 104.678;
            value           uniform 104.678;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 104.678;
            value           uniform 104.678;
        }
        inlet
        {
    /*        type            freestream;*/
    /*        freestreamValue uniform 104.678;*/
    /*        value           uniform 104.678;*/
    	type 		fixedValue;
    	value		uniform 104.678;        
        }
        jet_exit
        {
        	type 		totalTemperature;
        	T0		uniform 300;
        	phi		phi;
        	gamma		1.4;
    /*       type            zeroGradient; */
    /*        type            uniformFixedValue;*/
    /*        uniformValue    */
    /*        {*/
    /*            type            table;*/
    /*            format          csv;*/
    /*            file            "jet_exit_BC.csv";*/
    /*            nHeaderLine     1;*/
    /*            refColumn       0;*/
    /*            componentColumns List<label> 1(5);*/
    /*            separator       ",";*/
    /*            mergeSeparators 0;*/
    /*        }*/
    /*        value           uniform 258.176;*/
        }
        outlet
        {
    /*        type            waveTransmissive;*/
    /*        gamma           1.4;*/
    /*        value           uniform 104.678;*/
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 104.678;
    	value		uniform 104.678;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    
    // ************************************************************************* //

Again, my trials went unsuccessful. Even the total pressure of crossflow is around 75-80 kPa and jet total pressure has 100 kPa as above, the solver insists to blow. Should I make a denser mesh around the orifice? I can not think another thing to consider.

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 19, 2021, 13:52
Default
  #42
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Have you tried my suggested BCs? I still do not trust this freeStream BC. Obviously just because I do not know it, but still.


I dont think its about solver tolerance or mesh density.
shock77 is offline   Reply With Quote

Old   November 19, 2021, 14:16
Default
  #43
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Have you tried my suggested BCs? I still do not trust this freeStream BC. Obviously just because I do not know it, but still.


I dont think its about solver tolerance or mesh density.
Yes, after your last message, I removed the whole freestream BCs. Let me list them again without comment lines in order that you can see them clearly.
  • U

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (605 0 0);
    
    boundaryField
    {
        bottom_wall
        {
            type            noSlip;
        }
        far_sides
        {
    	type		inletOutlet;
    	phi		phi;
            inletValue 	uniform (605 0 0);
            value          uniform (605 0 0);
        }
        far_top
        {
    	type		inletOutlet;
    	phi		phi;
            inletValue 	uniform (605 0 0);
            value           uniform (605 0 0);
        }
        inlet
        {
    	type 		fixedValue;
    	value	uniform (605 0 0);
        }
        jet_exit
        {
    	type 			pressureInletOutletVelocity;
    	phi			phi;
    	tangentialVelocity	uniform (0 0 0);
    	value			uniform (0 0 316.0); 
        }
        outlet
        {
            type            waveTransmissive;
            gamma           1.4;
            value           uniform (605 0 0);
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    // ************************************************************************* //
  • p

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [1 -1 -2 0 0 0 0];
    
    internalField   uniform 2300;
    
    boundaryField
    {
        bottom_wall
        {
            type          zeroGradient;
        }
        far_sides
        {
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 2300;
    	value	uniform 2300;
        }
        far_top
        {
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 2300;
    	value	uniform 2300;
        }
        inlet
        {
    
    	type 		fixedValue;
    	value	uniform 2500;
        }
        jet_exit
        {
        	type 		totalPressure;
        	p0		uniform 100000;
        	phi		phi;
        	gamma	1.4;    
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 2300;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    // ************************************************************************* //
  • T

    Code:
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  dev
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      T;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 0 1 0 0 0];
    
    internalField   uniform 104.678;
    
    boundaryField
    {
        bottom_wall
        {
            type            zeroGradient;
        }
        far_sides
        {
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 104.678;
    	value		uniform 104.678;
        }
        far_top
        {
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 104.678;
    	value	uniform 104.678;
        }
        inlet
        {
    	type 		fixedValue;
    	value	uniform 104.678;        
        }
        jet_exit
        {
        	type 		totalTemperature;
        	T0		uniform 300;
        	phi		phi;
        	gamma	1.4;
        }
        outlet
        {
    	type		inletOutlet;
    	phi		phi;
    	inletValue	uniform 104.678;
    	value	uniform 104.678;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    
    
    // ************************************************************************* //

As you can see, my BCs are appropriate to yours. My simulation blows at t = 4e-7 s (dt = 1e-8 s).
Malkocoglu is offline   Reply With Quote

Old   November 22, 2021, 03:33
Default
  #44
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hmm with the same kind of artefact at the inlet of the jet?


Are your thermal properties in terms of units etc. ok?
shock77 is offline   Reply With Quote

Old   November 22, 2021, 04:57
Default
  #45
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Hmm with the same kind of artefact at the inlet of the jet?


Are your thermal properties in terms of units etc. ok?
I could not see how the artifact is at the jet inlet, because the total time did not even reach writeInterval.

In respect to thermal properties, the unit is K, you may see the "dimensions" of T file as "dimensions [0 0 0 1 0 0 0];". If you are asking of convenience of the T values; 104.78 K corresponds to static temperatrure with total temperature of 300 K with freestream Moo = 2.95. On the other hand, jet Mj ~ 0.99-1.0 and total temperature was 300 K.

After that my trial failed, I turned back to uniformFixedValue for pressure, temperature, velocity etc. and I initialized the crossflow domain with Moo = 1.5 instead of Moo = 2.95. My aim by doing this was to initialize crossflow and jet domains with nearly same temperature, pressure, k, omega etc. Consequently, I was able to sustain the simulations up to 1.5 x 10^-3 seconds until I deliberately interrupted it (my injector was straight pipe and I wanted to include converging nozzle; however, simulation with it failed).

Now, I set;
  • Moo = 1.5 (uniformFixedValue, final value is Moo = 2.95) and Mj = 0.8 (fixedValue)
  • Too = 206.896 K (uniformFixedValue, final value is Too = 104.678 K) and Tj = 206.896 K (uniformFixedValue, final value is Tj = 250 K)
  • Poo = 2500 Pa (fixedValue) and Pj = 6000 Pa (uniformFixedValue, final value is Pj = 246008 Pa)
  • k = 1.5*(Uoo*I)^2
  • nut from nu (nu calculated from Sutherland's law according to T)
  • omega = k / nut
  • alphat from turbulent Prandtl number, Prt = 0.85

I do not know if my simulation with these settings will reach my target simulation time, t = 0.01 seconds (at that time, my total temperature, pressure etc. will reach the original simulation conditions).

I wrote them in detail, because I want to create kind of checkpoint and everyone with same problem to see it clearly.

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 22, 2021, 06:55
Default
  #46
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I was speaking about your viscosity and your entries in the thermo dict. Sometimes there is some misunderstanding because some units are in kmol e.g. instead of mol. I dont know how you model visosity. Do you use the sutherland law or do you assume a constant value?


What is the reason the simulation crashes? I think it is a good sign, that no weird artefact developed so far because I would expect it to be there more or less immidiatly.
shock77 is offline   Reply With Quote

Old   November 22, 2021, 10:17
Default
  #47
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
I was speaking about your viscosity and your entries in the thermo dict. Sometimes there is some misunderstanding because some units are in kmol e.g. instead of mol. I dont know how you model visosity. Do you use the sutherland law or do you assume a constant value?


What is the reason the simulation crashes? I think it is a good sign, that no weird artefact developed so far because I would expect it to be there more or less immidiatly.
I am using Sutherland's law in accordance with https://www.cfd-online.com/Wiki/Sutherland%27s_law.

My constant/thermophysicalProperties is like:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     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.96;
    }
    thermodynamics
    {
        Cp              1004.5;
        Hf              0; 
    }
    transport
    {
        As              1.457932655e-06;
        Ts              110.4;
        Pr              0.72;
    }
}
And for the question

Quote:
What is the reason the simulation crashes? I think it is a good sign, that no weird artefact developed so far because I would expect it to be there more or less immidiatly.
All the time I got the error related to sensibleInternalEnergy; so, internal energy equation diverges. On the other hand, in my previous comment I meant that I could not see anything because the simulation diverged before first write interval of controlDict. So, simulation could not reach writeInterval and did not write any output file. Consequently, I could not reach any field. Hope that I was able to clarify myself.
Malkocoglu is offline   Reply With Quote

Old   November 23, 2021, 07:18
Default
  #48
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by Malkocoglu View Post
I am using Sutherland's law in accordance with https://www.cfd-online.com/Wiki/Sutherland%27s_law.

My constant/thermophysicalProperties is like:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     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.96;
    }
    thermodynamics
    {
        Cp              1004.5;
        Hf              0; 
    }
    transport
    {
        As              1.457932655e-06;
        Ts              110.4;
        Pr              0.72;
    }
}
And for the question



All the time I got the error related to sensibleInternalEnergy; so, internal energy equation diverges. On the other hand, in my previous comment I meant that I could not see anything because the simulation diverged before first write interval of controlDict. So, simulation could not reach writeInterval and did not write any output file. Consequently, I could not reach any field. Hope that I was able to clarify myself.
Finally, my simulation blew after 2 days. As I said before, my settings were:

Quote:
Now, I set;
Moo = 1.5 (uniformFixedValue, final value is Moo = 2.95) and Mj = 0.8 (fixedValue)
Too = 206.896 K (uniformFixedValue, final value is Too = 104.678 K) and Tj = 206.896 K (uniformFixedValue, final value is Tj = 250 K)
Poo = 2500 Pa (fixedValue) and Pj = 6000 Pa (uniformFixedValue, final value is Pj = 246008 Pa)
k = 1.5*(Uoo*I)^2
nut from nu (nu calculated from Sutherland's law according to T)
omega = k / nut
alphat from turbulent Prandtl number, Prt = 0.85

I do not know if my simulation with these settings will reach my target simulation time, t = 0.01 seconds (at that time, my total temperature, pressure etc. will reach the original simulation conditions).
When pressure ratio (P0,j/Poo) reached ~9, my simulation crashed. I feel as if there is a theoretical limit of maximum pressure ratio pf 10 in my rhoCentralFoam.

At this point, I am really suspicious about my mesh. I attached them mesh detail around injector region, please see them also. Hovever, my checkMesh -allTopolog -allGeometry yields:

Code:
checkMesh -allTopology -allGeometry
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : dev-6054ea53b9ab
Exec   : checkMesh -allTopology -allGeometry
Date   : Nov 23 2021
Time   : 15:04:43
Host   : "CM"
PID    : 2208968
I/O    : uncollated
Case   : /home/uem/ProgramFiles/OpenFOAM/OpenFOAM-run/CFD_Validation
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 polyMesh for time = 0

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

Enabling all geometry checks.

Time = 0

Mesh stats
    points:           370120
    faces:            1106139
    internal faces:   1069683
    cells:            367990
    faces per cell:   5.91272
    boundary patches: 9
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     335872
    prisms:        32118
    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
    bottom_wall         8566     8573     ok (non-closed singly connected)   (-0.06 -5.15875e-06 -7.78139e-08) (0.1 0.0449948 4.47312e-15)
    far_sides           6560     6762     ok (non-closed singly connected)   (-0.0615 0.0449948 4.43475e-15) (0.1 0.0449948 0.06)
    far_top             8840     8735     ok (non-closed singly connected)   (-0.0615 -5.15875e-06 0.0599999) (0.1 0.0449948 0.06)
    inlet               2132     2226     ok (non-closed singly connected)   (-0.0615 -5.15359e-06 4.43475e-15) (-0.0615 0.0449948 0.06)
    jet_exit            222      130      ok (non-closed singly connected)   (-0.001 -5.15875e-06 -0.005) (0.001 0.000994846 -0.005)
    nozzle              500      546      ok (non-closed singly connected)   (-0.001 -5.15875e-06 -0.005) (0.001 0.000994846 4.47312e-15)
    outlet              2132     2226     ok (non-closed singly connected)   (0.1 -5.15359e-06 4.43475e-15) (0.1 0.0449948 0.06)
    slip_wall           52       106      ok (non-closed singly connected)   (-0.0615 -5.15359e-06 4.43475e-15) (-0.06 0.0449948 4.43475e-15)
    symmetry_plane      7452     7691     ok (non-closed singly connected)   (-0.0615 -5.15875e-06 -0.005) (0.1 -5.15359e-06 0.06)

Checking geometry...
    Overall domain bounding box (-0.0615 -5.15875e-06 -0.005) (0.1 0.0449948 0.06)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.21414e-16 2.23015e-15 9.20016e-16) OK.
    Max cell openness = 3.1416e-16 OK.
    Max aspect ratio = 108.212 OK.
    Minimum face area = 3.13807e-09. Maximum face area = 4.66771e-06.  Face area magnitudes OK.
    Min volume = 6.27614e-13. Max volume = 7.00155e-09.  Total volume = 0.000436057.  Cell volumes OK.
    Mesh non-orthogonality Max: 38.8547 average: 1.18007
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.426527 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 7.28894e-05 0.003 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.00111822 average: 3.57029
    Cell determinant check OK.
    Concave cell check OK.
    Face interpolation weight : minimum: 0.224693 average: 0.487509
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.217358 average: 0.952848
    Face volume ratio check OK.

Mesh OK.

End
In further time steps, I saw that y+ is around 11-12 (at first I wanted it to be at 30, but probably nu varied after initial calculations). The first cell may be thought to lay in dangerous region (not wholeheartedly said, but an idea).

I do not have any idea what to do, I am really out of the options.

Best,
Malkocoglu
Attached Images
File Type: jpg bottom_view.jpg (98.6 KB, 13 views)
File Type: jpg close_detail.jpg (89.7 KB, 14 views)
Malkocoglu is offline   Reply With Quote

Old   November 25, 2021, 04:04
Default
  #49
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Quote:
Originally Posted by Malkocoglu View Post
All the time I got the error related to sensibleInternalEnergy; so, internal energy equation diverges. On the other hand, in my previous comment I meant that I could not see anything because the simulation diverged before first write interval of controlDict. So, simulation could not reach writeInterval and did not write any output file. Consequently, I could not reach any field. Hope that I was able to clarify myself.

Then you should set the output interval in a manner, that you actually see something. The error is due to negative temperature/energy. This can happen when BCs are wrong or you have heavy numerical oscillations. You should check what is the reason for that.




For your second reply:


Try a "simple simulation" first. All walls are slip, no turbulence model. That way you reduce the amount of error sources and it is easier to find the real error. What was the reason your simulation blew up btw?
shock77 is offline   Reply With Quote

Old   November 25, 2021, 06:11
Default
  #50
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Then you should set the output interval in a manner, that you actually see something. The error is due to negative temperature/energy. This can happen when BCs are wrong or you have heavy numerical oscillations. You should check what is the reason for that.

For your second reply:

Try a "simple simulation" first. All walls are slip, no turbulence model. That way you reduce the amount of error sources and it is easier to find the real error. What was the reason your simulation blew up btw?
Actually, in my very first simulation I got the error:

"Negative initial temperature T0 = ..."

But %99 of my error messages is like below:

Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
[16] #1  Foam::sigFpe::sigHandler(int) at ??:?
[16] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[16] #3  Foam::hePsiThermo<Foam::psiThermo::composite, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
[16] #4  Foam::hePsiThermo<Foam::psiThermo::composite, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
[16] #5  ? in "/home/uem/ProgramFiles/OpenFOAM/dev/OpenFOAM-dev/platforms/linux64GccDPInt64Opt/bin/rhoCentralFoam"
[16] #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[16] #7  ? in "/home/uem/ProgramFiles/OpenFOAM/dev/OpenFOAM-dev/platforms/linux64GccDPInt64Opt/bin/rhoCentralFoam"
[CM:1217030] *** Process received signal ***
[CM:1217030] Signal: Floating point exception (8)
[CM:1217030] Signal code:  (-6)
[CM:1217030] Failing at address: 0x3e800129206
[CM:1217030] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f7f002aa210]
[CM:1217030] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f7f002aa18b]
[CM:1217030] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f7f002aa210]
[CM:1217030] [ 3] /home/uem/ProgramFiles/OpenFOAM/dev/OpenFOAM-dev/platforms/linux64GccDPInt64Opt/lib/libfluidThermophysicalModels.so(_ZN4Foam11hePsiThermoINS_9psiThermo9compositeENS_11pureMixtureINS_19sutherlandTransportINS_7species6thermoINS_12hConstThermoINS_10perfectGasINS_6specieEEEEENS_22sensibleInternalEnergyEEEEEEEE9calculateEv+0x273)[0x7f7f02612fe3]
[CM:1217030] [ 4] /home/uem/ProgramFiles/OpenFOAM/dev/OpenFOAM-dev/platforms/linux64GccDPInt64Opt/lib/libfluidThermophysicalModels.so(_ZN4Foam11hePsiThermoINS_9psiThermo9compositeENS_11pureMixtureINS_19sutherlandTransportINS_7species6thermoINS_12hConstThermoINS_10perfectGasINS_6specieEEEEENS_22sensibleInternalEnergyEEEEEEEE7correctEv+0x2e)[0x7f7f0263c16e]
[CM:1217030] [ 5] rhoCentralFoam(+0x385ec)[0x556019c9f5ec]
[CM:1217030] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f7f0028b0b3]
[CM:1217030] [ 7] rhoCentralFoam(+0x3aa5e)[0x556019ca1a5e]
[CM:1217030] *** End of error message ***
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 16 with PID 0 on node CM exited on signal 8 (Floating point exception).
So, I am not sure whether it is related to negative temperature or not. All I know is there is a overflow / division by very small quantity, that is the reason of error I think.

Code:
For your second reply:

Try a "simple simulation" first. All walls are slip, no turbulence model. That way you reduce the amount of error sources and it is easier to find the real error. What was the reason your simulation blew up btw?[/QUOTE]
Up to today, I enabled turbulence for crossflow domain and used slip condition for velocity at injector walls (zeroGradient for all other quantities). I thought that change of inviscid wall to viscous wall (from injector to crossflow domain wall) may create the problem. Therefore, I also made injector walls viscous and used wall functions for turbulent quantities. I held temperature and pressure as zeroGradient on the injector walls. My simulation went beyond critical threshold in terms of simulation time; so, I will wait until it explodes (hoping that it never happens). If it occurs, I will switch to Euler with slip conditions as you suggested.

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 25, 2021, 11:30
Default
  #51
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
That error may appear because of a division by 0. I still think its due to negative temperature. Try to increase your temperature and see if it works in this dummy case. If it does, you know that the BCs are alright so far and this is the problem. I can help you with the negative temperature problem too I think.
shock77 is offline   Reply With Quote

Old   November 25, 2021, 14:00
Default
  #52
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
That error may appear because of a division by 0. I still think its due to negative temperature. Try to increase your temperature and see if it works in this dummy case. If it does, you know that the BCs are alright so far and this is the problem. I can help you with the negative temperature problem too I think.
Understood. I will look for whether the simulation explodes or not. If explodes, I will solve with Euler and increase the temperature.

Thank you so much for your interest over days. Please continue to stay here for more days, .

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 26, 2021, 00:54
Default
  #53
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
That error may appear because of a division by 0. I still think its due to negative temperature. Try to increase your temperature and see if it works in this dummy case. If it does, you know that the BCs are alright so far and this is the problem. I can help you with the negative temperature problem too I think.
My simulation blew again and when I checked for temperature over the domain, I saw that you are right. Static temperature has decreased to 4.9 K (see attachment). When I checked the location of the error via "Threshold" in ParaView, I saw a single cell/face at this value and its Mach number was 0 (or very close)! It is close the injector junction with crossflow domain. Now, I don't understand. If Mach number is very close to zero, how can the temperature go so low?

As you suggested I have to increase temperature at this stage. However, all the calculations will change related to Mach number etc. Anyway, I have to try.

Thank you @shock77.

Best,
Malkocoglu
Attached Images
File Type: jpg Screenshot from 2021-11-26 08-43-54.jpg (35.6 KB, 21 views)
File Type: jpg Screenshot from 2021-11-26 08-48-36.jpg (54.4 KB, 15 views)
Malkocoglu is offline   Reply With Quote

Old   November 26, 2021, 04:58
Default
  #54
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Your temperature is quite low to begin with. That's why I assumed that this might be a problem. Also the sutherland law might not be appropriate for air at low temperature. You should also check that otherwise you might get problems due to a wrong viscosity.


Still, there is that weird artefact at the inlet. This issue still needs to be solved first. Maybe if you upload a dummy case with a coarse mesh I can look into it on the weekend and try something.
shock77 is offline   Reply With Quote

Old   December 1, 2021, 05:22
Default
  #55
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Your temperature is quite low to begin with. That's why I assumed that this might be a problem. Also the sutherland law might not be appropriate for air at low temperature. You should also check that otherwise you might get problems due to a wrong viscosity.
Sorry @shock77, that is my bad. I thought that I replied you in Friday but I see that I couldn't send the reply. So, I was waiting for a new reply from you until I noticed my mistake today .

Anyway, maybe I have to give higher temperature for the jet; but then, jet velocity will be different due to Mach number and it will change momentum-flux ratio etc. Do you think that increasing temperature does not violate original physics? Sudden acceleration up to Mach 3.5-4 after jet exit downstream (Screenshot from 2021-11-26 08-48-36.jpg on Friday) causes this amount of temperature decrement I guess. I can not understand why flow gets accelerated that much.

Quote:
Still, there is that weird artefact at the inlet. This issue still needs to be solved first. Maybe if you upload a dummy case with a coarse mesh I can look into it on the weekend and try something.
My actual mesh has 380k cells and it's size is in MBs. If you desire I can share my whole case via Dropbox. Probably, delivering the case to you will be the best.

Regards,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   December 2, 2021, 05:13
Default
  #56
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
No worries.


Well you have an underexpanded jet, high Ma is not untypicall there.


Yes it will affect your physics, but this is just to see whether that's the only problem.


Cant you upload in here or is it too big?
shock77 is offline   Reply With Quote

Old   December 3, 2021, 08:24
Default
  #57
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
No worries.


Well you have an underexpanded jet, high Ma is not untypicall there.


Yes it will affect your physics, but this is just to see whether that's the only problem.
I did not expect that much acceleration, from Mach 1 to near 4. Anyway, it happened.

Quote:
Cant you upload in here or is it too big?
I'm passing through very unlucky days. My computer that I use for computations is broken, it has error in BIOS I guess (ACPI bug related stuff). I am forced to look for some other things in weekend, but in the next week I will concentrate back on my problem. So, I can upload to Dropbox because here will not be sufficient.

I hope that you will be here in the next week.

Thank you,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   December 7, 2021, 02:52
Default
  #58
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by Malkocoglu View Post
I did not expect that much acceleration, from Mach 1 to near 4. Anyway, it happened.



I'm passing through very unlucky days. My computer that I use for computations is broken, it has error in BIOS I guess (ACPI bug related stuff). I am forced to look for some other things in weekend, but in the next week I will concentrate back on my problem. So, I can upload to Dropbox because here will not be sufficient.

I hope that you will be here in the next week.

Thank you,
Malkocoglu
Hello shock77 and others,

Finally, I am able to upload my case to Dropbox, so you can have a look on that:

https://www.dropbox.com/sh/31xwgtiw7...bfyd0m4ua?dl=0

I have tried so many combinations in the files; therefore, you will probably be confused about the entries. Please ask anything that comes weird or wrong to you.

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   December 9, 2021, 09:54
Default
  #59
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


so I did mange to get the case working. Actually I basically included all the changes I suggest and it worked- I think you have another version of openfoam, because I dont know all of those inputs that you made. I have added an image of the flow and the case without the mesh to this replay. I use openfoam4.1.


Your boundary conditions didnt make sense sometimes, so I changed them. See yourself, I dont wanna go into to much detail here. I also increased the total pressure at the inlet to achieve an underexpanded jet since your internalfield total pressure was about 6 kPa and at your inlet 10 kPa, so that no supersonic inlet would be achieved. Thats why I increased it to 24 kpA. Just adjust the values to your case.


Two important things:


1. The mesh quality is bad. You want your cells to be equal in all 3 dimensions. I think you should work on that.


2. Explicit solvers like rhoCentralFoam require a low Co-number. I have added a fixed Co numer of 0.2. You may play with this number up to 0.5.
Attached Images
File Type: png u.png (93.0 KB, 15 views)
Attached Files
File Type: zip CFD_Validation_Dropbox.zip (102.2 KB, 6 views)
shock77 is offline   Reply With Quote

Old   December 10, 2021, 03:32
Default
  #60
Member
 
Utkun Malkocoglu
Join Date: Feb 2017
Posts: 36
Rep Power: 9
Malkocoglu is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Hi,


so I did mange to get the case working. Actually I basically included all the changes I suggest and it worked- I think you have another version of openfoam, because I dont know all of those inputs that you made. I have added an image of the flow and the case without the mesh to this replay. I use openfoam4.1.


Your boundary conditions didnt make sense sometimes, so I changed them. See yourself, I dont wanna go into to much detail here. I also increased the total pressure at the inlet to achieve an underexpanded jet since your internalfield total pressure was about 6 kPa and at your inlet 10 kPa, so that no supersonic inlet would be achieved. Thats why I increased it to 24 kpA. Just adjust the values to your case.


Two important things:


1. The mesh quality is bad. You want your cells to be equal in all 3 dimensions. I think you should work on that.


2. Explicit solvers like rhoCentralFoam require a low Co-number. I have added a fixed Co numer of 0.2. You may play with this number up to 0.5.
Wow, you can not know how glad I am. Firstly, I would like to ask at which simulation time (t) you get the image?

Quote:
1. The mesh quality is bad. You want your cells to be equal in all 3 dimensions. I think you should work on that.
Actually, I refine the mesh near the jet, but I want to keep the number of mesh elements around 300-500k to get solution in a few days. Each dimension of elements (length, width, height) are equal only at the furthest locations to injector, like upper corners of freestream domain.

I tried to run the case on my mesh with the BCs that you gave ("laminar" selected in constant/momentumTransport; so there are only p, T and U). However, simulation failed again in t = 3e-5 s with the error below:

Code:
#0  Foam::error::printStack(Foam::Ostream&)[9] #0  Foam::error::printStack(Foam::Ostream&)[10] #0  Foam::error::printStack(Foam::Ostream&)[11] #0  Foam::error::printStack(Foam::Ostream&)[12] #0  Foam::error::printStack(Foam::Ostream&)[13] #0  Foam::error::printStack(Foam::Ostream&)[14] #0  Foam::error::printStack(Foam::Ostream&)[15] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&)[1] #0  Foam::error::printStack(Foam::Ostream&)[2] #0  Foam::error::printStack(Foam::Ostream&)[3] #0  Foam::error::printStack(Foam::Ostream&)[4] #0  Foam::error::printStack(Foam::Ostream&)[5] #0  Foam::error::printStack(Foam::Ostream&)[6] #0  Foam::error::printStack(Foam::Ostream&)[7] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
[14] #1  Foam::sigFpe::sigHandler(int)[12] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #1  Foam::sigFpe::sigHandler(int)[11] #1  Foam::sigFpe::sigHandler(int)[5] #1  Foam::sigFpe::sigHandler(int)[15] #1  Foam::sigFpe::sigHandler(int) at ??:?
 at ??:?
[4] #1  [2] #1  Foam::sigFpe::sigHandler(int)Foam::sigFpe::sigHandler(int) at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
[8] #1   at ??:?
Foam::sigFpe::sigHandler(int)[13] #1  [9] #1  Foam::sigFpe::sigHandler(int) at ??:?
Foam::sigFpe::sigHandler(int)[10] #1  Foam::sigFpe::sigHandler(int)[3] #1  Foam::sigFpe::sigHandler(int)[0] #1  Foam::sigFpe::sigHandler(int)[7] #1  Foam::sigFpe::sigHandler(int)[6] #1  Foam::sigFpe::sigHandler(int) at ??:?
[15] #2  ? at ??:?
[14] #2  ? at ??:?
[11] #2  ? at ??:?
[12] #2  ? at ??:?
[1] #2  ? at ??:?
[5] #2  ? at ??:?
[2] #2  ? at ??:?
[4] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
 in "/lib/x86_64-linux-gnu/libc.so.6"
 in "/lib/x86_64-linux-gnu/libc.so.6"
I can propose two reasons:

1 - My OpenFOAM version (OpenFOAM-dev) creates the trouble indeed for months

2- I could not see setFieldsDict in the /system folder that you included. I used setFiellds to make velocity zero in injector domain initially. When setFields command is not applied, flow will go through perpendicularly to the injector walls; because velocity field and all other fields are given uniform in whole internalField (injector + crossflow). So, it may be other cause for the failure.
Malkocoglu is offline   Reply With Quote

Reply

Tags
rhocentralfoam, totalpressure


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
totalPressure (why flux direction dependend) Tobi OpenFOAM Running, Solving & CFD 3 October 17, 2019 22:27
Need info about totalPressure boundary condition sahmed OpenFOAM Running, Solving & CFD 4 December 4, 2018 21:23
About the totalPressure BC fmerk OpenFOAM Running, Solving & CFD 1 September 25, 2017 17:53
totalPressure boundary :Performance Curve (constant RPM) nash OpenFOAM Running, Solving & CFD 0 September 6, 2013 11:34
Totalpressure Ansys Leuchte CFX 2 April 9, 2013 18:56


All times are GMT -4. The time now is 15:58.