Skip to main content

Stress-strain prediction with porosity-aware models (Interpolation, LightGBM, Meta_learning)

Project description

poromat

A Python package for modeling stress–strain behavior of porous titanium alloys under various strain rates and temperatures, based on extremely limited experimental data.

Project Summary

This project constructs global stress–strain prediction models for porous Ti alloys using only 38 sets of uniaxial compression tests. Guided by the Zener–Arrhenius (ZA) constitutive framework, I implement three regression approaches and evaluate them using a Leave-One-Porosity-Out (LOPO) framework. Generalization performance is statistically compared via Friedman and Nemenyi tests. Meta-learning shows advantages on unseen porosity conditions.

Dataset Structure

Porosity 26%

├── 25°C:  [1200, 2300, 3600, 5200]  
├── 100°C: [950, 2200, 3000, 4200]  
├── 200°C: [1050, 1500, 1950, 2800, 3800]  
└── 300°C: [1100, 1900, 2900, 3700]  

Porosity 36%

├── 25°C:  [1000, 2000, 3000]  
├── 100°C: [1300, 2050, 2350, 3400, 3700]  
└── 300°C: [1000, 2000, 3000, 4000, 4500]  

Data Source:

Liu, Z., Ji, F., Wang, M., & Zhu, T. (2017).
One-Dimensional Constitutive Model for Porous Titanium Alloy at Various Strain Rates and Temperatures. Metals, 7(1), 24.
https://doi.org/10.3390/met7010024

Regression Methods

  1. Adaboost + Decision Tree (Smoothed)
    Custom interpolator with smoothing, performing interpolation across strain rate, temperature, and porosity dimensions.

  2. LightGBM
    Gradient boosting regression on standardized features, trained directly on the limited dataset.

  3. Meta-learning (MAML)
    Two hidden layers (see code) trained using learn2learn for fast adaptation to new porosity conditions.
    Supports credible intervals via MC Dropout.

Installation and Model File Setup

Environment Setup: This project requires Python 3.10.

pip install poromat

The following .pkl files are required to run predictions and are not included in the PyPI package.

You can download them using:

import poromat
poromat.download_all_models()

Quick Start

import poromat
poromat.download_all_models() # You need to download the models

poromat.plot(16, 300, 3300, step=0.002, method="meta")

poromat.save_csv(16, 300, 3000, step=0.002, method="meta")

strain, stress, stress_lower, stress_upper = poromat.generate_prediction(
    model_name="meta",
    porosity=16,
    T=300,
    rate=3000,
    show_plot=True
)

Key Functions

Function Description
poromat.plot() Plot stress–strain curve, with optional uncertainty (only for "meta" model)
poromat.save_csv() Save predicted strain and stress values to CSV file
generate_prediction() Predict stress–strain curve using one of the regression models (meta, lightgbm, or interpolation)

Purpose

Designed for materials scientists studying porous titanium alloys.
This tool enables fast and flexible access to mechanical response predictions under varying testing conditions, helping reduce the need for costly and time-consuming mechanical experiments.


Developer

Yun Zhou (Robbie)
Background in Mechanical Engineering and Applied Data Science.
Email: robbiezhou1@gmail.com GitHub: @Green-zy

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

poromat-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

poromat-0.1.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file poromat-0.1.1.tar.gz.

File metadata

  • Download URL: poromat-0.1.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for poromat-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3b520cd9e6dd8837a4123cc9c7382a64c581cd013ef47e184f281af5f01dbee8
MD5 a8fb8e781573877ae61e74adc62e0c8b
BLAKE2b-256 3e27ed8a4395a203e4b6a1641a50768745f63f16ce051ce383e0fb2ba16a9be2

See more details on using hashes here.

File details

Details for the file poromat-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: poromat-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for poromat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54c59f83d1658d143cd4c8a9fdb8d62d27a1d5f0fccd65ee2937a3666ddad061
MD5 bba4ed1f1300d9344eb1ed3d61361984
BLAKE2b-256 aac9b6ab558677801e6637ed6d60c69e9457693a1137ba0ff65c126df0bdf1f6

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