|
[Sponsors] |
July 11, 2022, 06:27 |
UDF in Cell Zone (Adjacent Cells)
|
#1 |
New Member
Join Date: Jul 2022
Posts: 2
Rep Power: 0 |
Hello,
I am hooking a UDF onto a phase cell zone condition to fix the velocities in each cell which will depend on the adjacent cells' density. I am using DEFINE_PROFILE(name,thread,i) for this purpose. My workflow to achieve this in the UDF is:
I drafted my UDF with guidance from the manual. My problem is that when I try to initialize my case in Fluent, I get a an error "Received signal SIGSEGV". I have checked that the c_loop works using that Message, but when I enable the c_face_loop, initializing the case gives me the error. Interestingly, when I initialize the c_loop with check1, the error happens as well but initializing with check2 has no problem (the difference being that check2 is initialized during declaration.** real check1, check2 =0; begin_c_loop(c,thread) { * * *Message ("OK"); * * *// check1 =1; * * *// check2 = 1; * * *c_face_loop(c,thread,n) * * *{ ....... } } May I know if the workflow for getting adjacent cell properties above is correct, and also what am I doing wrong in there? Thank you. |
|
July 14, 2022, 22:41 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
i think you don't need second loop (c_face_loop(c,thread,n))
use C_FACE and C_FACE_THREAD as a second step and continue with workflow
__________________
best regards ****************************** press LIKE if this message was helpful |
|
July 14, 2022, 23:38 |
|
#3 |
New Member
Join Date: Jul 2022
Posts: 2
Rep Power: 0 |
I've tried removing the c_face_loop, still does not work and gives me the "Received signal SIGSEGV" error when initializing.
|
|
July 18, 2022, 01:50 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
show your code
__________________
best regards ****************************** press LIKE if this message was helpful |
|
Tags |
adjacent cell, cell zone conditions, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh running killed! | Mark JIN | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2022 02:37 |
how can use the cell temperature of each cell from zone 1 in zone 2 with UDF? | bhwcs | Fluent UDF and Scheme Programming | 9 | November 17, 2021 03:20 |
[snappyHexMesh] Error when setting locationsInMesh | elonesampaio | OpenFOAM Meshing & Mesh Conversion | 1 | April 3, 2021 18:44 |
Fluent UDF wrong number of cells in parallel - correct in serial | dralexpe | Fluent UDF and Scheme Programming | 7 | May 17, 2018 09:26 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |