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   December 23, 2019, 05:10
Default
  #21
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi all,


@tas38: Yes this unphysical phenomenon exist also for a fixed velocity at the inlet. I also tried changing the schemes and so on, but nothing helped.


@tobi: I have had the best results with rhoCentralFoam, thats why I am using it. Tbh I have not used rhoPimpleFoam yet, but I think I should try it soon. It might be easier to work with this solver since you can work with relaxations, what cant be done with rhoCentralFoam Good luck on your case!




I have finally solved the problem. For anyone with the same issue:


I have filled the injector with the static pressure and static temperature that equals the total pressure and total temperature at the inlet. Since the velocity is 0 at t = 0, they equal the total pressure/temperature. I had no more issues with convergence and everything works stable. The strange phenomenon did not appear anymore.





I would like to thank everyone for the kind help and wish you all merry Christmas and a good start in the new year!
Tobi likes this.
shock77 is offline   Reply With Quote

Old   December 23, 2019, 15:28
Default
  #22
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,



the only thing I can tell you about the rhoPimpleFoam solver is the fact about relaxation. Generally, we only relax the field for the pressure. However, for transonic behavior it is common to make at least the pressure equation diagonal dominant. We can achieve that using the equation relaxation factor for p and set it equal to 1. If we check out some transonic tutorials, we can see that this is set.



In addition, we could use the PIMPLE algorithm to get a more accurate and stable result (not running in PISO mode). Especially for more stiff problems this is recommended.

I would say it is worth to check but, as I already said, I am not familiar with transonic and super-sonic calculations.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 29, 2019, 10:17
Default
  #23
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Thanks for the informations!


I think I will give it a try and see whether it solve behaves more stable. You can use the pimple algorithm with sonicFoam too, but the solver gives worse result compared to rhoCentralFoam.


Since rhoPimpleFoam is also density based I think it is definitly worth a try!
shock77 is offline   Reply With Quote

Old   December 29, 2019, 15:41
Default
  #24
Member
 
giovanni
Join Date: Sep 2017
Posts: 50
Rep Power: 8
gian93 is on a distinguished road
hi guys, regarding this case, I would ask you in the case of a variable total pressure at the inlet how is possible to specify a variable total temperature as said before? thanks
gian93 is offline   Reply With Quote

Old   December 30, 2019, 06:24
Default
  #25
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
There is no standard way to do it. I guess you have to make your own BC.

Last edited by shock77; December 30, 2019 at 08:37.
shock77 is offline   Reply With Quote

Old   March 19, 2020, 12:25
Default
  #26
Member
 
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17
karamiag is on a distinguished road
Here there is the link for version 1.7.x source file. It would be nice to know why this bc is no longer present in the successive releases

https://github.com/OpenCFD/OpenFOAM-...dTotalPressure

Hope this could help.
karamiag is offline   Reply With Quote

Old   June 2, 2021, 15:37
Default
  #27
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 4
cfdcheckers is on a distinguished road
Quote:
Originally Posted by Tobi View Post
If you would set both (inlet and outlet) to fixed values, your fluid will accelerate and accelerate and accelerate (based on your dp) till your solver crashes.



Hi Tobi, can you elaborate on this a little? Why would the flow keep accelerating?

I'm trying to do something similar here but my setup fails after a while: Correct BCs for known outlet conditions and unknown inlet conditions
cfdcheckers is offline   Reply With Quote

Old   November 17, 2021, 11:25
Default
  #28
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 all,


@tas38: Yes this unphysical phenomenon exist also for a fixed velocity at the inlet. I also tried changing the schemes and so on, but nothing helped.


@tobi: I have had the best results with rhoCentralFoam, thats why I am using it. Tbh I have not used rhoPimpleFoam yet, but I think I should try it soon. It might be easier to work with this solver since you can work with relaxations, what cant be done with rhoCentralFoam Good luck on your case!




I have finally solved the problem. For anyone with the same issue:


