Skip to main content

MYSTRAN validation

![pypi](https://img.shields.io/pypi/v/mystran_validation.svg “https://pypi.python.org/pypi/mystran_validation”)

Python framework for [MYSTRAN](http://https://github.com/dr-bill-c/MYSTRAN) validation.

  • Free software: MIT license

[[_TOC_]]

Features

Limitations

  • for now, only [a few vectors](#vectors) are implemented

  • Mystran results are based on .NEU result file, therefore, somewhere limited with available results. Plan is to migrate to OP2 parsing once it will have been developped.

Vectors

Currently implemented vectors:

  • [x] Displacements (3 translations, 3 rotations)

  • [x] Reactions (6-dof reactions)

  • [x] CBAR internal forces

  • [x] CBUSH internal forces

Next in the pipe:

  • [ ] CQUAD4 internal forces

  • [ ] CTRIA3 internal forces

A declarative Framework

mystran_validation is a python declarative framework dedicated to MYSTRAN test cases.

declarative means that end-user do not need to know python at-all. Test cases are declared as ini text files, pointing to relevant files, and describing the test itself.

Example:

[DEFAULT]
title = test 00
bulk = bulk_model.nas
reference = test_case_03.op2

[Checking Displs]
# we check all nodes displacements
description = check all displacements
vector = displacements

[Reactions]
# we check all nodes displacements
description = this is a multi-lines
        description
vector = reactions

The above configuration file describes two tests performed on bulk_model.nas (named “Checking Displs”). This test will check all displacements and all ractions against test_case_03.op2 file.

A flexible framework

Event though [many limitations] still remain, the framework features:

### tolerance management

The above example may be tweaked as follows:

[...]

[Displacements]
# we check all nodes displacements
description = check all displacements
vector = displacements
## we can reduce / increase tolerance
rtol = 1e-05 # default relative tolerance
atol = 1e-08 # default absolute tolerance

### checking data subset

Data subset can be checked by specifying gids, SubcaseIDs:

[...]

[Displacements]
# we check all nodes displacements
description = check all displacements
vector = displacements
## we can restrict checked data:
gids = 1, 2
SubcaseIDs = 1,2

### Manual references

Beside reference results file, one can specify a value by-hand as follows:

[Displacements II]
description = Check one single value
vector = displacements
## restrict check to MYSTRAN subset:
gids = 1
SubcaseIDs = 2
axis = 6
reference = 0.00513
atol = 1e-06

USAGE

mystran-validation is a command-line tool. The main entry point is the mystran-val command. mystran-val –help for options and arguments.

The main command mystran-val run will trigger all the test-suites found in the tests repository.

Configuration

mystran-validation finds its settings from a central configuration file located under:

  • Linux: /home/<user>/.config/mystran-validation/config.ini

  • Windows: C:\Users\<user>\AppData\Roaming\numeric\mystran-validation\config.ini

By default, only the [DEFAULT] section is present. You can create any number of profile by adding a new section with relevant name:

[dev]
mystran-bin = path/to/dev/mystran/version

You can now pass --profile dev to maystran-val command.

Overriding test repository

The test repository is defaulted to $HOME/mystran_test_cases and can be overridden by passing --rootdir option:

$ mystran-val --rootdir ~/another-repo run

Specifying MYSTRAN binary to use

MYSTRAN Binary is found with the following scheme:

  • from –mystran-bin (-m short option) passed option

  • from “mystran-bin” value in configuration file

Starting from scratch

After installing mystran-validation (eg using [pipx](https://pypi.org/project/pipx/)), you will need to setup a tests repository. This can be done automatically by using (without additional options):

mystran-val init

This will create:

  • a configuration file in /.config/mystran-validation/config.ini

  • an example folder with two simple models, .OP2 for reference and a .ini file ready to be ran.

You can crate as many profiles as you wish in the configuration file. Just add a new section like:

[dev] mystran-bin = /path/to/mystran rootdir = ~/mystran-test-cases

Yo will then be able to run test-cases per profile:

mystran-val -p toto run

Running your first run

Once your repository is setup, trigger your first test-cases checking:

mystran-val run

Or, if toto profile is defined in the configuration file:

mystran-val -p toto run

If you need to override MYSTRAN binary:

mystran-val -m “path/to/my/mystran” run

History

0.1.0 (2021-05-17)

  • First release on PyPI.

Metadata

Release files for mystran-validation 0.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mystran-validation 0.18.0
File Size Uploaded Provenance
mystran_validation-0.18.0.tar.gz 36.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mystran-validation 0.18.0
File Interpreter ABI Platform
mystran_validation-0.18.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 79.1 kB

Release files / mystran_validation-0.18.0.tar.gz

Download URL mystran_validation-0.18.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a0d50c360bce615e976cceb3c43dc214743b1b7199ea5425a54b5de73f71770
BLAKE2b-256 checksum
How to use checksums
59eb5f2f448733cf46a28d11535786655df197e6973d419bbea0cda7b77f91e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / mystran_validation-0.18.0-py2.py3-none-any.whl

Download URL mystran_validation-0.18.0-py2.py3-none-any.whl
Size 42.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
64779706b4605b1bbf300cd978de5cf370d81a656b2ac5dcdd19f4c47e901754
BLAKE2b-256 checksum
How to use checksums
39eb2dff0d8cc5a1992bf3bc3abacc12334ee6cb24dc4f4b707ced83fd1ec31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Security for mystran-validation 0.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page