|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002156||OpenFOAM||[All Projects] Bug||public||2016-07-20 13:27||2016-07-20 18:52|
|Target Version||Fixed in Version||4.x|
|Summary||0002156: chtMultiRegionFoam + parallel computation + fieldAverage function object => missing file transfer at decomposePar/reconstructPar|
|Description||After decomposing a case (including fields generated by fieldAverage function object) for parallel computation (with chtMultiRegionFoam solver), the file <example time step>/<example region>/uniform/fieldAveragingProperties is not copied to the processor* folders.|
The same issue occurs vice versa, i.e. if a parallel case is reconstructed the fieldAveragingProperties file is not copied to the reconstructed time step.
To resolve this issue the user is forced to copy the fieldAveragingProperties file by hand, which is not that convenient.
This issue could be reproduced with OpenFOAM v2.3.0,v2.3.1,v3.0.1,v4.0
It would be great if the decomposePar/reconstructPar tool could be modified, so that it copies the fieldAveragingProperties file to/from the processor* folders.
|Steps To Reproduce||The following steps are performed with OpenFOAM v3.0.1, but should be similar to the above mentioned versions.|
1. Change to multiRegionHeater tutorial (<tutorial folder>/heatTransfer/chtMultiRegionFoam/multiRegionHeater/)
2. Modify Allrun script so that a serial simulation is performed
3. Add fieldAverage function Object to controlDict, e.g.
functionObjectLibs ( "libfieldFunctionObjects.so" );
4. Execute Allrun script, wait till first time step is written and then kill the simulation => file 10/topAir/uniform/fieldAveragingProperties exists
5. Execute 'decomposePar -latestTime -allRegions' => the mean fields - generated via fieldAverage - are written to the processor* folders, whereas the fieldAveragingProperties file is not copied
6. As a result the specified fields for averaging are being averaged from new if the parallel simulation is started
|Additional Information||For non-multi-region cases (e.g. pimpleFoam solver is used) the fieldAveragingProperties file is copied properly with decomposePar/reconstructPar.|
|Tags||No tags attached.|
|Can you provide a patch for this functionality?|
I have modified the decomposePar and reconstructPar utilities. After some testing they seem to do the job. For this to work, I have copied existing code, which detects files in <example time step>/uniform and links/copies them to <processor_i>/<example time step>/uniform. The new code fragment detects files in <example time step>/<example region>/uniform and links/copies them to <processor_i>/<example time step>/<example region>/uniform.
The decomposePar/reconstructPar options '-allRegions' and '-region <example reion>' have been tested successfully.
However the code does not look nice because of the redundancy introduced. A more proficient programmer than me may find a better way to include the new feature.
|Thank you for having a go. I will review the changes and implement an elegant solution.|
|The code changes you provide appear to be for an older version of OpenFOAM, certainly older than 4.0.|
I have implemented a more elegant solution for decomposePar in OpenFOAM-dev: commit 0dfb1d6935815a79049841f183bed44fc60c08b6
Will do reconstructPar as well if the approach in decomposePar works for all cases.
Resolved in OpenFOAM-4.x by commit 68a024778e5401af6a41c11a1a44f1ddf6812050
Resolved in OpenFOAM-dev by commit 08a7438038a959d3d0cdd8ad64a66f6c4f87d9db and
Please reopen if there are any issues with these changes.
|2016-07-20 13:27||fTheobald||New Issue|
|2016-07-20 13:33||henry||Note Added: 0006540|
|2016-07-20 15:16||fTheobald||File Added: decomposePar.C|
|2016-07-20 15:17||fTheobald||File Added: reconstructPar.C|
|2016-07-20 15:23||fTheobald||Note Added: 0006541|
|2016-07-20 15:25||henry||Note Added: 0006542|
|2016-07-20 15:34||henry||Note Added: 0006543|
|2016-07-20 16:44||henry||Note Added: 0006544|
|2016-07-20 18:52||henry||Note Added: 0006545|
|2016-07-20 18:52||henry||Status||new => resolved|
|2016-07-20 18:52||henry||Fixed in Version||=> 4.x|
|2016-07-20 18:52||henry||Resolution||open => fixed|
|2016-07-20 18:52||henry||Assigned To||=> henry|