Hi Yukai,
OpenFOAM is notably complex when it comes to managing numerous processed files. To address this complexity, I've included a screenshot featuring a standard connection input file, geometries, output files, and corresponding values. It's advisable to consistently employ relative paths by utilizing the subfolder option, as illustrated in the second screenshot.
To extract parameters from the force.dat file, you can directly navigate to the last line, which typically represents the converged value from OpenFOAM. This can be achieved using the -1 option in the command line.
Moreover, consider incorporating a Python file for post-processing and integrating it into your connection. This can be facilitated by incorporating the Python script as a command line within the Allrun.sh executable file.
Best Regards,
Andreas