Skip to main content

Convert between different mesh data formats

Project description

https://badge.fury.io/py/IFEM-to-VT.svg https://travis-ci.org/TheBB/IFEM-to-VT.svg?branch=master

IFEM-to-VT is a tool for converting between various data formats used for storing simulation results.

Supported readers:

  • IFEM HDF5 files (.hdf5)

  • LRSpline geometries (.lr)

  • GoTools (B-Spline) geometries (.g2)

  • SIMRA result files (.res)

  • WRF result files (NetCDF4)

Supported writers:

The tool is so named because it was initially designed for IFEM, and only for output formats that started with “VT”.

Installation

It is recommended to install with PIP:

pip install --user IFEM-to-VT

To install from source:

pip install --user .

IFEM-to-VT requires Python 3. It is possible that, on your system, pip refers to Python 2. In this case, do:

pip3 install --user IFEM-to-VT

or:

pip3 install --user .

IFEM-to-VT requires the numpy, H5Py, VTK and LRSplines libraries, all of which contain compiled components. In ideal circumstances, they should be installed automatically from PyPi with the above commands, but circumstances are not always ideal. For example, VTK is, as of the time of writing, not available for Python 3.8 on PyPi. If dependencies fail to install, please consult the relevant documentation of the respective libraries.

VTF support is not available out-of-the-box because it depends on proprietary libaries. If these libraries are available on your system, you may install VTFWriter manually. If it is present, IFEM-to-VT should enable VTF support automatically.

Upon successful installation, an ifem-to-vt executable should be installed in ~/.local/bin, or the binary path of the current Python environment. To run it, ensure that this directory is in your PATH.

Usage

Basic usage is:

ifem-to-vt INFILE.hdf5 [OUTFILE]

For help with relevant command-line-options please consult:

ifem-to-vt --help

If the output filename is specified, the format will be determined from its extension, unless specifically overriden with -f or --fmt:

ifem-to-vt -f vtu INFILE.hdf5

Some options are only available for certain input or output formats, and for some options some specific values may only be available for certain input or output formats. Further, depending on circumstances, some options may be determined to be incompatible with each other. In all these cases you should be either warned or provided with an error message. If you feel you get an error in a case where that shouldn’t happen, please open an issue, including the information from running with --debug.

Logging options

The verbosity of standard output can be changed with --debug (use for bug reports), --info (default), --user, --warning and --error.

IFEM-to-VT will try to use rich formatted output by default. Switch this off with --no-rich.

General options

To increase resolution beyond linear interpolation between element vertices, use the -n or --nvis option. A value of e.g. 3 indicates that each element should be subdivided into three per axis, creating a 9-fold increase in data amount for 2D results.

To include only certain fields use the --filter or -l option. Issue this option multiple times, or give a comma-separated list as argument.

Use -f or --fmt to override the output format, which is by default derived from the output filename extension. This may be necessary for formats which write to directories.

Use --last to only write the final timestep.

Use --mode to specify output mode, depending on what the writer is capable of. All current writers are capable of switching between binary (default) and ascii mode.

WRF options

Output is given in projected coordinates by default. If --global is given, they will be converted to true physical coordinates, with the origin at the center of the Earth, the x-axis pointing toward the prime meridian and the z-axis pointing toward the north pole.

By default, the output is a 3D mesh including all volumetric fields. If --planar is given, it will be a 2D mesh including only planar fields, as well as the surface slice of volumetric fields. If --extrude is given, it will be a 3D mesh including all volumetric fields, as well as planar fields interpreted as constants in the vertical direction.

If --periodic is given, IFEM-to-VT will interpret the mesh as a global grid and attempt to tie it together in the longitudinal axis and at the poles. This only works together with --global.

IFEM options

The output may be restricted to certain bases with --basis or -b. Use this option multiple times or give a comma-separated list as argument.

The basis for the geometry can be chosen with --geometry.

SIMRA options

The endianness of the input can be specified with --endianness, with valid arguments being native (default), little and big.

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

IFEM-to-VT-2.0.2.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

IFEM_to_VT-2.0.2-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file IFEM-to-VT-2.0.2.tar.gz.

File metadata

  • Download URL: IFEM-to-VT-2.0.2.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for IFEM-to-VT-2.0.2.tar.gz
Algorithm Hash digest
SHA256 d9dd6b56d7cebcb82f5bd838bac14b0b3d0085bea520e445e2402489fead4fb7
MD5 5db677df89992eddc89d354bb8ab218c
BLAKE2b-256 2ce6a0a8dacc0dc6f38c85284fe30e8a57657729a16a5ea5e4b648adead8baa0

See more details on using hashes here.

File details

Details for the file IFEM_to_VT-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: IFEM_to_VT-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.10

File hashes

Hashes for IFEM_to_VT-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ac57bf109ded3f17f91ea30902e7119d98dda0f395b047d6e0c2ca54c0abb11
MD5 901e04853fa3f8de11067702ae92cc75
BLAKE2b-256 f289057d1024a7465447373a3b858dffdcc34f67fd7fd85943f8e3dd01210811

See more details on using hashes here.

Supported by

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