mpyconv

This tool supports conversion between various data file formats and configuration file formats.

Supported Format Conversions

The following table shows all supported format conversions. For dat files the last comment line before the data block is interpreted as column header. The converter removes all comments from the file, except the column header.

Data File Formats

Input / Output

CSV

DAT/TXT

ECSV

CSV

yes

yes

yes

DAT/TXT

yes

yes

yes

ECSV

yes

yes

yes

OpenFOAM® Probe

yes

yes

yes

OpenFOAM® Graph

yes

yes

yes

Configuration File Formats

Input ↓ / Output →

YAML

JSON

OpenFOAM® Dict

YAML

yes

yes

no

JSON

yes

yes

no

OpenFOAM® Dict

yes

yes

no

Usage

mpyconv input output

Examples

Convert DAT to CSV

mpyconv simulation_data.dat simulation_data.csv

Convert OpenFOAM Foundation Software Probe Data

Convert OpenFOAM Foundation software probe data to CSV format:

mpyconv postProcessing/probes/0/U probe_velocities.csv