CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   About parallel couple cfx with other code using user fortran (https://www.cfd-online.com/Forums/cfx/236530-about-parallel-couple-cfx-other-code-using-user-fortran.html)

Jinzhihui June 3, 2021 11:15

About parallel couple cfx with other code using user fortran
 
dear all
Now I am trying to couple CFX with other code.
I write a CEL function by user defined CEL for the momentum source term ,and Junction Box routines are used to interactive data with my external code by exploring the data areas(CFX MMS),
such as output the velocity field and the corresponding coordinates, input the momentum source corresponding to the mesh vertices.
The momentum sources are used to the CEL function according to the relation of the solve location and the no-loop all mesh vertices.

The mentioned procedures above have achived with a serial run in CFX. Now I want to do a parallel run.

My question is, when the all mesh are divided into a number of 'partitions', the master and slave are assigned a portion of the entire fileld mesh, respectively.
The mapping relation of each partioner and the entire unqiue mesh could be found by MMS, but the entire mesh information could not be acquired.
How can I get the entire unqiue mesh information directly, It's supposed to be in order, because the order of mapping to partitions is acoording to the entire field mesh order
Are there any alternative better advices for these?

Opaque June 3, 2021 12:12

Quote:

Originally Posted by Jinzhihui (Post 805245)

My question is, when the all mesh are divided into a number of 'partitions', the master and slave are assigned a portion of the entire fileld mesh, respectively.

Correct!!

Quote:

The mapping relation of each partioner and the entire unqiue mesh could be found by MMS, but the entire mesh information could not be acquired.
Not certain how you figure it out from looking at content in the MMS. Let us say it is correct

Quote:

How can I get the entire unqiue mesh information directly,
Why would you want to have such information in a given partition? The point of the partition step is to not have it fully in a single partition.

Quote:

It's supposed to be in order, because the order of mapping to partitions is acoording to the entire field mesh order
Where did you get that idea from? Perhaps I did not understand your statement

Quote:

Are there any alternative better advices for these?
Difficult to advise without knowing what you are trying to achieve with such information

Jinzhihui June 5, 2021 23:39

Quote:

Originally Posted by Opaque (Post 805253)
Correct!!



Not certain how you figure it out from looking at content in the MMS. Let us say it is correct

Thank you very much for the quick reply!
the index of mesh vertices assigned to each partition located in the entire mesh vertices could be get by exploring the data areas, e.g the data in the /Flow/MESH directory of each partitioner. The mapping relation of each partitioner including index order located in the fully mesh, the index of the overlap part located in respective partition also could be get.I can't acquire the above information by using the utility routines in CFX help, only by exploring the data areas directly. Do you have any good method for this?


Quote:

Why would you want to have such information in a given partition? The point of the partition step is to not have it fully in a single partition.

Where did you get that idea from? Perhaps I did not understand your statement
The overall mesh information,including the mesh vertices, control volume, order according to the mapping to partitioners, which for external momentum source computation is necessary. Because those can't be calculated only based on the partitioner information that is mixed with the overlap mesh information.
for example
the fully unique mesh order (I can't get the coordinate, volume information etc. corresponding to order)
order 1 2 3 4 5 6 7 8 9 10 ....
coor ...
volume ...
the partitioner assigned mesh order(these information i can get through MMS)
order:
p1 1 4 6 10
p2 2 5 6 7
p3 3 7 8 9
coor:
p1
p2
p3
volume:
p1
p2
p3
overlap:
p1
p2
p3


All times are GMT -4. The time now is 11:40.