|
[Sponsors] |
[Other] real gas model implementation for thermophysicalModels library |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 9, 2022, 05:04 |
real gas model implementation for thermophysicalModels library
|
#1 |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Hi everyone!
I would like to share the OpenFOAM-based real-fluid thermophysicalModels library that we developed for reacting flow simulation at high-pressure. The detail development is described in here https://doi.org/10.1016/j.cpc.2021.108264 You can freely download the source code here: https://github.com/danhnam11/realFlu...ysicalModels-6 Should you find bugs or have suggestions on how to make the code better, please post on this thread. Greetings, Danh Nam (This thread is posted on the Programming& Development topic but I realize that it's the wrong place. So that I post this thread again here ). Last edited by danhnam; February 9, 2022 at 05:07. Reason: fix the github link |
|
March 15, 2022, 06:07 |
3D and high velocity
|
#2 |
New Member
Join Date: Apr 2019
Posts: 10
Rep Power: 7 |
is it good for 3D runs and high velocity applications?
|
|
March 17, 2022, 21:38 |
|
#3 |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
||
April 8, 2022, 06:32 |
EOS - Peng Robinson
|
#4 |
New Member
Nicola
Join Date: Dec 2018
Location: Sestri Levante, Italy
Posts: 1
Rep Power: 0 |
Good morning,
I found that, in PengRobinson equationOfState model, the M term, present in both Cp and CpMCv functions, is the same as in the soaveRedlichKwong model when actually it is not so (as you can see in the original PengRobinsonGas formulation). This fact leads to negative Cp (I’m dealing with nitrogen at cryogenic conditions). If you substitute back the original formulation for the M term everything works fine. Nicola |
|
April 14, 2022, 23:20 |
|
#5 | |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Quote:
Thank you so much for your bug finding. I will check it and update in our source code again. have a nice day Danh Nam. |
||
June 30, 2022, 10:06 |
|
#6 |
New Member
Ma Jie
Join Date: Aug 2020
Posts: 7
Rep Power: 6 |
Hi danhnam:
Your work is outstanding. I have a question, can it be used to calculate trans-/supercritical spray? eg ECN Spray A (Tinj=363K, Pamb=6MPa) |
|
June 30, 2022, 10:17 |
|
#7 | |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Quote:
Yes, the implemented real-gas models can be used for a wide range of T and p. We already tested from 1 to 300 atm against NIST data, covering your conditions. If you get any problems with this library, we can discuss it together. Danh Nam. |
||
June 30, 2022, 10:24 |
|
#8 |
New Member
Ma Jie
Join Date: Aug 2020
Posts: 7
Rep Power: 6 |
Very honored to receive your reply so quickly! Currently I'm simulating ECN Spray A, but I'm running into a problem where the real gas equation of state causes a negative pressure during the simulation(entering the mechanical spinodal or two phase region), which makes the simulation diverge, I don't know if your solver can solve this problem?
|
|
June 30, 2022, 10:59 |
|
#9 |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
I think your problem belongs to the solver problem. Our work only focus on the library which means the calculations of thermophysical properties. The solver named realFluidReactingFoam used in our work is only for laminar flame. Your problem may come from the nature of the solver you are using, for instance psi- or rho-based, or the algorithm you are using.
Which solver you are using now? |
|
June 30, 2022, 11:05 |
|
#10 | |
New Member
Ma Jie
Join Date: Aug 2020
Posts: 7
Rep Power: 6 |
Quote:
|
||
June 30, 2022, 11:11 |
|
#11 |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
I have not run spray A problem before. But I think we could have a further discussion. You can email me via danhnam11@gmail.com. I will reply you tomorrow because it is quite late now.
Hopefully I can help you to solve your problem. |
|
June 30, 2022, 11:13 |
|
#12 | |
New Member
Ma Jie
Join Date: Aug 2020
Posts: 7
Rep Power: 6 |
Quote:
|
||
August 17, 2022, 04:40 |
|
#13 |
New Member
xubonan
Join Date: Mar 2019
Posts: 2
Rep Power: 0 |
Dear danhnam:
When I use this library, I found a error when utilizing nitrogen as working fluid in the temperature range 120-300 under the pressure of 5MPa FOAM FATAL ERROR: Maximum number of iterations exceeded: 100, in file /home/user/OpenFOAM/realfluids/realFluidThermophysicalModels-6/src//thermophysicalModels/specie/lnInclude/thermoI.H at line 73. I guess there are some issues when solving temperature. |
|
August 18, 2022, 23:18 |
|
#14 |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Dear xubonnan!
Thank you for letting me know that error. Could you provide more information such as which solver you are using, which real-gas models you are using, etc., . And it would be better if you can include the whole error message. It can help me understand your problem more. Danh Nam, |
|
August 18, 2022, 23:33 |
|
#15 | |
New Member
xubonan
Join Date: Mar 2019
Posts: 2
Rep Power: 0 |
Quote:
I just change the tutorial case to pure nitrogen, and the pressure is 5MPa, initial internal temperature is 300K, the temperature of two inlet is 130 and 300K respectively. I think its not due to the bugs of code, its because of the effect of quickly change and nonlinearity of thermodynamic properties of fluids. |
||
August 18, 2022, 23:50 |
|
#16 | |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Quote:
I think so. The error would come from the nature of your problem (not a bug of code). Hopefully, you can use our library for your work. Danh Nam, |
||
November 21, 2022, 04:07 |
|
#17 | |
New Member
Eliot Foss
Join Date: Nov 2022
Location: Tokyo, Japan
Posts: 2
Rep Power: 0 |
Quote:
|
||
November 22, 2022, 22:19 |
|
#18 | |
New Member
Nam Danh Nguyen
Join Date: Feb 2020
Location: UNIST-Ulsan-Korea
Posts: 29
Rep Power: 6 |
Quote:
To overcome that problem, we already implemented Newton+bisection method to retrieve T from enthalpy. But that code has not been published yet. However, to run the simulations with real-gas models at near the critical point, you not only need to overcome that problem but also you need to apply a modified PIMPLE algorithm for your system of the governing equations. We already finished all of them and the source code would be available for everyone soon after our paper is being accepted. Danh Nam, |
||
November 27, 2022, 23:27 |
|
#19 |
New Member
Eliot Foss
Join Date: Nov 2022
Location: Tokyo, Japan
Posts: 2
Rep Power: 0 |
Thanks for your reply, I see, I did not realize there would be a problem with the pimple loop itself, I hope that you can share you findings soon!
I had another question, in your paper, you define the strain rate for the counterflow non-premixed flame with a multiplying factor of 2. In the textbooks I've read this 2 is not included in the definition. Is this due to a lack of standardization for the definition, or some other reason? Thank you for your time! |
|
January 6, 2023, 12:28 |
Real Gas Jacobian
|
#20 |
New Member
Rohit Mishra
Join Date: Apr 2020
Posts: 2
Rep Power: 0 |
In reference to the following file:
src/thermophysicalModels/specie/thermo/rfJanaf/rfJanafThermoI.H (Lines 286-295) The dcpdT term is ideal. Since we are dealing with real gas combustion we need to solve for real gas Jacobian. So the temperature derivative will also include the derivative of departure function apart from the ideal gas part. Please let me know if you have time to discuss this. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile User-Defined Real Gas Model (UDRGM) | Captain Convergence | Fluent UDF and Scheme Programming | 31 | November 6, 2020 07:30 |
make a new data from external .txt data and save it in a UDM | etedalgara | Fluent UDF and Scheme Programming | 27 | February 26, 2020 04:15 |
UDF velocity profile | willroca | Fluent UDF and Scheme Programming | 2 | January 10, 2016 04:13 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
view factor | yoollooz | Fluent UDF and Scheme Programming | 0 | March 1, 2013 01:44 |