|
[Sponsors] |
May 20, 2021, 05:24 |
Convergence problems - UDF
|
#1 |
New Member
Tomás Freitas Rocha
Join Date: Mar 2021
Posts: 4
Rep Power: 5 |
Hello everyone,
I am trying to implement a real-gas model for a CO2 ejector. My properties are interpolated from lookup tables, and this is working well for thermal conductivity, specific heat and viscosity. As for density, the simulation converges when I use an ideal-gas model; however, when I switch to my UDF, the simulation does not converge. Even if I write a UDF for density that replicates the ideal gas model, I have problems. I would appreciate any help. Thank you. |
|
May 20, 2021, 18:44 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
well, if you have problems with UDF, you should show it, at least
show the error log as well, show compilation log
__________________
best regards ****************************** press LIKE if this message was helpful |
|
May 21, 2021, 04:39 |
|
#3 |
New Member
Tomás Freitas Rocha
Join Date: Mar 2021
Posts: 4
Rep Power: 5 |
Yes, of course.
Here it is: #include "udf.h" #include "mem.h" #include "external.h" DEFINE_PROPERTY(property_density,c,t) { float density; density = C_P(c,t)/(69.29*C_T(c,t)); return density; } The molecular weight of my fluid is 120 kg/kmol. When I use this UDF, I get negative pressure values. |
|
May 22, 2021, 04:16 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
C_P is gauge pressure, you have to add the reference pressure.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
May 22, 2021, 05:09 |
|
#5 |
New Member
Tomás Freitas Rocha
Join Date: Mar 2021
Posts: 4
Rep Power: 5 |
Thank you for your reply.
I have set my operating pressure at 0. Also, I get no compilation or loading errors! All the other UDFs work. |
|
May 22, 2021, 09:56 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
If you initialize it at e.g. 5 Pa, 300 K, don't iterate, and plot density, does it make sense?
(I don't know what is causing your problem, but this might give some information to help solve the problem.)
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
May 22, 2021, 10:07 |
|
#7 |
New Member
Tomás Freitas Rocha
Join Date: Mar 2021
Posts: 4
Rep Power: 5 |
Yes it does! Which adds to my confusion...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Fluent from Python: UDF Compilation problems | Ames | Fluent UDF and Scheme Programming | 5 | November 16, 2020 06:12 |
Compressor Endface Leakage - Convergence Problems | liying02 | FLUENT | 0 | October 11, 2019 01:45 |
force convergence problems in CFX 6DOF rigid body solver | ajay_ks | CFX | 8 | March 25, 2013 04:02 |
Convergence UDF | L3munoz | Fluent UDF and Scheme Programming | 2 | January 4, 2011 08:04 |
convergence in unstedy problems | hedge | FLUENT | 0 | November 27, 2007 09:24 |