|
[Sponsors] |
September 15, 2021, 07:13 |
Errors at partitioned boundaries
|
#1 |
New Member
Wang Changjun
Join Date: Mar 2018
Posts: 5
Rep Power: 8 |
Recently, I have found that the "begin_c_loop_int_ext" didn't work in my UDF at partitioned boundaries. Who can help me or tell me what should I do? For example, when I used the UDF as below, the UDM-0 didn't change!
thread_loop_c(t, d) { begin_c_loop_int_ext(c, t) { if (C_PART(c, t) != myid) { C_UDMI(c, t, 0) = 1.0; } } end_c_loop_int_ext(c, t) } Last edited by Wang Changjun; September 15, 2021 at 09:23. |
|
September 16, 2021, 07:08 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
code seems to be correct
what will happen for this case? Code:
thread_loop_c(t, d) { begin_c_loop_int_ext(c, t) { if (C_PART(c, t) != myid) C_UDMI(c, t, 0) = 1.0; else C_UDMI(c, t, 0) = 2.0; } end_c_loop_int_ext(c, t) }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
September 16, 2021, 07:54 |
|
#3 |
New Member
Wang Changjun
Join Date: Mar 2018
Posts: 5
Rep Power: 8 |
Thank you for your reply!
As introduced in Fluent Customization Manual: "For interior cells, the partition ID is the same as the compute node ID. For exterior cells, the compute node ID and the partition ID are different". So, if the macro begin...end_c_loop_int_ext(c, t) work, the UDM-0 of the exterior cell of a partitioned zone would be 1.0. But the result is the UDM-0 value of the entire computational domain is zero in parallel computing. I tested the functionality of the macro begin...end_c_loop_int_ext(c, t) because in my program I wanted a UDM of a cell at the boundary of a partition zone to have an effect on the cells adjacent to that cell once the UDM reached a specific value. According to the introduction of the macro begin...end_c_loop_int_ext(c, t) in Fluent Customization Manual, this idea is achievable. But it didn't actually work. Just like the UDM values are calculated separately between each partition zone (the loop is in DEFINE_ADJUST macro). If you have any experience or advice, hopefully you can help me. Lastly, I'm sorry for my poor English and I hope my presentation makes sense to you. |
|
September 16, 2021, 08:56 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
your code should work from my point of view, based on manual.
but I'm not sure about the concept of your simulation: partitioning is random (in most cases) so exterior cells (according to my knowledge, which is not that big actually) could be inside domain as well if your code worked, you would get udmi = 1 on each boundary between partitions, and that boundaries are random is that what you want?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
September 16, 2021, 09:31 |
|
#5 |
New Member
Wang Changjun
Join Date: Mar 2018
Posts: 5
Rep Power: 8 |
Yes, although the code is only a simple test.
In short, the UDM value of a cell in the computing domain is determined by adjacent cells. If this macro (begin_c_loop_int_ext) works normally, there should be no problem with my current program. However, it is now found that the calculation of UDM value is abnormal at the boundary of the partition. After some testing, I found that this macro did not work at the partition boundary according to the manual. Just like the initial code, the UDM value in the cell at the partition boundary has not changed. |
|
September 16, 2021, 10:52 |
|
#6 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
How did you determine that the UDM-0 value of the entire computational domain is zero in parallel computing? By default, you see only interior cells, so if you use normal methods (for example just plot UDM-0 over your entire domain), you would get a value of 0 everywhere. Exterior cells are only used to communicate values to/from other partitions, they are meant to be used for post-processing, so you won't see them with the default methods.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
||
February 26, 2023, 06:56 |
|
#7 |
New Member
Join Date: Aug 2019
Posts: 12
Rep Power: 7 |
i've faced an issue with accessing udmi outside of current partition mesh. The C_UDMI will return 0 whenever i tried to access C_UDMI stored in the boundary partition mesh (neighborhood cell). Do you found a fix for this issue yet?
|
|
Tags |
udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 6, 2023 00:48 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
[blockMesh] Errors at boundaries between hex blocks | CoolHand | OpenFOAM Meshing & Mesh Conversion | 2 | February 19, 2014 20:08 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |