materforge


Namematerforge JSON
Version 0.5.5 PyPI version JSON
download
home_pageNone
SummaryA high-performance Python library for material simulation and analysis
upload_time2025-07-30 16:16:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords materials thermophysical properties yaml scientific-computing piecewise regression sympy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MaterForge - Materials Formulation Engine with Python

A high-performance Python library for material simulation and analysis. MaterForge enables efficient modeling of pure metals and alloys through YAML configuration files, providing symbolic and numerical property evaluation for various material properties.

[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Latest Release](https://i10git.cs.fau.de/rahil.doshi/materforge/-/badges/release.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/releases)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)
[![Documentation Status](https://readthedocs.org/projects/materforge/badge/?version=latest)](https://materforge.readthedocs.io/en/latest/?badge=latest)
[![Pipeline Status](https://i10git.cs.fau.de/rahil.doshi/materforge/badges/master/pipeline.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/pipelines)
[![Code Coverage](https://i10git.cs.fau.de/rahil.doshi/materforge/badges/master/coverage.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/commits/master)

## Table of Contents
- [Key Features](#-key-features)
- [Installation](#-installation)
- [Quick Sart](#-quick-start)
- [YAML Configuration Format](#-yaml-configuration-format)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [Known Limitations](#-known-limitations)
- [License](#-license)
- [Citation](#-citation)
- [Support](#-support)
- [Acknowledgments](#-acknowledgments)

## πŸš€ Key Features
- **Modular Architecture**: Clean separation with algorithms, parsing, and visualization modules
- **Flexible Material Definition**: Support for both pure metals and alloys
- **YAML-Driven Configuration**: Define materials using intuitive YAML files
- **Temperature-Dependent Properties**: Support for complex temperature-dependent material properties
- **Symbolic Mathematics**: Built on SymPy for precise mathematical expressions
- **Piecewise Functions**: Advanced piecewise function support with regression capabilities
- **Property Inversion**: Create inverse functions for energy density and other properties
- **Visualization**: Automatic plotting of material properties with customizable options
- **Material Types**: Support for both pure metals and alloys with appropriate phase transition temperatures
- **Multiple Property Types**: Support for constants, step functions, file-based data, key-value pairs, and computed properties
- **Regression Analysis**: Built-in piecewise linear fitting with configurable parameters

## πŸ“¦ Installation
### Prerequisites
- Python 3.10 or higher
- Required dependencies: `numpy`, `sympy`, `matplotlib`, `pandas`, `ruamel.yaml`

### Install from Git Repository
```
pip install "git+https://i10git.cs.fau.de/rahil.doshi/materforge.git"
```
### Development Installation
```bash
git clone https://i10git.cs.fau.de/rahil.doshi/materforge.git
cd materforge
pip install -e .[dev]
```

## πŸƒ Quick Start
### Basic Material Creation

```python
import sympy as sp
from materforge.parsing.api import create_material

# Create a material with symbolic temperature
T = sp.Symbol('T')
material_T = create_material('path/to/material.yaml', T)

# Create a material at specific temperature
material_500 = create_material('path/to/material.yaml', 500.0)

# Access properties
print(f"Heat capacity: {material_T.heat_capacity}")
print(f"Density: {material_500.density}")

# Evaluate at specific temperature
temp_value = 1500.0  # Kelvin
density_at_temp = float(material_T.density.subs(T, temp_value))
print(f"Density at {temp_value}K: {density_at_temp:.2f} kg/mΒ³")

# For numerical evaluation (no plots generated)
material_800 = create_material('aluminum.yaml', 800.0)

# For symbolic expressions with automatic plotting
material_with_plot = create_material('steel.yaml', T, enable_plotting=True)
```
### Working with Piecewise Inverse Functions

```python
from materforge.algorithms.piecewise_inverter import PiecewiseInverter

# Create inverse energy density function: T = f_inv(E)
if hasattr(material, 'energy_density'):
    E = sp.Symbol('E')
    inverse_func = PiecewiseInverter.create_energy_density_inverse(material, 'E')

    # Test round-trip accuracy
    test_temp = 500.0
    energy_val = float(material.energy_density.subs(T, test_temp))
    recovered_temp = float(inverse_func.subs(E, energy_val))
    print(f"Round-trip: T={test_temp} -> E={energy_val:.2e} -> T={recovered_temp:.2f}")
```

## πŸ“‹ YAML Configuration Format
### Supported Property Types
- **CONSTANT_VALUE**: Simple numeric values
- **FILE_IMPORT**: Data loaded from CSV/Excel/text files
- **TABULAR_DATA**: Temperature and corresponding property value pairs
- **STEP_FUNCTION**: Discontinuous transitions
- **PIECEWISE_EQUATION**: Symbolic equations over temperature ranges
- **COMPUTED_PROPERTY**: Properties calculated from other properties

See [the YAML schema documentation](docs/reference/yaml_schema.md) for detailed configuration options.
YAML configuration examples can be found here:
- [Pure Metals](src/materforge/data/materials/pure_metals/Al/Al.yaml)
- [Alloys](src/materforge/data/materials/alloys/1.4301/1.4301.yaml)

## πŸ“š Documentation
Our documentation follows the _DiΓ‘taxis_ framework with four distinct types:
### Tutorials - Learning-oriented guides
- [Getting Started with materforge](docs/tutorials/getting_started.md)
- [Creating Your First Material Simulation](docs/tutorials/first_simulation.md)
### How-to Guides - Problem-oriented instructions
- [Defining Custom Material Properties](docs/how-to/define_materials.md)
- [Converting Between Energy Density and Temperature](docs/how-to/energy_temperature_conversion.md)
### Reference - Information-oriented documentation
- [API Reference](docs/reference/api)
- [YAML Configuration Schema](docs/reference/yaml_schema.md)
### Explanation - Understanding-oriented discussions
- [Material Properties Concepts](docs/explanation/material_properties.md)
- [Design Philosophy](docs/explanation/design_philosophy.md)

## 🀝 Contributing
Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.

## πŸ› Known Limitations
- **Piecewise Inverter**: Currently supports only linear piecewise functions
- **File Formats**: Limited to CSV, Excel, and text files
- **Memory Usage**: Large datasets may require optimization for very high-resolution data
- **Regression**: Maximum 8 segments recommended for stability

## πŸ“„ License
This project is licensed under the BSD 3-Clause License. See the [LICENSE](LICENSE) file for details.

## πŸ“– Citation
If you use MaterForge in your research, please cite it using the information in our [CITATION.cff](CITATION.cff) file.

## πŸ“ž Support
- **Author**: Rahil Doshi
- **Email**: rahil.doshi@fau.de
- **Project Homepage**: [materforge](https://i10git.cs.fau.de/rahil.doshi/materforge)
- **Bug Tracker**: [Issues](https://i10git.cs.fau.de/rahil.doshi/materforge/-/issues)

## πŸ™ Acknowledgments
- Built with [SymPy](https://www.sympy.org/) for symbolic mathematics
- Data handling powered by [pandas](https://pandas.pydata.org/)
- Uses [pwlf](https://github.com/cjekel/piecewise_linear_fit_py) for piecewise linear fitting
- Visualization powered by [Matplotlib](https://matplotlib.org/)
- YAML parsing with [ruamel.yaml](https://yaml.dev/doc/ruamel.yaml/)

#### MaterForge - Empowering material simulation with Python πŸš€

---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "materforge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Rahil Doshi <rahil.doshi@fau.de>",
    "keywords": "materials, thermophysical, properties, yaml, scientific-computing, piecewise, regression, sympy",
    "author": null,
    "author_email": "Rahil Doshi <rahil.doshi@fau.de>",
    "download_url": "https://files.pythonhosted.org/packages/14/00/8e5ff03ed26cff605f3051654d88d6af475f4fe389d555b87ec5d9e2eec1/materforge-0.5.5.tar.gz",
    "platform": null,
    "description": "# MaterForge - Materials Formulation Engine with Python\n\nA high-performance Python library for material simulation and analysis. MaterForge enables efficient modeling of pure metals and alloys through YAML configuration files, providing symbolic and numerical property evaluation for various material properties.\n\n[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![Latest Release](https://i10git.cs.fau.de/rahil.doshi/materforge/-/badges/release.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/releases)\n[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)\n[![Documentation Status](https://readthedocs.org/projects/materforge/badge/?version=latest)](https://materforge.readthedocs.io/en/latest/?badge=latest)\n[![Pipeline Status](https://i10git.cs.fau.de/rahil.doshi/materforge/badges/master/pipeline.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/pipelines)\n[![Code Coverage](https://i10git.cs.fau.de/rahil.doshi/materforge/badges/master/coverage.svg)](https://i10git.cs.fau.de/rahil.doshi/materforge/-/commits/master)\n\n## Table of Contents\n- [Key Features](#-key-features)\n- [Installation](#-installation)\n- [Quick Sart](#-quick-start)\n- [YAML Configuration Format](#-yaml-configuration-format)\n- [Documentation](#-documentation)\n- [Contributing](#-contributing)\n- [Known Limitations](#-known-limitations)\n- [License](#-license)\n- [Citation](#-citation)\n- [Support](#-support)\n- [Acknowledgments](#-acknowledgments)\n\n## \ud83d\ude80 Key Features\n- **Modular Architecture**: Clean separation with algorithms, parsing, and visualization modules\n- **Flexible Material Definition**: Support for both pure metals and alloys\n- **YAML-Driven Configuration**: Define materials using intuitive YAML files\n- **Temperature-Dependent Properties**: Support for complex temperature-dependent material properties\n- **Symbolic Mathematics**: Built on SymPy for precise mathematical expressions\n- **Piecewise Functions**: Advanced piecewise function support with regression capabilities\n- **Property Inversion**: Create inverse functions for energy density and other properties\n- **Visualization**: Automatic plotting of material properties with customizable options\n- **Material Types**: Support for both pure metals and alloys with appropriate phase transition temperatures\n- **Multiple Property Types**: Support for constants, step functions, file-based data, key-value pairs, and computed properties\n- **Regression Analysis**: Built-in piecewise linear fitting with configurable parameters\n\n## \ud83d\udce6 Installation\n### Prerequisites\n- Python 3.10 or higher\n- Required dependencies: `numpy`, `sympy`, `matplotlib`, `pandas`, `ruamel.yaml`\n\n### Install from Git Repository\n```\npip install \"git+https://i10git.cs.fau.de/rahil.doshi/materforge.git\"\n```\n### Development Installation\n```bash\ngit clone https://i10git.cs.fau.de/rahil.doshi/materforge.git\ncd materforge\npip install -e .[dev]\n```\n\n## \ud83c\udfc3 Quick Start\n### Basic Material Creation\n\n```python\nimport sympy as sp\nfrom materforge.parsing.api import create_material\n\n# Create a material with symbolic temperature\nT = sp.Symbol('T')\nmaterial_T = create_material('path/to/material.yaml', T)\n\n# Create a material at specific temperature\nmaterial_500 = create_material('path/to/material.yaml', 500.0)\n\n# Access properties\nprint(f\"Heat capacity: {material_T.heat_capacity}\")\nprint(f\"Density: {material_500.density}\")\n\n# Evaluate at specific temperature\ntemp_value = 1500.0  # Kelvin\ndensity_at_temp = float(material_T.density.subs(T, temp_value))\nprint(f\"Density at {temp_value}K: {density_at_temp:.2f} kg/m\u00b3\")\n\n# For numerical evaluation (no plots generated)\nmaterial_800 = create_material('aluminum.yaml', 800.0)\n\n# For symbolic expressions with automatic plotting\nmaterial_with_plot = create_material('steel.yaml', T, enable_plotting=True)\n```\n### Working with Piecewise Inverse Functions\n\n```python\nfrom materforge.algorithms.piecewise_inverter import PiecewiseInverter\n\n# Create inverse energy density function: T = f_inv(E)\nif hasattr(material, 'energy_density'):\n    E = sp.Symbol('E')\n    inverse_func = PiecewiseInverter.create_energy_density_inverse(material, 'E')\n\n    # Test round-trip accuracy\n    test_temp = 500.0\n    energy_val = float(material.energy_density.subs(T, test_temp))\n    recovered_temp = float(inverse_func.subs(E, energy_val))\n    print(f\"Round-trip: T={test_temp} -> E={energy_val:.2e} -> T={recovered_temp:.2f}\")\n```\n\n## \ud83d\udccb YAML Configuration Format\n### Supported Property Types\n- **CONSTANT_VALUE**: Simple numeric values\n- **FILE_IMPORT**: Data loaded from CSV/Excel/text files\n- **TABULAR_DATA**: Temperature and corresponding property value pairs\n- **STEP_FUNCTION**: Discontinuous transitions\n- **PIECEWISE_EQUATION**: Symbolic equations over temperature ranges\n- **COMPUTED_PROPERTY**: Properties calculated from other properties\n\nSee [the YAML schema documentation](docs/reference/yaml_schema.md) for detailed configuration options.\nYAML configuration examples can be found here:\n- [Pure Metals](src/materforge/data/materials/pure_metals/Al/Al.yaml)\n- [Alloys](src/materforge/data/materials/alloys/1.4301/1.4301.yaml)\n\n## \ud83d\udcda Documentation\nOur documentation follows the _Di\u00e1taxis_ framework with four distinct types:\n### Tutorials - Learning-oriented guides\n- [Getting Started with materforge](docs/tutorials/getting_started.md)\n- [Creating Your First Material Simulation](docs/tutorials/first_simulation.md)\n### How-to Guides - Problem-oriented instructions\n- [Defining Custom Material Properties](docs/how-to/define_materials.md)\n- [Converting Between Energy Density and Temperature](docs/how-to/energy_temperature_conversion.md)\n### Reference - Information-oriented documentation\n- [API Reference](docs/reference/api)\n- [YAML Configuration Schema](docs/reference/yaml_schema.md)\n### Explanation - Understanding-oriented discussions\n- [Material Properties Concepts](docs/explanation/material_properties.md)\n- [Design Philosophy](docs/explanation/design_philosophy.md)\n\n## \ud83e\udd1d Contributing\nContributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.\n\n## \ud83d\udc1b Known Limitations\n- **Piecewise Inverter**: Currently supports only linear piecewise functions\n- **File Formats**: Limited to CSV, Excel, and text files\n- **Memory Usage**: Large datasets may require optimization for very high-resolution data\n- **Regression**: Maximum 8 segments recommended for stability\n\n## \ud83d\udcc4 License\nThis project is licensed under the BSD 3-Clause License. See the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udcd6 Citation\nIf you use MaterForge in your research, please cite it using the information in our [CITATION.cff](CITATION.cff) file.\n\n## \ud83d\udcde Support\n- **Author**: Rahil Doshi\n- **Email**: rahil.doshi@fau.de\n- **Project Homepage**: [materforge](https://i10git.cs.fau.de/rahil.doshi/materforge)\n- **Bug Tracker**: [Issues](https://i10git.cs.fau.de/rahil.doshi/materforge/-/issues)\n\n## \ud83d\ude4f Acknowledgments\n- Built with [SymPy](https://www.sympy.org/) for symbolic mathematics\n- Data handling powered by [pandas](https://pandas.pydata.org/)\n- Uses [pwlf](https://github.com/cjekel/piecewise_linear_fit_py) for piecewise linear fitting\n- Visualization powered by [Matplotlib](https://matplotlib.org/)\n- YAML parsing with [ruamel.yaml](https://yaml.dev/doc/ruamel.yaml/)\n\n#### MaterForge - Empowering material simulation with Python \ud83d\ude80\n\n---\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A high-performance Python library for material simulation and analysis",
    "version": "0.5.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/rahildoshi97/materforge/issues",
        "Changelog": "https://github.com/rahildoshi97/materforge/blob/main/CHANGELOG.md",
        "Documentation": "https://materforge.readthedocs.io",
        "GitLab Mirror": "https://i10git.cs.fau.de/rahil.doshi/materforge",
        "Homepage": "https://github.com/rahildoshi97/materforge",
        "Repository": "https://github.com/rahildoshi97/materforge"
    },
    "split_keywords": [
        "materials",
        " thermophysical",
        " properties",
        " yaml",
        " scientific-computing",
        " piecewise",
        " regression",
        " sympy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "49a6982695a0d8f88921a11da4b0a9e9d528eb9e09b286aa43900e3ef69c0ea3",
                "md5": "96fcb37ffd3765404a42c7312efeebef",
                "sha256": "8d8b6f61313735f0e7a894c157ae129b7219750f30c89b2de46a6123ce016b80"
            },
            "downloads": -1,
            "filename": "materforge-0.5.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96fcb37ffd3765404a42c7312efeebef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5672204,
            "upload_time": "2025-07-30T16:16:48",
            "upload_time_iso_8601": "2025-07-30T16:16:48.639690Z",
            "url": "https://files.pythonhosted.org/packages/49/a6/982695a0d8f88921a11da4b0a9e9d528eb9e09b286aa43900e3ef69c0ea3/materforge-0.5.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "14008e5ff03ed26cff605f3051654d88d6af475f4fe389d555b87ec5d9e2eec1",
                "md5": "f17ad265085215b93f189c6d3517a1d3",
                "sha256": "3e604bae34f792fe177a790ad9cb9923eba4ac2d7e582c01cb0d1ad8f44755a0"
            },
            "downloads": -1,
            "filename": "materforge-0.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "f17ad265085215b93f189c6d3517a1d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 14347151,
            "upload_time": "2025-07-30T16:16:51",
            "upload_time_iso_8601": "2025-07-30T16:16:51.010404Z",
            "url": "https://files.pythonhosted.org/packages/14/00/8e5ff03ed26cff605f3051654d88d6af475f4fe389d555b87ec5d9e2eec1/materforge-0.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 16:16:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rahildoshi97",
    "github_project": "materforge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "materforge"
}
        
Elapsed time: 0.50387s