Skip to main content

A Harmonic Balance code for mechanical vibration systems with nonlinearities.

Project description

pyHarm presentation

pyHarm is an Harmonic Balance Method (HBM) based solver for mechanical nonlinear system simulations distributed under Apache 2.0 license (see LICENSE file for more detail about the license). The code is built as a python package and aims at performing a wide range of studies in the field of nonlinear dynamic simulations. Its main feature is Forced Response Frequency analysis using an harmonic balance solver enhanced with continuation methods.

The philosophy behind the code is to treat the mechanical system as an assembly of elementary elements/connectors such that their contribution to the residual and jacobian can be evaluated independantly.

The code is extensively using the factory design pattern in the subpackages to introduce abstract and flexibility when developing new components.

Documentation is available on readthedocs :

Basic Installation

pyHarm is provided as a complete Python package. To install the package, use the pip Python package installer with the following command:

pip install pyHarm-os

We strongly recommend using the package within a virtual environment dedicated to the library. A pyharm_env.yml file is available in the directory, enabling you to easily build a conda environment with the following command:

conda env create --name YOUR_ENV_NAME -f pyharm_env.yml

where YOUR_ENV_NAME is your chosen name for the environment. Otherwise, the default name pyHarm_env will be used and can be accessed via:

conda activate YOUR_ENV_NAME

Once your clean environment is ready and active, just install pyHarm using pip install pyHarm-os

For more details about the installation process, please refer to the dedicated section of the documentation.

Project content description

The repository comprises three folders. The core files of the pyHarm code are contained in the src folder. The Tutorials folder contains a set of Tutorials to learn how to use pyHarm in the form of Jupyter Notebooks. Finally, the tests folder contains a set of pytest tests divided into two sections :

  • unitests : contains small tests that check specific parts of the source code
  • nonregression : contains complete analysis of use cases

To run the tests, use the following command with your pyHarm environment activated, replacing NAME_TEST_CAT with one of the aforementioned categories:

pytest -m NAME_TEST_CAT
$TEST_SET$ Description
all run all the tests contained in test folder
unit run only the unit tests that check specific parts of the source code
nonregression run only the nonregression tests that contain complete analysis of use cases

NB: When installing the pyHarm package, the tests as well as the Tutorials do not get installed alongside.

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

pyharm_os-1.1.1.tar.gz (83.4 kB view details)

Uploaded Source

Built Distribution

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

pyharm_os-1.1.1-py3-none-any.whl (183.6 kB view details)

Uploaded Python 3

File details

Details for the file pyharm_os-1.1.1.tar.gz.

File metadata

  • Download URL: pyharm_os-1.1.1.tar.gz
  • Upload date:
  • Size: 83.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/5.15.154+

File hashes

Hashes for pyharm_os-1.1.1.tar.gz
Algorithm Hash digest
SHA256 390d1c8cb1b6d1d06f80feaaa0fa8a984b3ff8c8bd38a2f31d6618a129a53c43
MD5 49a72c7f60716aee72d3f7307d5866e5
BLAKE2b-256 ec2ed3f5c044a9bf61865a4c335f37aa04dd511b6c09bab039fdb8b446c41e52

See more details on using hashes here.

File details

Details for the file pyharm_os-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyharm_os-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 183.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/5.15.154+

File hashes

Hashes for pyharm_os-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8893f4f70d84b5620b89ab2b07fa501661cbeafd2183e09ab8da57af75a9aabe
MD5 81457198e981ac3f72501505663e2586
BLAKE2b-256 fff1fc26fabd97e7e927d61437ebd31dc66fe0a01c42fad195add9849a2ef8c0

See more details on using hashes here.

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