|
[Sponsors] |
UDF for mass-flow calculation does not print any value into console |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 9, 2020, 13:00 |
UDF for mass-flow calculation does not print any value into console
|
#1 |
New Member
Jakub
Join Date: Mar 2018
Posts: 13
Rep Power: 8 |
Hi,
I am not good in fluent UDFs and I rarely use fluent to be honest, but I want to do some cross-check of my own code and first need to learn how to do something similar but simpler, e.g., integrate fluxes on the specified faces in fluent. Could anyone help me out with testing and correcting my apparently simple UDF which I am willing to use for integrating the mass-flow on a selected surface? After compiling in fluent v19.5 (without any warnings/errors) on SUSE Linux and running parallel it doesn't display any value in the console. It should be simple to test this UDF since it fits for most cases by selecting appropriate ID ZONE in the t= Lookup_Thread(d, 8);. #include "udf.h" DEFINE_EXECUTE_AT_END(mass_flow) { Domain *d; Thread *t; face_t f; real mf=0.; d = Get_Domain(1); t = Lookup_Thread(d, 8); begin_f_loop(f,t) { mf+=F_FLUX(f,t); } end_f_loop(f,t) Message("MASS Flow Rate: %g\n",mf); } I have also an additional question. How to be sure that 1 and 8 are the ID of the zones that I am interested in? I am asking because when I select my domain in Cell Zone Conditions it appears that ID of the domain is 3. But after reading the forum and manual I found it should be equal to 1 in case of a single phase flow. Anyway it doesn't work with 1 and 3 either. d = Get_Domain(1); t= Lookup_Thread(d, 8); Thank you for your time. Jakub |
|
Tags |
fluent, get_domain, lookup_thread, mass-flow, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to get Sutherland and JANAF coefficients of air? | immortality | OpenFOAM Running, Solving & CFD | 64 | October 18, 2022 10:17 |
UDF for Mass Flow at the Outlet: ERROR ACCESS VIOLATION | I-mech | Fluent UDF and Scheme Programming | 1 | May 23, 2014 12:37 |
UDF problems with porous flow | Nicolastheterminator | Fluent UDF and Scheme Programming | 0 | April 8, 2014 09:12 |
initialization of flow field in a transient flow calculation | zhengjg | FLUENT | 1 | January 15, 2014 06:01 |
fluid flow fundas | ram | Main CFD Forum | 5 | June 17, 2000 21:31 |