|
[Sponsors] |
Problem with using User Define Real Gas Model (UDRGM) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 14, 2021, 19:54 |
Problem with using User Define Real Gas Model (UDRGM)
|
#1 |
Member
Amirreza Niazmehr
Join Date: Nov 2018
Posts: 40
Rep Power: 8 |
Hi guys.
We are using our data for a simulation in Fluent. Our Data are for: 1- Cp 2- Viscosity 3- Lambda 4- Density As you know, The user-defined real gas model (UDRGM) has been developed to allow you to write your own custom real gas model to fit your particular modeling needs. The point is that, when we use our data for 1- Cp 2- Viscosity 3- Lambda and we use this formulation for density according to Redlich-Kwong Equation of State for Real Gas Modeling: we do not have any problem and our solution will converge. But when we use our data for density and use this: double Air_density(cell_t cell, Thread *thread, cxboolean vapor_phase, double temp, double density, double press, double yi[]) { real mix = 0; return CalcGasAblation(&rhoA, &rhoB, &rhoC, &rhoD, &rhoMixPoints, &rhoPressPoints, &rhoTempPoints, rhoNumMixPoints, rhoNumPressPoints, rhoNumTempPoints, mix, Air_pressure(temp, density), temp, rhoEquidistant); In this case we are using interpolation function for our data of density. the solution would diverge as you see in this picture [IMG][/IMG] That means we only can not use our data for density (our interpolation function for density). In attachment you can find codes for converged and diverged codes. our data for density you can download with this link: https://we.tl/t-aSC30jrbtP Can someone please help me and say where is the problem? I really stuck in this problem. Thanks in advance |
|
January 15, 2021, 02:33 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
so looks like problem is inside interpolation function
I think, you should check carefully values, which your interpolation function generates also the difference between 2 codes are in value type you are applying for density in convergence case it is double non-convergence - real however, real is double if you are running fluent in double precision regime. check carefully, what could happen if your input values for interpolation function are out of borders, cause fluent may extrapolate there
__________________
best regards ****************************** press LIKE if this message was helpful |
|
January 15, 2021, 03:22 |
|
#3 | |
Member
Amirreza Niazmehr
Join Date: Nov 2018
Posts: 40
Rep Power: 8 |
Quote:
Yes i did not care about this real and double definition. I will correct it. Just one more question, you said: Mybe ''the input values for interpolation function are out of borders'' How can I check it? Can you explain it more. Again thanks alot for your help. |
||
January 15, 2021, 04:07 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I didn't go deep into your code
it could be a case where you've defined density for temperature range from 300 to 3000K, but which value will be applied for 290, 250 K ? that is what I was trying t say
__________________
best regards ****************************** press LIKE if this message was helpful Last edited by AlexanderZ; January 15, 2021 at 06:10. |
|
January 15, 2021, 04:40 |
|
#5 |
Member
Amirreza Niazmehr
Join Date: Nov 2018
Posts: 40
Rep Power: 8 |
||
June 26, 2021, 09:57 |
|
#6 |
New Member
wangyang
Join Date: Jun 2021
Posts: 3
Rep Power: 5 |
Your article about UDRGM was very helpful for me, but it is uneasy to understand via the table files are unknown. Therefore, I sinerely hope you can sent the table files to me. Thank you very much.
Address:384117102@qq.com |
|
July 1, 2021, 22:57 |
|
#7 |
New Member
wangyang
Join Date: Jun 2021
Posts: 3
Rep Power: 5 |
I studied the UDRGM carefully these days and I found that the reason why your code for density did not work.
double Air_density(cell_t cell, Thread *thread, cxboolean vapor_phase, double temp, double density, double press, double yi[]) { real mix = 0; return CalcGasAblation(&rhoA, &rhoB, &rhoC, &rhoD, &rhoMixPoints, &rhoPressPoints, &rhoTempPoints, rhoNumMixPoints, rhoNumPressPoints, rhoNumTempPoints, mix, 101325, temp, rhoEquidistant); } I think you should get rid of the "double density" in parentheses. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HEM with Fluent: Use NIST Real Gas Model in 2-phase region | c_023 | FLUENT | 2 | April 13, 2022 07:26 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |