CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Using User Define Real Gas Model (UDRGM) for our data

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2021, 20:22
Default Using User Define Real Gas Model (UDRGM) for our data
  #1
Member
 
Amirreza Niazmehr
Join Date: Nov 2018
Posts: 40
Rep Power: 8
Amirreza_pro is on a distinguished road
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 anyone please help me and say where is the problem? I really stuck in this problem.
Thanks in advance
Attached Files
File Type: c Converged.c (26.1 KB, 2 views)
File Type: c Diverged.c (26.3 KB, 1 views)
Amirreza_pro 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
user defined real gas model antara Fluent UDF and Scheme Programming 0 October 12, 2015 15:59
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
Check particle impaction with User Fortran Julian K. CFX 3 January 12, 2012 10:46
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 03:21
Constant velocity of the material Sas CFX 15 July 13, 2010 09:56


All times are GMT -4. The time now is 00:02.