Metadata-Version: 2.3
Name: pyHarm-os
Version: 1.1.2
Summary: A Harmonic Balance code for mechanical vibration systems with nonlinearities.
License: Apache-2.0
Author: Owner pyHarm
Author-email: pyharm.fr.saf@safrangroup.com
Requires-Python: >=3.11
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click (>=8.1.8,<9.0.0)
Requires-Dist: h5py (>=3.13.0,<4.0.0)
Requires-Dist: jax (>=0.5.1,<0.6.0)
Requires-Dist: matplotlib (>=3.10.1,<4.0.0)
Requires-Dist: nbformat (>=5.10.4,<6.0.0)
Requires-Dist: notebook (>=7.3.2,<8.0.0)
Requires-Dist: numba (>=0.61.0,<0.62.0)
Requires-Dist: numpy (<2.2)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
Requires-Dist: scipy (>=1.15.2,<2.0.0)
Project-URL: Repository, https://gitlab.com/drti/pyharm
Description-Content-Type: text/markdown

# 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 : 
- [https://pyharm-saf.readthedocs.io/en/latest/](https://pyharm-saf.readthedocs.io/en/latest/)

## 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.*
