fluidfoam.readpostpro

Read OpenFoam PostProcessing Files for Python

This module provides functions to list and read OpenFoam PostProcessing Files:

fluidfoam.readpostpro.readforce(path, namepatch='forces', time_name='0', name='forces')[source]

read the data contained in the force file . create the forces variables in the Forcesfile object

Args:

path: str

time_name: str

name: str

Returns:

array: array of force field; size of the array is the size of the time

A way you might use me is:

force = readforce(‘path_of_OpenFoam_case’, ‘0’, ‘forces’)

It will create and fill the force variables:

[‘T’,’Fpx’,’Fpy’,’Fpz’,’Fvx’,’Fvy’,’Fvz’ ,’Fpox’,’Fpoy’,’Fpoz’,’Mpx’,’Mpy’,’Mpz’ ,’Mvx’,’Mvy’,’Mvz’,’Mpox’,’Mpoy’,’Mpoz’]

fluidfoam.readpostpro.readprobes(path, probes_name='probes', time_name='0', name='U')[source]

read the data contained in the force file . create the forces variables in the Forcesfile object

Args:

path: str

probes_name: str

time_name: str

name: str

Returns:

array: array of time values and array of probes data;

A way you might use me is:

probe_data = read(‘path_of_OpenFoam_case’, ‘0’, ‘probes’, ‘U’)

Functions

readforce(path[, namepatch, time_name, name])

read the data contained in the force file .

readprobes(path[, probes_name, time_name, name])

read the data contained in the force file .

varinforce()

return the var included in postProcessing force files.