Git Product home page Git Product logo

postproc's Introduction

PostProc

A post-processing package for my PhD CFD simulations

postproc is a Python library for post-processing Computational Fluid Dynamics simulations (CFD) data I produce for my PhD. The following modules are provided:

  • cylinder_forces.py: a set of functions which allow to extract useful information from the forces on a body provided with a time series of the lift force.

  • calc.py: module containing functions to compute flow field operations such as derivatives, averages, decompositions and vorticity vector calculation.

  • io.py: functions related to import data from Fortran simulations in binary or ASCII format. Imports 2D or 3D flow fields with a specified number of components. It also imports text files written in columns with the unpack* functions.

  • plotter.py: module equipped with subroutines to generate many different type of plots according to the input data. From 2D contours to CL-t graphs and turbulent kinetic energy plots, Lumley's triagle plot and more.

  • anisotropy_tensor.py: functions to compute the normalized Reynolds stresses anisotropy tensor from the Reynolds stresses tensor and its invariants.

  • frequency_spectra.py: module to compute the frequency spectra of a temporal signal.

  • wavenumber_spectra.py: module to compute the wavenumber spectra of a spatial vector or scalar field.

Installation and usage

The use of a virtual environment is recommended for the installation of the package. Here we will use conda. Create a new conda environment with based on python 3.6 as follows:

conda create --name my_env python=3.6

Activate the environment and install the package using pip:

source activate my_env
pip install -e ~/postproc

The environment can be deactivated running conda deactivate. In order to be able to perform modification on the package without the need of reinstalling the -e (editable) argument is used. This provides the source path of the package to the conda environment so any modifications on the source code (the folder you have downloaded and installed from) is immediately available with no need to re-install.

To use the package just activate the conda environment in your terminal with source activate my_env or load it into your preferred IDE. In your python script, you can import the modules with:

import postproc.calc as calc
import postproc.cylinder_forces as cf
import postproc.io as io
import postproc.plotter as plotter

See the /tests folder for sample scripts (sample data is included).

postproc's People

Contributors

b-fg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.