|
[Sponsors] |
June 28, 2019, 00:43 |
How to get data of mass fraction in UDF
|
#1 |
New Member
lili
Join Date: May 2019
Posts: 12
Rep Power: 7 |
Hi, I'd like to get mass fraction data and store UDM at the end of tilmestep.
I tried calculation with UDF that can execute value at the end of tilmestep but it doesn't work and i get segmentation error. My UDF is here, #include "udf.h" #include "sg_pdf.h" #include "pdf_props.h" DEFINE_EXECUTE_AT_END(mass_fraction) { Domain *d; Thread *t; cell_t c; d = Get_Domain(1); real mass; thread_loop_c(t,d) { begin_c_loop(c, t) { mass = Pdf_Yi(c, t, 54); /*54 is an index of species i want to get value */ C_UDMI(c, t, 0) = mass; Message("mf = %g\n", mass); } end_c_loop(c,t) } } my calculation model has both solid zone and fluid zone. Addition to that, I use an Chemkin as a species model. I also tried to change Pdf_Yi(cat,54) into C_YI(c,t,54) but it also didn't work. Do you know if there are some problems in my UDF or not, how to use C_YI or Pdf_Yi macros, or the other ways to get mass fraction value at the end of tilmestep without these macros. regards |
|
Tags |
macros, segmentation error, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass fraction of species | Lilly | FLUENT | 5 | March 13, 2022 17:52 |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 07:31 |
Accessing the species mass fraction for particles data in UDF | mac_09 | FLUENT | 17 | August 9, 2017 20:15 |
Define mass flow profile with regards to species mass fraction | danS | Fluent UDF and Scheme Programming | 0 | June 20, 2017 06:21 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 03:32 |