Giter VIP home page Giter VIP logo

pycfdutils's Introduction

pyCFDutils

Python CFD post-processing utilities
Adrien Crovato, 2020

MATLAB utilities available here.

Features

pycfdutils can be used to:

  • create sectional pressure data from field or surface solution files in Tecplot ASCII, VTK ASCII or VTK binary format
  • compute the sectional aerodynamic loads
  • save the pressure data and the loads to disk

Requirements

pycfdutils needs

  • Python 3 interpreter and libraries
  • numpy and vtk packages
  • matplotlib package (optional)

Install and run

If you only want to use pyCFDutils, you can install it using

python3 -m pip install . [--user]

and then run a case using

python3 path/to/case.py

If you need to develop in pyCFDutils before using it, and you can directly run your case from the repo folder using

python3 run.py path/to/case.py

Documentation

The documentation is written in the classes/methods signature. The main features are listed here for convenience.

vtk_utils.Reader

  • open(fname): read the file fname

vtk_utils.Cutter

  • cut(cut_orig, cut_norm, tag_name=None, tag_id=None): create a cutplane defined by the point cut_orig and the normal cut_norm. If a tag name tag_name and number tag_id are provided, the slice is performed on the group defined by those parameters, otherwise the slice is performed on the grid directly.
  • pts, elems, vals = extract(var_names, tag_dim, at_point=True, sort=True): returns the coordinates of the points (pts), the list of connectivity (elems) and the data (vals) named var_names contained in the current cutplane of dimension tag_dim. atPoint inidcates that the data are defined at the points (as opposed to: defined at the cells center). In the former case, sort can be used to sort the data against the list of connectivity.

cross_sections.CrossSections

  • add_section(y, xz, cp): add data from a cutplane defined at y-coordinate y consisting of x and z-coordinates (xz) and pressure coefficient (cp).
  • compute_loads(aoa=0): compute sectional aerodynamic load coefficients at angle of attack aoa degrees.
  • display(): print the loads on console.
  • plot(): plot the loads.
  • write(): save the loads to disk.

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.