|
[Sponsors] |
Pressure Driven Flow (compressible) - nothing works |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2021, 06:40 |
Pressure Driven Flow (compressible) - nothing works
|
#1 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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; } |
|
July 20, 2021, 08:33 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
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) |
|
July 20, 2021, 09:00 |
|
#3 | |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
Quote:
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. Last edited by DevilX; July 20, 2021 at 10:33. |
||
July 20, 2021, 12:16 |
|
#4 |
Member
Join Date: Feb 2020
Posts: 79
Rep Power: 6 |
Hi DevilX,
Could you share your fvSolution file ? BR |
|
July 21, 2021, 08:45 |
|
#5 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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; } |
|
July 21, 2021, 15:22 |
|
#6 |
Member
Join Date: Feb 2020
Posts: 79
Rep Power: 6 |
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, |
|
July 22, 2021, 04:45 |
|
#7 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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. |
|
July 22, 2021, 07:28 |
|
#8 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
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) |
|
July 22, 2021, 09:00 |
|
#9 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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. |
|
July 22, 2021, 09:04 |
|
#10 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
> 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) |
|
July 22, 2021, 09:49 |
|
#11 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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 |
|
July 22, 2021, 12:39 |
|
#12 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
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 01:16. |
|
July 23, 2021, 05:30 |
|
#13 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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. |
|
August 10, 2021, 05:13 |
|
#14 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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) |
|
October 13, 2021, 11:06 |
|
#15 |
Member
Daniel
Join Date: Jan 2021
Posts: 39
Rep Power: 5 |
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!! Last edited by DevilX; October 14, 2021 at 08:36. |
|
March 30, 2022, 01:29 |
|
#16 | |
New Member
anonymous
Join Date: Mar 2022
Posts: 2
Rep Power: 0 |
Quote:
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. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculate Total Pressure and Temperature compressible flow | shock77 | OpenFOAM Running, Solving & CFD | 2 | August 29, 2024 20:14 |
Pressure driven compressible flow between two gas reservoirs | dld | OpenFOAM Running, Solving & CFD | 1 | October 27, 2022 15:45 |
Wind tunnel Boundary Conditions in Fluent | metmet | FLUENT | 6 | October 30, 2019 13:23 |
Compressible Flow on Pressure Based | Daryun | FLUENT | 2 | July 5, 2019 11:44 |
Match Pressure Inlet/Outlet Boundary Condition Mass Flow Rate | MSchneid | Fluent UDF and Scheme Programming | 3 | February 23, 2019 07:00 |