CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   Subroutine for pressure boundaries (https://www.cfd-online.com/Forums/siemens/53926-subroutine-pressure-boundaries.html)

Mir July 26, 2004 16:05

Subroutine for pressure boundaries
 
I want give a pressure boundary as pressure depending on mass flow (or velocity) and I think I should use bcdefp subroutine. The variable PR is defined for each centroid on boundary region? I must run a parallel calcultaion. Could someone explain me how is possible using sets in order to have all file only in a processor? Thanks in advance.

steve July 27, 2004 17:38

Re: Subroutine for pressure boundaries
 
In parallel star will call all bcdef*.f subroutines on each processor where a boundary which has user subroutines actiavted.

So with this in mind the easiest thing is write a bcdefp.f that is independent of the processor. If you have to read a file, just copy it to all processors and you will be okay since this file will only be read if the appropriate boundary is on a processor.

If you need to do some sort of summing over a boundary to determine the mass flow/velocity then you should do this in posdat.f at level 2 and then make a call to the star parallel calls like GSUM. Making your code in this way will mean that you dont have to care about the decomposition of the mesh.

Your local support office should be able to give you a small example.

Otherwise use if you want to decompose by sets, use the info button in prostar to define the cells sets for the parallel run, then use the set decompostion option of star 3200 or prohpc and write your usercode as above without the GSUM etc calls.

In my opinion the effort to add the star parallel calls is very small once you have valid usercodes, thus the first method is much more general and less likely to cause problems if you apply your code other models.


All times are GMT -4. The time now is 10:48.