CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

issue with purgeWrite in processor* files for parallel runs with simpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By AlxB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2021, 03:49
Default issue with purgeWrite in processor* files for parallel runs with simpleFoam
  #1
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 4
AlxB is on a distinguished road
Hello,

I couldn't find anything on the forum about this issue which is quite annoying for the disk space for long simulations in steady state parallelized case.

How do you control the number of iteration subfolders in the processor* files with simpleFoam ?

In my case, whatever value I set for purgeWrite in the the controlDict file, the iteration subfolders are accumulating themselves.
None is deleted and moreover a (small) writeInterval seems applied but it is not equal to the one set in the controlDict.

Does anyone have any idea or suggestion on this ?

Thank you

below an extract of my controlDict file:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     simpleFoam;

startFrom       latestTime;

stopAt          endTime;
endTime         4500;
deltaT          1;

writeControl    timeStep;
writeInterval   100;
purgeWrite      1;

writeFormat     binary;
writePrecision  6;
writeCompression off;

timeFormat      general;
timePrecision   6;

runTimeModifiable true;
below an extract of the subfolders of one of the processor* files:
Code:
/case$ ls processor0
0     1112  1228  1342  1458  1572  1687  1800  1915  2032  2158  2284             325  440  555  670  785  90
1     1113  1229  1343  1459  1573  1688  1801  1916  2033  2159  2285             326  441  556  671  786  900
10    1114  123   1344  146   1574  1689  1802  1917  2034  216   2286             327  442  557  672  787  901
100   1115  1230  1345  1460  1575  169   1803  1918  2035  2161  2287             328  443  558  673  788  902
1001  1116  1231  1346  1461  1576  1690  1804  1919  2036  2162  2288             329  444  559  674  789  903
1002  1117  1232  1347  1462  1577  1691  1805  192   2037  2163  2289             33   445  56   675  79   904
1003  1118  1233  1348  1463  1578  1692  1806  1920  2038  2164  229              330  446  560  676  790  905
1004  1119  1234  1349  1464  1579  1693  1807  1921  2039  2165  2291             331  447  561  677  791  906
1005  112   1235  135   1465  158   1694  1808  1922  204   2166  2292             332  448  562  678  792  907
1006  1120  1236  1350  1466  1580  1695  1809  1923  2041  2167  2293             333  449  563  679  793  908
1007  1121  1237  1351  1467  1581  1696  181   1924  2042  2168  2294             334  45   564  68   794  909
1008  1122  1238  1352  1468  1582  1697  1810  1925  2043  2169  2295             335  450  565  680  795  91
1009  1123  1239  1353  1469  1583  1698  1811  1926  2044  217   2296             336  451  566  681  796  910
101   1124  124   1354  147   1584  1699  1812  1927  2045  2171  2297             337  452  567  682  797  911
1010  1125  1240  1355  1470  1585  17    1813  1928  2046  2172  2298             338  453  568  683  798  912
1011  1126  1241  1356  1471  1586  170   1814  1929  2047  2173  2299             339  454  569  684  799  913
1012  1127  1242  1357  1472  1587  1700  1815  193   2048  2174  23               34   455  57   685  8    914
1013  1128  1243  1358  1473  1588  1701  1816  1930  2049  2175  230              340  456  570  686  80   915
1014  1129  1244  1359  1474  1589  1702  1817  1931  205   2176  2301             341  457  571  687  801  916
1015  113   1245  136   1475  159   1703  1818  1932  2051  2177  2302             342  458  572  688  802  917
1016  1130  1246  1360  1476  1590  1704  1819  1933  2052  2178  2303             343  459  573  689  803  918
1017  1131  1247  1361  1477  1591  1705  182   1934  2053  2179  2304             344  46   574  69   804  919
1018  1132  1248  1362  1478  1592  1706  1820  1935  2054  218                      875  345  460  575  690  805  92
1019  1133  1249  1363  1479  1593  1707  1821  1936  2055  2181  231              346  461  576  691  806  920
102   1134  125   1364  148   1594  1708  1822  1937  2056  2182  232              347  462  577  692  807  921
1020  1135  1250  1365  1480  1595  1709  1823  1938  2057  2183  233              348  463  578  693  808  922
1021  1136  1251  1366  1481  1596  171   1824  1939  2058  2184  234              349  464  579  694  809  923
1022  1137  1252  1367  1482  1597  1710  1825  194   2059  2185  235              35   465  58   695  81   924
1023  1138  1253  1368  1483  1598  1711  1826  1940  206   2186  236              350  466  580  696  810  925
1024  1139  1254  1369  1484  1599  1712  1827  1941  2061  2187  237              351  467  581  697  811  926
1025  114   1255  137   1485  16    1713  1828  1942  2062  2188  238              352  468  582  698  812  927
1026  1140  1256  1370  1486  160   1714  1829  1943  2063  2189  239              353  469  583  699  813  928
1027  1141  1257  1371  1487  1600  1715  183   1944  2064  219   24               354  47   584  7    814  929
1028  1142  1258  1372  1488  1601  1716  1830  1945  2065  2191  240              355  470  585  70   815  93
1029  1143  1259  1373  1489  1602  1717  1831  1946  2066  2192  241              356  471  586  700  816  930
103   1144  126   1374  149   1603  1718  1832  1947  2067  2193  242              357  472  587  701  817  931
1030  1145  1260  1375  1490  1604  1719  1833  1948  2068  2194  243              358  473  588  702  818  932
1031  1146  1261  1376  1491  1605  172   1834  1949  2069  2195  244              359  474  589  703  819  933
1032  1147  1262  1377  1492  1606  1720  1835  195   207   2196  245              36   475  59   704  82   934
1033  1148  1263  1378  1493  1607  1721  1836  1950  2071  2197  246              360  476  590  705  820  935
1034  1149  1264  1379  1494  1608  1722  1837  1951  2072  2198  247              361  477  591  706  821  936
1035  115   1265  138   1495  1609  1723  1838  1952  2073  2199  248              362  478  592  707  822  937
1036  1150  1266  1380  1496  161   1724  1839  1953  2074  22    249              363  479  593  708  823  938
1037  1151  1267  1381  1497  1610  1725  184   1954  2075  220   25               364  48   594  709  824  939
1038  1152  1268  1382  1498  1611  1726  1840  1955  2076  2201  250              365  480  595  71   825  94
1039  1153  1269  1383  1499  1612  1727  1841  1956  2077  2202  251              366  481  596  710  826  940
104   1154  127   1384  15    1613  1728  1842  1957  2078  2203  252              367  482  597  711  827  941
1040  1155  1270  1385  150   1614  1729  1843  1958  2079  2204  253              368  483  598  712  828  942
1041  1156  1271  1386  1500  1615  173   1844  1959  208   2205  254              369  484  599  713  829  943
1042  1157  1272  1387  1501  1616  1730  1845  196   2081  2206  255              37   485  6    714  83   944
1043  1158  1273  1388  1502  1617  1731  1846  1960  2082  2207  256              370  486  60   715  830  945
1044  1159  1274  1389  1503  1618  1732  1847  1961  2083  2208  257              371  487  601  716  831  946
1045  116   1275  139   1504  1619  1733  1848  1962  2084  2209  258              372  488  602  717  832  947
1046  1160  1276  1390  1505  162   1734  1849  1963  2085  221   259              373  489  603  718  833  948
1047  1161  1277  1391  1506  1620  1735  185   1964  2086  2211  26               374  49   604  719  834  949
1048  1162  1278  1392  1507  1621  1736  1850  1965  2087  2212  260              375  490  605  72   835  95
1049  1163  1279  1393  1508  1622  1737  1851  1966  2088  2213  261              376  491  606  720  836  950
105   1164  128   1394  1509  1623  1738  1852  1967  2089  2214  262              377  492  607  721  837  951
1050  1165  1280  1395  151   1624  1739  1853  1968  209   2215  263              378  493  608  722  838  952
1051  1166  1281  1396  1510  1625  174   1854  1969  2091  2216  264              379  494  609  723  839  953
1052  1167  1282  1397  1511  1626  1740  1855  197   2092  2217  265              38   495  61   724  84   954
1053  1168  1283  1398  1512  1627  1741  1856  1970  2093  2218  266              380  496  610  725  840  955
1054  1169  1284  1399  1513  1628  1742  1857  1971  2094  2219  267              381  497  611  726  841  956
1055  117   1285  14    1514  1629  1743  1858  1972  2095  222   268              382  498  612  727  842  957
1056  1170  1286  140   1515  163   1744  1859  1973  2096  2221  269              383  499  613  728  843  958
1057  1171  1287  1401  1516  1630  1745  186   1974  2097  2222  27               384  5    614  729  844  959
1058  1172  1288  1402  1517  1631  1746  1860  1975  2098  2223  270              385  50   615  73   845  96
1059  1173  1289  1403  1518  1632  1747  1861  1976  2099  2224  271              386  500  616  730  846  960
106   1174  129   1404  1519  1633  1748  1862  1977  21    2225  272              387  501  617  731  847  961
1060  1175  1290  1405  152   1634  1749  1863  1978  210   2226  273              388  502  618  732  848  962
1061  1176  1291  1406  1520  1635  175   1864  1979  2101  2227  274              389  503  619  733  849  963
1062  1177  1292  1407  1521  1636  1750  1865  198   2102  2228  275              39   504  62   734  85   964
1063  1178  1293  1408  1522  1637  1751  1866  1980  2103  2229  276              390  505  620  735  850  965
1064  1179  1294  1409  1523  1638  1752  1867  1981  2104  223   277              391  506  621  736  851  966
1065  118   1295  141   1524  1639  1753  1868  1982  2105  2231  278              392  507  622  737  852  967
1066  1180  1296  1410  1525  164   1754  1869  1983  2106  2232  279              393  508  623  738  853  968
1067  1181  1297  1411  1526  1640  1755  187   1984  2107  2233  28               394  509  624  739  854  969
1068  1182  1298  1412  1527  1641  1756  1870  1985  2108  2234  280              395  51   625  74   855  97
1069  1183  1299  1413  1528  1642  1757  1871  1986  2109  2235  281              396  510  626  740  856  970
107   1184  13    1414  1529  1643  1758  1872  1987  211   2236  282              397  511  627  741  857  971
1070  1185  130   1415  153   1644  1759  1873  1988  2111  2237  283              398  512  628  742  858  972
1071  1186  1300  1416  1530  1645  176   1874  1989  2112  2238  284              399  513  629  743  859  973
1072  1187  1301  1417  1531  1646  1760  1875  199   2113  2239  285              4    514  63   744  86   974
1073  1188  1302  1418  1532  1647  1761  1876  1990  2114  224   286              40   515  630  745  860  975
1074  1189  1303  1419  1533  1648  1762  1877  1991  2115  2241  287              401  516  631  746  861  976
1075  119   1304  142   1534  1649  1763  1878  1992  2116  2242  288              402  517  632  747  862  977
1076  1190  1305  1420  1535  165   1764  1879  1993  2117  2243  289              403  518  633  748  863  978
1077  1191  1306  1421  1536  1650  1765  188   1994  2118  2244  29               404  519  634  749  864  979
1078  1192  1307  1422  1537  1651  1766  1880  1995  2119  2245  290              405  52   635  75   865  98
1079  1193  1308  1423  1538  1652  1767  1881  1996  212   2246  291              406  520  636  750  866  980
108   1194  1309  1424  1539  1653  1768  1882  1997  2121  2247  292              407  521  637  751  867  981
1080  1195  131   1425  154   1654  1769  1883  1998  2122  2248  293              408  522  638  752  868  982
1081  1196  1310  1426  1540  1655  177   1884  1999  2123  2249  294              409  523  639  753  869  983
1082  1197  1311  1427  1541  1656  1770  1885  2     2124  225   295              41   524  64   754  87   984
1083  1198  1312  1428  1542  1657  1771  1886  20    2125  2251  296              410  525  640  755  870  985
1084  1199  1313  1429  1543  1658  1772  1887  2000  2126  2252  297              411  526  641  756  871  986
1085  12    1314  143   1544  1659  1773  1888  2001  2127  2253  298              412  527  642  757  872  987
1086  120   1315  1430  1545  166   1774  1889  2002  2128  2254  299              413  528  643  758  873  988
1087  1201  1316  1431  1546  1660  1775  189   2003  2129  2255  3                414  529  644  759  874  989
1088  1202  1317  1432  1547  1661  1776  1890  2004  213   2256  30               415  53   645  76   875  99
1089  1203  1318  1433  1548  1662  1777  1891  2005  2131  2257  300              416  530  646  760  876  990
109   1204  1319  1434  1549  1663  1778  1892  2006  2132  2258  301              417  531  647  761  877  991
1090  1205  132   1435  155   1664  1779  1893  2007  2133  2259  302              418  532  648  762  878  992
1091  1206  1320  1436  1550  1665  178   1894  2008  2134  226   303              419  533  649  763  879  993
1092  1207  1321  1437  1551  1666  1780  1895  2009  2135  2261  304              42   534  65   764  88   994
1093  1208  1322  1438  1552  1667  1781  1896  201   2136  2262  305              420  535  650  765  880  995
1094  1209  1323  1439  1553  1668  1782  1897  2011  2137  2263  306              421  536  651  766  881  996
1095  121   1324  144   1554  1669  1783  1898  2012  2138  2264  307              422  537  652  767  882  997
1096  1210  1325  1440  1555  167   1784  1899  2013  2139  2265  308              423  538  653  768  883  998
1097  1211  1326  1441  1556  1670  1785  19    2014  214   2266  309              424  539  654  769  884  999
1098  1212  1327  1442  1557  1671  1786  190   2015  2141  2267  31               425  54   655  77   885  constant
1099  1213  1328  1443  1558  1672  1787  1900  2016  2142  2268  310              426  540  656  770  886
11    1214  1329  1444  1559  1673  1788  1901  2017  2143  2269  311              427  541  657  771  887
110   1215  133   1445  156   1674  1789  1902  2018  2144  227   312              428  542  658  772  888
1100  1216  1330  1446  1560  1675  179   1903  2019  2145  2271  313              429  543  659  773  889
1101  1217  1331  1447  1561  1676  1790  1904  202   2146  2272  314              43   544  66   774  89
1102  1218  1332  1448  1562  1677  1791  1905  2021  2147  2273  315              430  545  660  775  890
1103  1219  1333  1449  1563  1678  1792  1906  2022  2148  2274  316              431  546  661  776  891
1104  122   1334  145   1564  1679  1793  1907  2023  2149  2275  317              432  547  662  777  892
1105  1220  1335  1450  1565  168   1794  1908  2024  215   2276  318              433  548  663  778  893
1106  1221  1336  1451  1566  1680  1795  1909  2025  2151  2277  319              434  549  664  779  894
1107  1222  1337  1452  1567  1681  1796  191   2026  2152  2278  32               435  55   665  78   895
1108  1223  1338  1453  1568  1682  1797  1910  2027  2153  2279  320              436  550  666  780  896
1109  1224  1339  1454  1569  1683  1798  1911  2028  2154  228   321              437  551  667  781  897
111   1225  134   1455  157   1684  1799  1912  2029  2155  2281  322              438  552  668  782  898
1110  1226  1340  1456  1570  1685  18    1913  203   2156  2282  323              439  553  669  783  899
1111  1227  1341  1457  1571  1686  180   1914  2031  2157  2283  324              44   554  67   784  9
AlxB is offline   Reply With Quote

