Skip to main content

Easy generate, read, merge and print tecplot triangular grids.

Project description

triangle-grid-merge

Why this project is useful

  1. It helps to generate finite element triangular grid in tecplot format (.dat).

  2. It's easy to read such a grid from tecplot (.dat) file.

  3. Works for a multizone grids.

  4. Able to merge multizone grids and write them as a single grid.

The main advantage is that with tgm it's easy to read tecplot (.dat) format with multizone triangular grid inside and connect zones basing on the coordinates of the nodes.

Quickstart

To create a grid

from triangular_grid_merge.grid import Grid

In order to initialize the grid with elements use:

grid.init(4, 5, (0, 60), (0, 100))

The code above creates a grid with 4 points by x-axis and 5 point by y-axis. The points are distributed inside the rectangular given by the 2 points - (x1, x2) (y1, y2)

The area is devided according to the number of points by each axis.

To print the grid inside the tgm's grids directory, use

from triangular_grid_merge.tecplot import print_tecplot
print_tecplot(grid, 'name.dat')

If the grid is multizone you can print it as a single zone giving:

print_tecplot(grid, 'name.dat', merge=True)

threezones threezones

To read a grid. use

from triangular_grid_merge.tecplot import read_tecplot
read_tecplot(grid, 'name.dat')

Details

Triangular grid is the one where each face is set by three nodes. It consists of nodes, faces and edges. grid_view

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

triangular-grid-merge-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

triangular_grid_merge-1.0.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file triangular-grid-merge-1.0.0.tar.gz.

File metadata

  • Download URL: triangular-grid-merge-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for triangular-grid-merge-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ba21de10f282ef9c83a15d393172bcf28b894a971b89680b46251142dc8dfd18
MD5 16600d0351459ea689f4e92a27251bb2
BLAKE2b-256 01633edc196d91fea644ba5a3ecbc1d244cb655f605c72f61d3de63c864195cc

See more details on using hashes here.

File details

Details for the file triangular_grid_merge-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: triangular_grid_merge-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for triangular_grid_merge-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd24a0eaa0b74d5a3123acd6ed945d256b792b62d08c35a66af7012ec44e8911
MD5 ddc80d35da2307298d9ec77c9e7914ee
BLAKE2b-256 4dcf3a96f9515eefc903b7dd0389833d4d3ec78287b3036f4c332ff3302b6030

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page