Incorrect results of SWAK4FOAM function objects if Parallelisation involved
Dear Foamers,
I have a flow simulation where groovyBC and several function objects of SWAK4FOAM are utilised. The simulation is an internal flow which consists of a single inlet and some kind of a pipe system with many outlets. These "outlets" are actually predefined faceZones in the internal mesh. The main idea for the simulation is that the inlet pressure boundary condition is dependent on the total mass output of the system. Hence what the function objects do is to track the flowrate of each outlet at every time step and accumulate it in a global variable called extAgntVol. extAgentVol is handed over to the groovyBC to correct the pressure. I have added most of the code but not all because it repeads a lot. Boundary condition Code:
INLET { Code:
functions If the simulation is performed on a single processor everything works fine. However as soon as it is runs in parallel the tracked flowrates are false (they are always too little). I kind of had the same problem when I wrote the code for the flowrate accumulation directly into the solver. There it was solved by replacing sum(...) with gSum(...). (http://www.cfd-online.com/Forums/ope...n-cluster.html) But afaik gSum(...) is not available for SWAK4FOAM. I would be glad for any suggestions and workarounds. |
All times are GMT -4. The time now is 11:43. |