Skip to main content

Convert Code_Aster MED/RMED simulation files to LIMIT .linp / .lui input format

Project description

logo

License: MIT

med2limit

Convert Code_Aster MED/RMED simulation results into LIMIT .linp / .lui input files for fatigue analysis.

Features

  • Shell workflows (DKT elements: S3, S4) with REPLO/CARCOQUE handling
  • Linear solid workflows (C3D8 / HEXA8, C3D6 / PENTA6) with validated LIMIT node ordering
  • Multi-step / multi-increment displacement and stress transfer
  • Optional shell orientation file, or read directly from IMPR_CONCEPT-embedded result file
  • Automatic detection of shell support level (works for shell-only and mixed hexa+shell models)

Code_aster Requirement

  • Identify weld groups as Group_NO (not Group_MA), 1 node set per weld
  • For shell element, extract top/bottom stresses as:
SIEF_SUP=POST_CHAMP(RESULTAT=RESU,
                    EXTR_COQUE=_F(NOM_CHAM='SIEF_ELNO',
                                  NUME_COUCHE=1,
                                  NIVE_COUCHE='SUP',),);

SIEF_INF=POST_CHAMP(RESULTAT=RESU,
                    EXTR_COQUE=_F(NOM_CHAM='SIEF_ELNO',
                                  NUME_COUCHE=1,
                                  NIVE_COUCHE='INF',),);
  • For shell element, extract orientation/tichkness as:
IMPR_CONCEPT(FORMAT='MED',
             UNITE=80, --> Same unit as your results or in a dedicated file
             CONCEPT=(_F(CARA_ELEM=Elem,
                         REPERE_LOCAL='ELEM',
                         MODELE=Modell,),),)                                  

Installation

Install med2limit with pip into a virtual python environnement (venv):

python3 -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/simvia-tech/med2limit.git@dev

Usage

Command line

From 01_exemple in folder:

med2limit/exemples/data
med2limit 01_exemple.rmed output.linp output.lui --groups "Shell1,Shell2" --nsets "WeldNo"

With separate orientation file:

med2limit 01_exemple.rmed output.linp output.lui 01_carcoc.rmed --groups "Shell1,Shell2" --nsets "WeldNo"

01_exemple

Code_aster Shell-Shell geometry successfully imported in LIMIT Software

02_exemple

Code_aster Solid-Shell geometry successfully imported in LIMIT Software

Python API

from med2limit import MEDToLimitConverter

conv = MEDToLimitConverter(
    med_filename="LIMIT1.rmed",
    linp_filename="out.linp",
    lui_filename="out.lui",
    active_groups=["Shell1", "Shell2"],
    active_nsets=["Weld"],
)
conv.convert()

Package layout

med2limit/
├── element_types.py   # MED↔LIMIT type mapping + helpers (pure)
├── reader.py          # MED file open + field lookup
├── mesh.py            # nodes, elements, GROUP_MA, GROUP_NO
├── fields.py          # DEPL + SIEF over all timesteps
├── orientation.py     # REPLO + CARCOQUE (embedded or separate)
├── filter.py          # active group selection + shell metadata mapping
├── result_mapper.py   # per-timestep stress/displacement mapping
├── writer.py          # .linp + .lui output
├── converter.py       # orchestrator (step_1 .. step_6 + convert)
└── cli.py             # CLI + in-script config

Testing

pytest                      # all tests
pytest tests/test_element_types.py   # one module

Known limitations

  • Quadratic solids (C3D10, C3D15, C3D20) — node ordering not yet validated in LIMIT
  • Shell elsets with mixed thicknesses use the most-frequent value (with warning)

Acknowledgments

Special thanks to Tobias and Nikolaus for their feedback as early adopters and their patience during the iterative development of the converter.

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

med2limit-0.0.2.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

med2limit-0.0.2-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file med2limit-0.0.2.tar.gz.

File metadata

  • Download URL: med2limit-0.0.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for med2limit-0.0.2.tar.gz
Algorithm Hash digest
SHA256 25811400e6fcf2a21f09eb25a67c7c83cabe5b5c99283246211b995d96d3ff82
MD5 e8d211350848acd435ce45466f79c00a
BLAKE2b-256 8def7543aa8e579d5d6da7d9e94b19ade69cd854f594bb2a60a93a904b37f066

See more details on using hashes here.

Provenance

The following attestation bundles were made for med2limit-0.0.2.tar.gz:

Publisher: release.yml on simvia-tech/med2limit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file med2limit-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: med2limit-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for med2limit-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64158f77ac3d3de57a80f6f3483551f558f52358b3c219fa2cfe7a90eba1370b
MD5 31187ebd460ef55bfd606895f4d10c35
BLAKE2b-256 66e5867c48e3711e759a84df2d632d9afe1758a37e9b990db8289ad678e6d8c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for med2limit-0.0.2-py3-none-any.whl:

Publisher: release.yml on simvia-tech/med2limit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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