Old   September 21, 2021, 04:23
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
Hi,

I don't see anything wrong with your controlDict parameters and I never had issues with purgeWrite so far.

What is written inside the timestep directories? Do you see all the fields or just some of them?

Usually this happens when you use function objects which creates fields in time step directories at a different writeInterval.

I hope this helps,
Yann
Yann is offline   Reply With Quote

Old   September 22, 2021, 09:37
Default
  #3
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 4
AlxB is on a distinguished road
many thanks Yann,

I found the trouble was coming from the yPlus functionObject in which turned 'enabled' to 'false' instead of 'true' solved the issue.

I am using OFv2012.
Yann likes this.
AlxB is offline   Reply With Quote

Old   September 22, 2021, 13:38
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
Hello,

If you still want use the function, instead of deactivating it you can change the writeControl to writeTime:

Code:
yPlus
{    
    type            yPlus;
    libs            (fieldFunctionObjects);
    enabled            true;

    executeControl  writeTime;
    writeControl    writeTime;
}
This will write the yPlus field only when you write a timeStep. I didn't try it but the purgeWrite should work.

Another way around is just to remove it and execute the function after the simulation is done with this command:

Code:
mpirun -np your_core_number simpleFoam -postProcess -func yPlus -latestTime -parallel
Cheers,
Yann
Yann is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
simpleFoam in parallel issue plucas OpenFOAM Running, Solving & CFD 3 July 17, 2013 12:30
UDF issue MASOUD Fluent UDF and Scheme Programming 14 December 6, 2012 14:39
simpleFoam serious mass balance issue fivos OpenFOAM Running, Solving & CFD 2 November 6, 2011 09:21
Issue with SimpleFoam with Sharp corners kdneroorkar OpenFOAM Running, Solving & CFD 13 September 15, 2008 19:12


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