Problems with the F_CENTROID not producing unique values for unique faces
I am working on a project with the goal of accessing a cell some distance from a wall. I start with the handle to a face thread and loop through the faces in it, take the cell those faces are adjacent to and then access the face on the other side of the cell and repeat until I am far enough away. I have constructed sample code (which crashes) below
I am saying that F_T(f,ft); works if you substitute ft which is a face thread when you use a cell thread instead
So C is an all around terrible language (if your trying to debug using the interpreted function compiler) so I got fed up with it and decided to break the problem into two programs, one program to extract the data i needed from fluent (thus minimizing the amount of time spent in c) and one program in java to do the heavy lifting with multiple threads and the like.
The java program is finished and well tested with example cases and I cant figure out why it wouldn't work. Then I took a closer look at the output from my c function.
Right now thread is hard coded to be the surface i want to extract data from.
here is an exerp.
The problem is if i highlight any one of the centroids (the first 3 numbers on each line separated by commas "x,y,z/") I get 18 duplicate results.
for example here are some of line 1's duplicates:
in groups of 4 evenly throughout all the faces in the face thread (about 23000 of them)
I guess my question now is shouldn't F_CENTROID produce a unique result for each face?
Someone please help! no one has replied!
Are you running this simulation in parallel? Does the number of duplicates equal the number of cpu?
Thank you for answering.
The other thing I had considered was the geometry I was testing, it is a heat sink with 16 fins, also not a numerical match.
While stepping through code in my Java program I noticed an interesting pattern between each face and its closest cell.
It seems an interesting pattern has developed in that the closest cell to any face seems to be on some other plain entirely (a shift of .003125). This pattern holds true for all faces in my domain.
In my definition for the centroid values i used
because I am working on something where there will never be a 2d case so i figured it would be ok to hard code it as a 3d case to make sure whoever used this code after me wouldn't make the mistake that it could be.
our of curiosity I tried
it now returns much more reasonable values (as in there are no more duplicates). For some reason unknown to me the ND_ND constant appears to be of some great importance.
I hope this prevents someone else from wasting as much time on this problem as i did.:D
I dont inderstand one thing ,how fluent calculate gradient in cell at boundary condition ,and what is the difference between gradient and reconstruction macro (i read the udf manual but i didnt inderstood )
thank you a lot
|All times are GMT -4. The time now is 08:13.|