Skip to content

pyCFS

pyCFS is an automation and data processing library for the openCFS software. It enables the user to build an abstraction layer around the openCFS simulation which means that the user can execute simulations directly from a python script or notebook without worrying about the individual simulation files.

Furthermore, the data processing submodule implements the most frequently needed data processing building blocks and pipelines which are employed in data pre and postprocessing steps.

Installation

Install via pip

pip install pycfs

Documentation

Documentation of pyCFS can be found here.

pyCFS-data

Data processing framework for openCFS.1 This project contains Python libraries to easily create and manipulate data stored in openCFS type HDF5 file format (*.cfs). A small tutorial for using some of the main features of the pyCFS-data module can be found here.

Example code
from pyCFS.data.io import CFSReader, CFSWriter

with CFSReader('file.cfs') as f:
    mesh = f.MeshData
    results = f.MultiStepData
with CFSWriter('file.cfs') as f:
    f.create_file(mesh_data=mesh, result_data=results)

References


  1. Andreas Wurzinger and Stefan Schoder. pyCFS-data: Data Processing Framework in Python for openCFS. May 2024. arXiv:2405.03437, doi:10.48550/arXiv.2405.03437