User Defined Real Gas Model

seyf97seyf97 Member

Hi everyone!

I would like to model a condensing R22 vapor, and initially I started an example by modelling the User Defined Real Gas Model (UDRGM) given in the manual :

I have compiled and built the code, but when I load it, I receive this warning message:


....srcmyGas.c(135): warning C4113: 'double (*)(double,double,double *)' differs in parameter lists from 'double (*)(cxboolean,double,double,double *)'



If I ignore the message and Hybrid Initialize, I get a message indicating:

turbulent viscosity limited to viscosity ratio of 1.000000e+05 in 6250 cells


Then, when I run the calculation,


# Divergence detected in AMG for temperature, protective actions enabled!


# Divergence detected in AMG for temperature, temporarily solve with BCGSTAB!


When I change relaxation, I only achieve 5-10 iterations which diverge dramatically. When I checked the results in Post-Processing, I realized that the pressure values are unrealistic, and std. initialization by default tries to initialize pressure to 2.e-11 Pa


Additional background info:

  • I run fluent from VS 2019 Command Prompt and then load my .MSH file from dp0/FFF/mech in order to build the UDF properly.
  • The geometry is a simple 2D rectangle (10mm x 100mm)


  • Inlet: mass flow (0.001 kg/s)
  • Outlet: pressure outlet (0 pa gauge)
  • Temperature is patched to 300K


Any help is appreciated. Thanks.


Sign In or Register to comment.