I have filled the injector with the static pressure and static temperature that equals the total pressure and total temperature at the inlet. Since the velocity is 0 at t = 0, they equal the total pressure/temperature. I had no more issues with convergence and everything works stable. The strange phenomenon did not appear anymore.





I would like to thank everyone for the kind help and wish you all merry Christmas and a good start in the new year!
Hello all,

I am also studying the same type of configuration, an injector is located at the bottom of domain and sonic jet leaves the injector through supersonic crossflow. I tried numerous boundary conditions, schemes etc. However, I could not get the results that expected. If I give pressure ratio (PR, jet total pressure divided by crossflow static pressure) more than 5-10, rhoCentralFoam crashes. My configuration contains PR~150 and solver can not continue to solve with this PR. A shock like zone occurs just after the injector inlet and never disappear until the solver blows. I also tried the thing @shock77 said in the quotation, but it did not work, too. I am struggling with it for months and I can not do anything extra because I feel I ran out of the options I can do. So if anyone could help me, I would be super thankful to him/her.

Thanks in advance, stay safe and healthy,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 17, 2021, 15:30
Default
  #29
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Could you share your BCs, schemes and your Co-number? Also an image would be helpful, if you can share it.
shock77 is offline   Reply With Quote

Old   November 18, 2021, 03:46
Default
  #30
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
Could you share your BCs, schemes and your Co-number? Also an image would be helpful, if you can share it.
Hello @shock77,

Firstly, thank you for your attention and quick response. To clarify, I have to say that I am currently using k - omega SST turbulence model with symmetry (I am trying to solve half of the domain). I hope that I can write in clear way, if this is not the case please warn me on necessary points.

I will list them in order:

Boundary Conditions

