|
[Sponsors] |
July 28, 2023, 07:27 |
How fluent solver work inside the fluent?
|
#1 |
Member
Chhotelal
Join Date: Jun 2023
Posts: 31
Rep Power: 2 |
I want to know, how Fluent Solver takes the variable and calculates the value when uploading the UDF function.
In a simple case, I upload only the DEFINE INIT function and initialized the problem, the value is not getting the true value. #include "udf.h" #define M 0.25 #define RHO 1600 #define E 0.4 #define Tref 300 #define Tin 300 int last_timestep = -1; DEFINE_INIT(initial_humidity, d) { real Tabs, w, a, b, C, Pvs, RH; Thread *t; cell_t c; thread_loop_c(t, d) { begin_c_loop(c, t) { C_T(c, t) = Tin; Tabs = C_T(c, t); Pvs = 0.1 * exp(27.0214 - (6887 / Tabs) - (5.31 * log(Tabs / 273.16))); /* Eq(25) */ b = 2.667e-7 * pow((1 - (Tabs / 641.7)), -23.438); C = 1 / (4e5 * pow(Tabs, -2.1166)); a = b * pow(1000 * M, 1 / C); RH = 1 - exp(-a / Tabs); /* Eq (15) */ if (RH > 0.99) { RH = 0.99; } w = (Pvs * RH * 0.62189) / (101.3 - Pvs * RH); /* Eq (26) */ } end_c_loop(c, t) Message ("realative humidity:%f\n", w); Message ("Pv:%f\n", Pvs); Message ("RH:%f\n", RH); } } ================================================== ============================ Error is coming, and the value getting Zero at the initial condition initial_humidity Done. realative humidity:0.000000 Pv:0.000000 RH:0.000000 ================================================== ============================ Node 10: Process 22992: Received signal SIGSEGV. |
|
Tags |
alexanderz |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
foam-extend-4.1 release | hjasak | OpenFOAM Announcements from Other Sources | 19 | July 16, 2021 05:02 |
Selection of solver in ANSYS Fluent for given mach number | Ankit Patel | FLUENT | 9 | January 29, 2021 04:44 |
Fluent Adjoint Solver for compressible flow | b.shuvayan | FLUENT | 2 | January 30, 2015 07:27 |
simpleFoam parallel solver & Fluent polyhedral mesh | Zlatko | OpenFOAM Running, Solving & CFD | 3 | September 26, 2014 06:53 |
The fluent stopped and errors with "Emergency: received SIGHUP signal" | yuyuxuan | FLUENT | 0 | December 3, 2013 22:56 |