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

Pressure Driven Flow (compressible) - nothing works

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By DevilX
  • 1 Post By DevilX
  • 3 Post By DevilX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2021, 05:40
Default Pressure Driven Flow (compressible) - nothing works
  #1
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Foamers,


i am trying to simulate a part of an air conditioner compressor, where i have the Pressure values of inlet and outlet and the velocity should arrange around this pressure difference. Attached is a picture about the general geometry, in which a valve is implemented, which normally moves up and down, but in this steady state simulation it´s completely fixed.


I checked my boundary conditions thousand times and tried a lot of different setups, also made the mesh finer, tried other solver (buoyantSimpleFoam), made thermophysical simple by regarding all to const, but nothing works.

With Massflow, it runs to a certain extend. For incompressible case with simplefoam, it also worked. But the fluid is very sensible to pressure, so i need to solve this compressible.


I appreciate every help!!


BC´s:
p:
Code:
internalField   uniform 1600002;
boundaryField
{
  
      Zylinder_Outlet
            {
               type            fixedValue;
               value        uniform 1600002;
            }
            Zylinder_Upper_Walls
            {
                type            fixedFluxPressure;
                value           uniform 0;
            }
            Zylinder_Plate_Walls
            {
              type            fixedFluxPressure;
                value           uniform 0;
            }
            Zylinder_Limiter
            {
                type            fixedFluxPressure;
                value           uniform 0;
            }
            Zylinder_Zylinder
            {
                type            fixedFluxPressure;
                value           uniform 0;
            }
            Zylinder_Zylinder_Huelle
            {
                 type            fixedFluxPressure;
                value           uniform 0;
            }
    
            Zylinder_Inlet
            {
                type            totalPressure;
                p0                uniform 1700000;
                value            uniform 1700000;
            }

U
Code:
internalField   uniform (0 0 0);

boundaryField
{ 
            Zylinder_Outlet
            {
               type pressureInletOutletVelocity;
                value uniform (0 0 0);
            }
            Zylinder_Upper_Walls
            {
               type            noSlip;
            }
            Zylinder_Plate_Walls
            {
               type            noSlip;
            }
            Zylinder_Limiter
            {
                type            noSlip;
            }
            Zylinder_Zylinder
            {
                type            noSlip;
            }
            Zylinder_Zylinder_Huelle
            {
                type            noSlip;
            }
      
            
            Zylinder_Inlet
            {
                type            pressureInletVelocity;
                value uniform (0 0 0);
            )}


T

Code:
internalField   uniform 422.15;

boundaryField
{
        Zylinder_Outlet
            {
               type            zeroGradient;
            }
            Zylinder_Upper_Walls
            {
               type            zeroGradient;
            }
            Zylinder_Plate_Walls
            {
               type            zeroGradient;
            }
            Zylinder_Limiter
            {
                type            zeroGradient;
            }
            Zylinder_Zylinder
            {
                type            zeroGradient;
            }
            Zylinder_Zylinder_Huelle
            {
                type            zeroGradient;
            }
     
            Zylinder_Inlet
            {
                type            fixedValue;    
                value           uniform 422.15;
                
            }
Attached Images
File Type: jpg Sideview.jpg (29.0 KB, 39 views)
saidc. likes this.
DevilX is offline   Reply With Quote

Old   July 20, 2021, 07:33
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I don't understand your case fully. But from my understanding, pressure b.c. at walls should be zero gradient.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 20, 2021, 08:00
Default
  #3
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Quote:
Originally Posted by piu58 View Post
I don't understand your case fully. But from my understanding, pressure b.c. at walls should be zero gradient.

Dear Uwe,


thanks for your reply!


It doesn´t matter, if the walls are treated as fixFluxPressure or zeroGradient, the result is the same, sadly.

Edit: it´s used for p_rgh pressure for the buoyantSimpleFoam, so its the same as zeroGradient, see here.



Can i help you in trying to understand the case?

In short: the Inlet is used to represent the pressure, build by a moving cylinder in a compressor. Caused by the high pressure, the fluid moves through the small "pipe" onto the fixed valve, afterwards it flows out to the top.
saidc. likes this.

Last edited by DevilX; July 20, 2021 at 09:33.
DevilX is offline   Reply With Quote

Old   July 20, 2021, 11:16
Default
  #4
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi DevilX,

Could you share your fvSolution file ?

BR
Fouch is offline   Reply With Quote

Old   July 21, 2021, 07:45
Default
  #5
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Fouch,


of course i can!
You find them below.
With all the BC´s like above, i am at least able to simulate a pressure driven flow, bu only with really low pressure differences.

Is there a way with potentialfoam or seomething else to reduce the rise in pressure peaks that occure at some iterations?
I also treid to use a pressure table, but this doesnt work - OF only recognizes the value in p0, which cant be used for a table..



fvSolution:

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

}

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



}
}


SIMPLE
{
nNonOrthogonalCorrectors 0;



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


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

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


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,epsilon) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phid,p) bounded Gauss upwind;
div(phi,e) bounded Gauss upwind;
div(phi,K) bounded Gauss upwind;
div(phi,h) bounded Gauss upwind;
div(phid,p) bounded Gauss upwind;
div(phi,Ekp) bounded Gauss upwind;




}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}
DevilX is offline   Reply With Quote

Old   July 21, 2021, 14:22
Default
  #6
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,


I would add pressure limiter in fvSolution just after nNonOrthogonalCorrectors 0; .



pMinFactor 0.1;
pMaxFactor 2;


You have to adjust this value to your case.


Please confirm if it solve you problem.


Best regards,
Fouch is offline   Reply With Quote

Old   July 22, 2021, 03:45
Default
  #7
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey,


