Turbomachinery Solver OpenFOAM
Tags compressor, openfoam, solver, turbocharger, turbomachinery
Turbomachinery Solver OpenFOAM
This forum has been a big source of information for me since I started doing CFD. Now, I want to share my work to thank your altruistic knowledge sharing. Regarding the main topic of this blog, I am going to talk about my first turbomachinery simulations with rhoSimpleFoam, the problems I found with this solver and my solution, which I called turboSimpleFoam. Feel free to ask me whatever you want or tell me if something is wrong.
Turbomachinery is a very interesting topic in my opinion, so I started the design of a turbocharger a year ago just for fun. After modelling some of the geometry, I thought that doing some CFD simulations would be of interest to understand the behaviour of the air when it passes through the device. Therefore, a computational domain was defined by the following properties:
Until here the problem seemed challenging, but nothing I hadn’t done before. Taking into account the conditions of the problem to be solved, I chose rhoSimpleFoam as my solver, snappyHexMesh as my mesher and then I performed some simulations. Surprisingly for me, the temperature decreased to 280 K at the exit of the rotor so, obviously, something was terribly wrong.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
Firstly, I tried several things like changing its thermodynamic properties or its boundary conditions, without significant changes. The problem was driving me crazy for a few days, but then I introduced an energy source in the rotating zone, and it worked. However, I hadn't solved it yet, because I picked an energy source of a random number of watts, but it was a good starting point.
Once I noticed that the energy along the rotating zone wasn’t being solved properly, I studied turbomachinery theory to calculate the energy source, and this was my conclusion:
Where 𝑊𝑢 is the energy source, 𝑚̇ is the mass flow, 𝑢 is the rotation velocity, 𝑐𝑢 is the tangential velocity of the flow, 𝑟 is the radius and 𝜔 is the rotation speed.
After that, I introduced the energy source in the code and some extra variables like the rotation velocity, the tangential velocity, the radial velocity and something I called the zone term, Z. The last term is necessary due to the energy source value being zero at the static zone and one at the rotating zone. Taking all of this into account, the energy equation in the code is:
fvScalarMatrix EEqn
(
fvm::div(phi, he)
+ (
he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
)
+ thermophysicalTransport->divq(he)
==
fvOptions(rho, he)+Z*fvc::div(phi,u*Ut)
);
Finally, the results obtained are logical and the temperature rises to 350 K. Also, I have solved the problem in EXCEL using velocity triangles and thermodynamics, so the results of the CFD simulation can be compared with the theory of turbomachinery. As it can be seen at the end of this blog, the results obtained by both ways are quite similar.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
In conclusion, the new solver turboSimpleFoam gives excellent results in comparison with the theory of turbomachinery. Also, the temperature, the pressure and the density at the outlet are in line with the reality using both ways.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
Solver (Rotation axis must be in the Z direction):https://mega.nz/folder/NxZ2QRzJ#u3DE_1RVBJT8DbhAUsCkHQ
PostProcess Paraview:https://mega.nz/file/p4ZnwC6B#KmIzSS...fLq0aYTiJZZtyI
Simulation:https://mega.nz/file/gsYWmJIB#izgg1_...K2XYll5K55lMq0
PDF:https://mega.nz/file/90gwEIoC#JMq9Uf...ssbfEMcSm910z0
This forum has been a big source of information for me since I started doing CFD. Now, I want to share my work to thank your altruistic knowledge sharing. Regarding the main topic of this blog, I am going to talk about my first turbomachinery simulations with rhoSimpleFoam, the problems I found with this solver and my solution, which I called turboSimpleFoam. Feel free to ask me whatever you want or tell me if something is wrong.
Turbomachinery is a very interesting topic in my opinion, so I started the design of a turbocharger a year ago just for fun. After modelling some of the geometry, I thought that doing some CFD simulations would be of interest to understand the behaviour of the air when it passes through the device. Therefore, a computational domain was defined by the following properties:
• RANShttps://www.cfd-online.com/Forums/bl...1&d=1610557096
• MRF
• Compressible
• K-Omega SST
• Subsonic
• Inlet T = 300 K
• Inlet p = 1 atm
• Mass flow = 0.1 Kg/s
• Rotation Speed = 50 000 rpm
Until here the problem seemed challenging, but nothing I hadn’t done before. Taking into account the conditions of the problem to be solved, I chose rhoSimpleFoam as my solver, snappyHexMesh as my mesher and then I performed some simulations. Surprisingly for me, the temperature decreased to 280 K at the exit of the rotor so, obviously, something was terribly wrong.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
Firstly, I tried several things like changing its thermodynamic properties or its boundary conditions, without significant changes. The problem was driving me crazy for a few days, but then I introduced an energy source in the rotating zone, and it worked. However, I hadn't solved it yet, because I picked an energy source of a random number of watts, but it was a good starting point.
Once I noticed that the energy along the rotating zone wasn’t being solved properly, I studied turbomachinery theory to calculate the energy source, and this was my conclusion:
𝑊𝑢 = 𝑚̇ · ( 𝑢1 · 𝑐𝑢1 − 𝑢2 · 𝑐𝑢2 )
𝑢 = 𝑟 · 𝜔
𝑑𝑊𝑢 = 𝑑𝑖𝑣𝑒𝑟𝑔𝑒𝑛𝑐𝑒( 𝑚̇ · 𝑢 · 𝑐𝑢 )
𝑢 = 𝑟 · 𝜔
𝑑𝑊𝑢 = 𝑑𝑖𝑣𝑒𝑟𝑔𝑒𝑛𝑐𝑒( 𝑚̇ · 𝑢 · 𝑐𝑢 )
Where 𝑊𝑢 is the energy source, 𝑚̇ is the mass flow, 𝑢 is the rotation velocity, 𝑐𝑢 is the tangential velocity of the flow, 𝑟 is the radius and 𝜔 is the rotation speed.
After that, I introduced the energy source in the code and some extra variables like the rotation velocity, the tangential velocity, the radial velocity and something I called the zone term, Z. The last term is necessary due to the energy source value being zero at the static zone and one at the rotating zone. Taking all of this into account, the energy equation in the code is:
fvScalarMatrix EEqn
(
fvm::div(phi, he)
+ (
he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
)
+ thermophysicalTransport->divq(he)
==
fvOptions(rho, he)+Z*fvc::div(phi,u*Ut)
);
Finally, the results obtained are logical and the temperature rises to 350 K. Also, I have solved the problem in EXCEL using velocity triangles and thermodynamics, so the results of the CFD simulation can be compared with the theory of turbomachinery. As it can be seen at the end of this blog, the results obtained by both ways are quite similar.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
In conclusion, the new solver turboSimpleFoam gives excellent results in comparison with the theory of turbomachinery. Also, the temperature, the pressure and the density at the outlet are in line with the reality using both ways.
https://www.cfd-online.com/Forums/bl...1&d=1610557130
Solver (Rotation axis must be in the Z direction):https://mega.nz/folder/NxZ2QRzJ#u3DE_1RVBJT8DbhAUsCkHQ
PostProcess Paraview:https://mega.nz/file/p4ZnwC6B#KmIzSS...fLq0aYTiJZZtyI
Simulation:https://mega.nz/file/gsYWmJIB#izgg1_...K2XYll5K55lMq0
PDF:https://mega.nz/file/90gwEIoC#JMq9Uf...ssbfEMcSm910z0
Total Comments 8
Comments
-
Hi,
Thank you very much for this article !
Could you share fvSchemes and fvSolution as well ?
Thank you !
EDIT :
Found in tar.gz file :-)Posted November 27, 2021 at 03:40 by Fouch -
Hello!
Has it been useful for you? Tell me more about what do you think about my solver.
Thanks.Posted November 27, 2021 at 06:06 by badpuppet
Updated November 27, 2021 at 06:07 by badpuppet (typing error) -
Please help me compile it.
Posted December 19, 2022 at 13:15 by barbarian_subhkaran -
Posted December 19, 2022 at 13:20 by badpuppet -
I already tried it with version 9, dev and 2112.
Quote:
Thank youPosted December 28, 2022 at 07:46 by barbarian_subhkaran
Updated December 28, 2022 at 15:40 by barbarian_subhkaran -
I already tried it with version 9, dev and 2112.
Quote:Hello sir, thank you for your reply. I am trying to compile your solver using various versions but get an error. Please tell me what version did you use? I want to use this solver for my master thesis and further research. subhkaran.foam@gmail.com my email.
Thank youPosted January 1, 2023 at 10:26 by badpuppet -
Posted January 6, 2023 at 01:36 by barbarian_subhkaran -
Posted January 8, 2023 at 09:57 by badpuppet