|
[Sponsors] |
May 8, 2023, 07:40 |
How to refer to adjacent cells in a UDF?
|
#1 |
New Member
Gloria
Join Date: May 2023
Posts: 2
Rep Power: 0 |
Hello! I am building a DPM model with a UDF. In that UDF, at some point, I need to use the property of a cell adjacent to the wall. How can I do that? I was thinking of using macros THREAD_T(t) and F_C0(f, t), but I am not sure on how to define the face. Setting it as “face_t f;” seems not enough.
Does anyone have a hint on how to approach it? Any reply will be much appreciated! |
|
May 8, 2023, 11:25 |
|
#2 | |
Member
Odisha
Join Date: Jan 2020
Posts: 59
Rep Power: 6 |
Quote:
Code:
c_face_loop(cell,t,n) { f = C_FACE(cell,t,n); tf = C_FACE_THREAD(cell,t,n); if(!BOUNDARY_FACE_THREAD_P(tf)) { c0 = F_C0(f,tf); c1 = F_C1(f,tf); } } |
||
Tags |
dpm, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Averaging over iterations for steady-state simulation | CFD student | Fluent UDF and Scheme Programming | 8 | September 22, 2022 04:39 |
How to use a UDF to set the volume fraction in the cells next to a wall? | DF15 | Fluent UDF and Scheme Programming | 33 | August 20, 2020 14:36 |
Writing udf regarding adjacent cells | vkumar12 | Fluent UDF and Scheme Programming | 14 | August 4, 2019 23:04 |
cellZone not taking all the cells inside | rahulksoni | OpenFOAM Running, Solving & CFD | 6 | January 25, 2019 01:11 |
UDF about Searching the Adjacent cells: Please help me to find out the error | Hotpig1100 | Fluent UDF and Scheme Programming | 6 | July 9, 2018 20:37 |