no it´s not working. It seems that there is still an actual problem with BC´s or Mesh and this brings OF to diverge somehow. If i also try to limit Temperature oder Velocity, it still crashes.
DevilX is offline   Reply With Quote

Old   July 22, 2021, 06:28
Default
  #8
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Please try first to get it run with the least complicated physics. That means omit temperature for the first run, only the fluid. If that work you may decide how to add the temperature field. Normally, there is more than one way.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 22, 2021, 08:00
Default
  #9
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Uwe,
i think i am not really getting what you want to say, especially the temperature part. I set the thermal properties to constant (idealGas, which it isn´t, turned off the turbulence..) Temperature should be constant in the entire domain. That´s why i am lost somehow. Initilaization with potentialFoam also doesn´t help, because it doesn´t calculate anything.
DevilX is offline   Reply With Quote

Old   July 22, 2021, 08:04
Default
  #10
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
> f i also try to limit Temperature oder Velocity

That means, you try simulating temperature with the field. I suggest simulating only the compressor.
It is hard to say what happens without the case.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 22, 2021, 08:49
Default
  #11
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
I try to sum it up, what should happen, with the pictures below. Thats a case for very low pressure difference, in which the simulation runs. Physically, the flow seems right according to the glyphs. Sadly, i can´t provide the whole case.
Temperature ist irrelevant (mostly), the points of interest are:


- pressure/force on valve
- velocity/mass flow around the valve

- pressure difference between flow around valve and cylinder room
Attached Images
File Type: jpg domain.jpg (43.2 KB, 46 views)
File Type: jpg glyphs.jpg (110.7 KB, 43 views)
DevilX is offline   Reply With Quote

Old   July 22, 2021, 11:39
Default
  #12
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I assume that you have a du/dn=0 condition at the upper.

This is not applicable in your case. As you might see in your graphs you have a reflow there. That means that the streaming area after the point where something happens is much too short.

It may be your real geometry, but it does not work this way - it is non-physical.

I recommend defining a much longer region for the outflow.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

Last edited by piu58; July 23, 2021 at 00:16.
piu58 is offline   Reply With Quote

Old   July 23, 2021, 04:30
Default
  #13
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Uwe,
thanks for helping me. At the top, its an In/Outlet for velocity and a totalPressure with 16 bar, so that reverse flow is possible. But nevertheless, extending the area can be helpful.


I set the pMin/pMax and run a simulation with 16,2 bar and on round 20 cells at the bottom of the limiter (where no flows goes by normally) these pMin/pMax were reached. Also rho und U had strange values.
in short: I guess the whole setup is really sensitive to the mesh, i refinded it and for now it runs with 17 bar but with Turbulence turend off.


Now the question: Is there some kind of guide, how to get a better Mesh? I found this one and it was helpful, but i still get a ot of problems in checkMesh.
DevilX is offline   Reply With Quote

Old   August 10, 2021, 04:13
Default
  #14
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
Hey Folks,


update form my side.



As mentioned, the mesh wasn´t so good, so i customized the .stl a bit and used 50 % more cells in blockmesh. I also used a table based approach for rising the pressure at the Inlet.

So it is running with rhoSimpleFoam up to 17 to 16 bar pressure difference, but i don´t use any wallfunctions. I am now trying to find the highest pressure difference, until it diverges. (simulation time went up of course)
DevilX is offline   Reply With Quote

Old   October 13, 2021, 10:06
Default
  #15
Member
 
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5
DevilX is on a distinguished road
So, if anyone is still interested in modelling a compressible flow:


- rhoSimple works fine in principle
- mostly it was a problem with the geometry after the valve (as piu suggested) - changing this box to a Cylinder with a small Cylinder on top for Outlet worked
- also apllyng In/Outlet Conditions for omega, k, U and T is useful

- now it works with 17 bar pressure difference with 2nd Order schemes, but the timeStepErrors are to high (0.1-2)
- these errors are directly connected to the residuals of p -lowering them also lowers these timeStepErrors


Hope it helps someone!!
Fouch, youknowme and hydroRussian like this.

Last edited by DevilX; October 14, 2021 at 07:36.
DevilX is offline   Reply With Quote

Old   March 30, 2022, 00:29
Default
  #16
New Member
 
anonymous
Join Date: Mar 2022
Posts: 2
Rep Power: 0
youknowme is on a distinguished road
Quote:
Originally Posted by DevilX View Post
So, if anyone is still interested in modelling a compressible flow:


- rhoSimple works fine in principle
- mostly it was a problem with the geometry after the valve (as piu suggested) - changing this box to a Cylinder with a small Cylinder on top for Outlet worked
- also apllyng In/Outlet Conditions for omega, k, U and T is useful

- now it works with 17 bar pressure difference with 2nd Order schemes, but the timeStepErrors are to high (0.1-2)
- these errors are directly connected to the residuals of p -lowering them also lowers these timeStepErrors


Hope it helps someone!!
HI.
i found your thread very useful as i am too simulating a pressure driven flow. But i stuck because of bounding of my k/epsilon values. i would like to know if you encountered this problem or not while your simulation.
youknowme is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure driven compressible flow between two gas reservoirs dld OpenFOAM Running, Solving & CFD 1 October 27, 2022 14:45
Calculate Total Pressure and Temperature compressible flow shock77 OpenFOAM Running, Solving & CFD 1 April 26, 2021 02:35
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 12:23
Compressible Flow on Pressure Based Daryun FLUENT 2 July 5, 2019 10:44
Match Pressure Inlet/Outlet Boundary Condition Mass Flow Rate MSchneid Fluent UDF and Scheme Programming 3 February 23, 2019 06:00


All times are GMT -4. The time now is 08:43.