|
[Sponsors] |
September 16, 2019, 09:10 |
Fluent UDF for reading mass flux on inlet
|
#1 |
New Member
--
Join Date: Sep 2019
Posts: 3
Rep Power: 7 |
Hey,
at the moment I am working on a project, where I need an UDF to read the mass flux on an inlet. The inlet is a pressure inlet, and the simulation will be run in 2D. I've looked in many forums and threads around how this would be possible, an I found the F_FLUX function. But i don't get the code running. Everytime Fluent tries to start the UDF it crashes. I get the error: ============================= ============================================ Node 999999: Process 14860 : Recieved signal SIGSEGV. =============================================== =============================================== ..... MPI Application rank 1 exited before MPI_Finalize() with status 2 The fl process could not be started. The code I am running at the moment is: DEFINE_EXECUTE_AT_END(mass_flow_update) { Domain *d1; Thread *t1; face_t f; d1 = Get_Domain(5); t1= Lookup_Thread(d1, 17); flow = F_FLUX(f,t1); act_mass_flow_inlet = flow / area_factor; act_mass_change = act_mass_flow_inlet * CURRENT_TIMESTEP; Message("Mass flow this timestep is: %f\n",act_mass_change); } |
|
September 20, 2019, 11:55 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
If you are running a single phase simulation, you should use
d1 = Get_Domain(1); |
|
September 24, 2019, 07:12 |
|
#3 |
New Member
--
Join Date: Sep 2019
Posts: 3
Rep Power: 7 |
Okay thank you it worked,
I thought i had to use the ID I see in fluent, because I splitted my mesh into several areas. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF - Inlet Velocity Profile (Ansys Fluent) | vinayak4399 | Fluent UDF and Scheme Programming | 3 | August 25, 2020 15:15 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Error inputting udf into fluent for mass source | ejvikings | Fluent UDF and Scheme Programming | 0 | April 26, 2012 22:42 |
Problem setting with chtmultiregionFoam | Antonin | OpenFOAM | 10 | April 24, 2012 10:50 |
UDF in Fluent to Match Mass Flow at Pressure Outlet | Jonas Larsson | Main CFD Forum | 1 | April 29, 1999 11:44 |