-
-
July 3, 2020 at 9:31 am
KeFon
SubscriberGood morning,Â
I am trying to export data to compute a local property.
I want to retrieve data on faces that are on two opposite sides of a same wall.Â
Because of the mesh construction, I expected the number of faces on both threads to be the same which I could confirm using the GUI:
Zone sizes on domain 1:
...
1089 quadrilateral wall faces, zone 4.
1089 quadrilateral wall faces, zone 7.
1089 quadrilateral wall faces, zone 5.
1089 quadrilateral wall faces, zone 18.
...
Â
84124 nodes.
Â
I am interested in faces in zone 4 and 5.Â
Â
Using a UDF to write on two files the data from these two zones, I get a different number of data for each zone.Â
Â
Here is a portion of the UDF to show how I defined the domain and threads and how I computed the number of elements :
Â
DEFINE_EXECUTE_AT_END(export)
{
...
#if !RP_HOST
Domain *mix_domain=Get_Domain(1);
Thread *wall_thread_NH3=Lookup_Thread(mix_domain,5);Â
Thread *wall_thread_water=Lookup_Thread(mix_domain,4);Â
...
#endif
#if RP_NODE
size_water = THREAD_N_ELEMENTS_INT(wall_thread_water);
size_NH3 = THREAD_N_ELEMENTS_INT(wall_thread_NH3);
...
#endif
...
}
Â
Which gives a total of 1725 faces for zone 5 and 1623 faces for zone 4. Â
Â
Could someone explain where the differences are coming from?Â
Â
Thank you.
-
July 3, 2020 at 3:50 pm
Rob
Forum ModeratorIf you try the UDF in serial what do you get?Â
-
July 10, 2020 at 4:17 am
KeFon
SubscriberThank you very much for your fast answer. We had an issue with the license server and I could not try it until today.
Using Fluent in serial mode, I get the same number of faces from the macro THREAD_N_ELEMENTS_INT and from the GUI for both sides (1089).
Seeing this result, I tried to include a loop on the faces to count them in parallel mode using if (PRINCIPAL_FACE_P(f,*corresponding thread*)) first. The sum of the counted cells gave 1089 for both sides. Â
I could use a first loop to get the number of faces and then a second one to get the properties but I would rather avoid that solution if possible.Â
Thank you.
-
- The topic ‘Number of faces given by the GUI and obtained using UDF are different (Fluent)’ is closed to new replies.
-
3597
-
1283
-
1107
-
1068
-
983
© 2025 Copyright ANSYS, Inc. All rights reserved.