I wrote the commented BCs which means I also tried them.
  • U

    For supersonic crossflow freestream Moo=2.95 and stagnation temperature T0 = 300K, the freestream velocity is around 605 m/s. Similarly, for sonic jet (for precaution, the jet Mach number is ~0.9, I did not want to give directly 1.0 to choke the flow just after the inlet). For the jet inlet through injector, I also tried zeroGradient/ fixedValue - value (0.0 0.0 0.0) to provide pure pressure driven flow with zero velocity on the jet inlet.

    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;
        }
        slip_wall
        {
            type            slip;
        }    
        nozzle
        {
            type            slip; 
        }
        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);
        }
        jet_exit
        {
            type            zeroGradient; //fixedValue;
    //        value        uniform (0 0 0); //uniform (0 0 316.94);
        }
        outlet
        {
            type            waveTransmissive;
            gamma           1.4;
            value           uniform (605 0 0);
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • p

    For supersonic crossflow freestream, stagnation pressure has to be 1 atm (101 kPa) and for the sonic jet, stagnation pressure should be 3.7 atm (375 kPa). Static pressure quantities below are derived approximately by using total ones.

    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;
        }
        nozzle
        {
            type            zeroGradient;
        }   
        slip_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;
        }
        jet_exit
        {
    /*    	type 		totalPressure;*/
    /*    	p0		uniform 375000;*/
    /*    	phi		phi;*/
    /*    	gamma	1.4; */
            type          zeroGradient; 
        }
        outlet
        {
            type            freestream;
            freestreamValue uniform 2300;
            value           uniform 2300;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • T

    For both supersonic crossflow freestream and sonic jet, stagnation temperature should be 300 K. Static temperature quantities below are derived approximately by using total ones.

    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;
        }
        slip_wall
        {
            type            zeroGradient;
        }  
        nozzle
        {
            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;
        }
        jet_exit
        {
    /*    	type 		totalTemperature;*/
    /*    	T0		uniform 300;*/
    /*    	phi		phi;*/
    /*    	gamma	1.4;*/
            type          zeroGradient; 
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 104.678;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • k

    It is simply k = 1.5*(Uoo*I)^2 where I = 1%.

    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      k;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform 57.4166;
    
    boundaryField
    {
        bottom_wall
        {
            type            kLowReWallFunction;
            value           uniform 57.4166;
        }
        nozzle
        {
            type            zeroGradient;
        }  
        slip_wall
        {
            type            zeroGradient;
        }         
        far_sides
        {
            type            freestream;
            freestreamValue uniform 57.4166;
            value           uniform 57.4166;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 57.4166;
            value           uniform 57.4166;
        }
        inlet
        {
            type            freestream;
            freestreamValue uniform 57.4166;
            value           uniform 57.4166;
        }
        jet_exit
        {
            type            freestream;
            freestreamValue uniform 15.06764454;
            value           uniform 15.06764454;
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 57.4166;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • nut

    Somebody may have considered hydraulic diameter etc. for nut calculation however, I took nut is equal to molecular viscosity for turbulence intensity, I = 1% (according to wolf dynamics presentation/guide on turbulence models)

    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      nut;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -1 0 0 0 0];
    
    internalField   uniform 9.1531e-05;
    
    boundaryField
    {
        bottom_wall
        {
            type            nutkWallFunction;
            value           uniform 9.1531e-05;
        }
        nozzle
        {
            type            zeroGradient;
        }  
        slip_wall
        {
            type            zeroGradient;
        }         
        far_sides
        {
            type            freestream;
            freestreamValue uniform 9.1531e-05;
            value           uniform 9.1531e-05;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 9.1531e-05;
            value           uniform 9.1531e-05;
        }
        inlet
        {
            type            fixedValue;
            value           uniform 9.1531e-05;
        }
        jet_exit
        {
            type            freestream;
            freestreamValue uniform 2.75598678e-05;
            value           uniform 2.75598678e-05;
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 9.1531e-05;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • omega

    Somebody may have considered hydraulic diameter etc. again for omega calculation, but I calculated omega through omega = k/nut.

    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      omega;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 -1 0 0 0 0];
    
    internalField   uniform 627291;
    
    boundaryField
    {
        bottom_wall
        {
            type            omegaWallFunction;
            value           uniform 627291;
        }
        nozzle
        {
            type            zeroGradient;
        }
        slip_wall
        {
            type            zeroGradient;
        }           
        far_sides
        {
            type            freestream;
            freestreamValue uniform 627291;
            value           uniform 627291;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 627291;
            value           uniform 627291;
        }
        inlet
        {
            type            freestream;
            freestreamValue uniform 627291;
            value           uniform 627291;
        }
        jet_exit
        {
    	type 		  freestream;
    	freestreamValue  uniform 5467241.2233;
    	value		  uniform 5467241.2233;
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 627291;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
  • alphat

    Simply, values below are calculated for turbulent Prandtl number, Prt=0.85.

    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      alphat;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [1 -1 -1 0 0 0 0];
    
    internalField   uniform 0.000107683;
    
    boundaryField
    {
        bottom_wall
        {
            type           compressible::alphatWallFunction;
            nut             nut;
            Prt             0.85;
            value         uniform 0.000107683;
        }
        nozzle
        {
            type            zeroGradient;
        }  
        slip_wall
        {
            type            zeroGradient;
        }         
        far_sides
        {
            type            freestream;
            freestreamValue uniform 0.000107683;
            value           uniform 0.000107683;
        }
        far_top
        {
            type            freestream;
            freestreamValue uniform 0.000107683;
            value           uniform 0.000107683;
        }
        inlet
        {
            type            fixedValue;
            value           uniform 0.000107683;
        }
        jet_exit
        {
            type            freestream;
            freestreamValue uniform 0.000032423;
            value           uniform 0.000032423;
        }
        outlet
        {
            type            waveTransmissive;
            gamma        1.4;
            value           uniform 0.000107683;
        }
        symmetry_plane
        {
            type            symmetry;
        }
    }
    // ************************************************************************* //
    I also have to say that, I tried uniformFixedValue with a CSV file as well for the jet inlet, where the quantities initialized from crossflow properties at t = 0 s to be reached targeted conditions (total pressure, total temperature etc.) at t=0.005 s. Also, I fill the injector with quiescent air via setFields with the pressure that I desire. In order to have uninterrupted run, I adjusted the pressure in such a way that pressure ratio, PR ~ 5.

system/fvSchemes

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

fluxScheme 	    Kurganov;

ddtSchemes
{
    default         Euler; //Euler; //CrankNicolson 0.5;
}

gradSchemes
{
    default        	cellMDLimited Gauss linear 1.0; //cellMDLimited Gauss linear 1.0;  
    grad(U)  	    	cellMDLimited Gauss linear 1.0; //cellLimited<cubic> 1.5 Gauss linear 1.0; 
    grad(e)  	 	cellMDLimited Gauss linear 1.0; //cellLimited<cubic> 1.5 Gauss linear 1.0; 
//    grad(R)  	    cellMDLimited Gauss linear 1.0; //cellMDLimited Gauss linear 1.0; 
    grad(k)		cellMDLimited Gauss linear 1.0; //cellLimited<cubic> 1.5 Gauss linear 1.0; 
    grad(omega)  	cellMDLimited Gauss linear 1.0; //cellLimited<cubic> 1.5 Gauss linear 1.0;         
//    grad(p) 	    Gauss linear 0.33333;
}

divSchemes
{
    default          	none;
    div(phi,U)       	bounded Gauss vanLeerV outletStabilisedV grad(U); //bounded Gauss linearUpwindV grad(U); 
    div(phi,e)       	bounded Gauss vanLeer outletStabilised grad(e); //bounded Gauss linearUpwind grad(e); 
    div(phi,k)       	bounded Gauss vanLeer outletStabilised grad(k); //bounded Gauss linearUpwind grad(k); 
    div(phi,omega)   	bounded Gauss vanLeer outletStabilised grad(omega); //bounded Gauss linearUpwind grad(epsilon); 
    div(((rho*nuEff)*dev2(T(grad(U))))) bounded Gauss vanLeer; //linearUpwind; //bounded Gauss linearUpwind;
    div(tauMC)       Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 1.0;
}

interpolationSchemes
{
    default         	          linear; 
    reconstruct(rho)	  vanLeer;
    reconstruct(T)	  vanLeer;
    reconstruct(p)	  vanLeer;
    reconstruct(k)	  vanLeer;
    reconstruct(omega)  vanLeer;         
    reconstruct(e)          vanLeer;       
    reconstruct(U)	  vanLeerV;

snGradSchemes
{
    default         limited 1.0; //limited 0.5; //limited corrected 0.5;
}

wallDist
{
    method meshWave;
}
// ************************************************************************* //
Courant number

I defined my Co as min ~0.1 and max ~0.5. Nowadays, it is around ~0.2.

The domain

I have included several figures to elucidate the situation, please see the attachment. These figures point to the situation where the PR= 5 as I said above. So, I have the problem on maintaining PR ~ 150 in whole injector
and just around the injector opening section.
By looking the graph among this figures, the ratio is approximately maintained just after the injector inlet but it has to be at the location which injector meets the crossflow domain. In my opinion, due to this mismatch there are not any jet - crossflow related interaction phenomena over the domain (at least, in the way that it is expected).

Thank you one more time for your interest, hopefully this information is adequate as much as it can be. If you wonder something different than the given, I can also provide them. Finally, I would be appreciated so much if we can respond to each other at least once in a day (if it suits to your daily programme), because I have very limited time after hopeless trials.

Thanks, stay safe and healthy,
Malkocoglu
Attached Images
File Type: jpg graph_of_quantities.jpg (31.0 KB, 10 views)
File Type: jpg pressure_contour_injector.jpg (28.6 KB, 20 views)
File Type: jpg domain_w_patches.jpg (34.2 KB, 15 views)
File Type: jpg domain.jpg (36.8 KB, 19 views)
Malkocoglu is offline   Reply With Quote

Old   November 18, 2021, 04:38
Default
  #31
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


I have never used those "freeStream" boundary conditions, so I cant tell anything about them. But it seems your inlet boundary conditions are cosing the problems. Also I think those "bounded" schemes are for stationary flows, you should also look into that.


I would try the following at the inlet:


Either totalPressure + pressureInletOutletVelocity


or fixedValue for p and for U
shock77 is offline   Reply With Quote

Old   November 18, 2021, 04:55
Default
  #32
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,


I have never used those "freeStream" boundary conditions, so I cant tell anything about them. But it seems your inlet boundary conditions are cosing the problems. Also I think those "bounded" schemes are for stationary flows, you should also look into that.


I would try the following at the inlet:


Either totalPressure + pressureInletOutletVelocity


or fixedValue for p and for U
To begin with, thank you again for the fast response.

Quote:
I have never used those "freeStream" boundary conditions, so I cant tell anything about them.
It is basically mixture of zeroGradient and fixedValue boundary conditions and based on inletOutlet which uses freestreamValue in the case of backflow occurs on the patches that it is defined. In addition, I have already run without injector but with freestream conditions, then there was no divergence/solver crash with the same settings. Therefore, I can say that I trust on my settings except for the injector related ones.

Quote:
Also I think those "bounded" schemes are for stationary flows, you should also look into that.
I am not a guru on the schemes; however, the schemes should be bounded to prevent non-physical situations (actually, it should have worked in my case as well) especially the flows with high gradients such as mine.

Quote:
I would try the following at the inlet:

Either totalPressure + pressureInletOutletVelocity

or fixedValue for p and for U
I have tried the second one, which is classical and most logical way I think. As far as I remember, I also looked to pressureInletOutletVelocity (probably not used with totalPressure) but the result was not different. Nevertheless, I will try the first combination. By the way, totalPressure/totalTemperature are more susceptible to solver crash as far as I experienced, my simulations blow within first iterations when I prefer them, interesting!

Hopefully, I will try and write back here at 10-11 pm GMT +3.

Best,
Malkocoglu
Malkocoglu is offline   Reply With Quote

Old   November 18, 2021, 06:28
Default
  #33
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
In terms of stability, I had the best results with totalPressure, totalTemperature and pressureInletOutletVelocity. But I guess every case is somehow different in the end.


Depending on wether you are interested in dynamic behaviour or not:
You could use uniformTotalPressure to define a total pressure rise over time. With that, you can slowly ramp up your pressure, which is far easier to handle for a solver than a step input.


On the keyword "bounded" I think you should read this: https://openfoam.org/release/2-2-0/n...s-boundedness/
shock77 is offline   Reply With Quote

Old   November 18, 2021, 07:27
Default
  #34
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
In terms of stability, I had the best results with totalPressure, totalTemperature and pressureInletOutletVelocity. But I guess every case is somehow different in the end.
OK, I will try this one.

Quote:
Depending on wether you are interested in dynamic behaviour or not:
You could use uniformTotalPressure to define a total pressure rise over time. With that, you can slowly ramp up your pressure, which is far easier to handle for a solver than a step input.
In my first reply today (#30), I wrote that I used uniformFixedValue. By looking at uniformTotalPressure, they do not differ in principle. Each of both contains a file or list of values. In uniformFixedValue, I increased all U, p, T etc. with time via CSV file. Here, only the total pressure is increased with time. So @shock77, what was your ratio of jet total pressure to crossflow static pressure?

Quote:
On the keyword "bounded" I think you should read this: https://openfoam.org/release/2-2-0/n...s-boundedness/
I have checked the website and saw the explanation:

"Compressible solvers for transient problems generally use the PIMPLE algorithm, which supports partial convergence of intermediate iterations. The solution may benefit from the use of the bounded form of convection but, in such cases, the corresponding bounded time derivative must also be included, ..."

Even if I use a solver belonging to PIMPLE, it stands right for my case. So, I understand that if I'm going use bounded for convective term, I also have to use for time derivative. I did not know that, thank you.
Malkocoglu is offline   Reply With Quote

Old   November 18, 2021, 07:33
Default
  #35
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I have tried different ratios like 10/1, 50/1, 100/1 and 200/1 as far as I remember. It worked with the solution I have suggested.


In your case there is some kind of push-back-effect into your inlet. I am not sure why it is caused, but I can only imagine that the totalPressure at your inlet is smaller than outside for some reason.
shock77 is offline   Reply With Quote

Old   November 18, 2021, 07:48
Smile
  #36
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 have tried different ratios like 10/1, 50/1, 100/1 and 200/1 as far as I remember. It worked with the solution I have suggested.
Wow, very good. Did you manage these ratios with injector like mine? Or you just used orifice?

Quote:
In your case there is some kind of push-back-effect into your inlet. I am not sure why it is caused, but I can only imagine that the totalPressure at your inlet is smaller than outside for some reason.
I initialize inside the injector with zero velocity and higher pressure than crossflow domain. How can still push-back occur, besides just after the injector inlet, still I can not understand it (please do not get me wrong, I am angry at the problem). Actually, I expect this kind of strange effect at the injector/crossflow junction, not at the injector inlet.

Anyway, I will try with your suggestions and in the case I can not write today please do not disappear on the forum , I need to talk about somebody like you who had an experience on this particular problem.

How many times I said I do not know but thank you one more time.
Malkocoglu is offline   Reply With Quote

Old   November 18, 2021, 07:55
Default
  #37
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
No, it was some kind of orifice.


I feel you, no worries. I have seen those injector cases a few times, maybe you can try to find their BCs and use those?


If I had to setup that case, I would try the following first:




Inlet: totalPressure, totalTemperature, pressureInletOutletVelocity
crossflowInlet: fixedValue for p, T and U
outlets with shockwaves: waveTransmissive for p, U and zeroGradient for T
outlet with no shockwaves involed: inletOutlet




On the schemes: I think there is rather a problem with the BCs than the schemes, because of the weird phenomena at the inlet. We should focus on those.
shock77 is offline   Reply With Quote

Old   November 18, 2021, 08:13
Default
  #38
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, it was some kind of orifice.

I feel you, no worries.
You can not guess how grateful I am.

Quote:

I have seen those injector cases a few times, maybe you can try to find their BCs and use those?
I will look into more. Usually total temperature and total pressure values are given at the jet inlet. Maybe someone used different settings, if so, I will write here.

Quote:

If I had to setup that case, I would try the following first:

Inlet: totalPressure, totalTemperature, pressureInletOutletVelocity
crossflowInlet: fixedValue for p, T and U
outlets with shockwaves: waveTransmissive for p, U and zeroGradient for T
outlet with no shockwaves involed: inletOutlet
Just for curiosity, what if I use waveTransmissive even if there is no shock at outlet. Does this constitute any difference/problem? Because there was no problem without jet when I was using waveTransmissive at the outlet. Also, is not it good to use non-reflective BC at the outlet for all cases?

Quote:

On the schemes: I think there is rather a problem with the BCs than the schemes, because of the weird phenomena at the inlet. We should focus on those.
I believe so, too. I believe that the problem is pressure BC. By the way, we did not talk about the mesh, my checkMesh is OK (long time I did not look to mesh but result for "checkMesh -allTopology -allGeometry" was OK). In injector case, there is sharp opening to crossflow domain. I hope that it is not a possible source of problem.
Malkocoglu is offline   Reply With Quote

Old   November 19, 2021, 04:27
Default
  #39
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Isnt your injector basically a jet inlet?


I dont think there should be any troubles. I think in that case it behave like a zeroGradient BC. But I am not 100% sure.


It doesnst look like a mesh problem to me.
shock77 is offline   Reply With Quote

Old   November 19, 2021, 05:14
Default
  #40
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
Isnt your injector basically a jet inlet?


I dont think there should be any troubles. I think in that case it behave like a zeroGradient BC. But I am not 100% sure.


It doesnst look like a mesh problem to me.
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
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 23:51.