/parseForces

Generate a CSV file from the forces.dat file generated by OpenFOAM forces function object.

Primary LanguageAwkMIT LicenseMIT

Introduction

This is a simple script written in AWK to parse the content of forces.dat file generated by OpenFOAM forces function object.

Note:

Currently, the script supports only the output generated by OpenFOAM foundations version (openfoam.org).

How to use it

  • Download or clone this repo:
git clone https://github.com/s1291/parseForces.git
  • Make the script executable with the following command:
chmod +x parseForces

The usage is as simple as running the following command:

./parseForces --to-csv /path/to/the/file/forces.dat > forces.csv

You can omit the --to-csv flag to get a space separated fields.

You can then open the final file using the tool of your choice (Numpy, Pandas, libreOffice Calc, etc.).