CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Storing cell coordinates of an iso-surface every time-step in a parallel calculations (https://www.cfd-online.com/Forums/fluent-udf/204051-storing-cell-coordinates-iso-surface-every-time-step-parallel-calculations.html)

cfdstar July 12, 2018 13:20

Storing cell coordinates of an iso-surface every time-step in a parallel calculations
 
I am dealing with a transient simulation and am performing parallel calculations. I wanted to extract coordinates of the cell centres on an iso-surface of a scalar (e.g. pressure) every time-step and store them in an array. This array should be accessible to other subroutines (e.g. Define_adjust). Is there any UDF to this end?

AlexanderZ July 13, 2018 05:06

You may use Define_execute_at_end macro to organize after each timestep a loop over all cells in your domain and check the condition you want (for instance pressure = 1atm).
than you may organize here writing to the array. Or you may make a flag for cells where the condition is true.

All of these data you may use in other macro Define_adjust for instance.

best regards

cfdstar July 13, 2018 15:37

Quote:

Originally Posted by AlexanderZ (Post 699117)
You may use Define_execute_at_end macro to organize after each timestep a loop over all cells in your domain and check the condition you want (for instance pressure = 1atm).
than you may organize here writing to the array. Or you may make a flag for cells where the condition is true.

All of these data you may use in other macro Define_adjust for instance.

best regards

Dear Alexander,

Thanks for your reply.
With the method you suggest, the array has a variable length that a value should be assigned to its elements in a macro (let's say execute_at_end, which is running on each node separately) and this array should be visible to other nodes as well. Then, the question is how to define this array and make it accessible to other computational nodes. The other question is how to address the elements in this array since each computational node has a different number of cells containing that iso-surface.

Regards,


All times are GMT -4. The time now is 08:05.