Skip to main content

Physically Recurrent Neural Networks

Project description

Physically Recurrent Neural Networks

Intact constitutive models embedded in an encoder-decoder MLP architecture.

If you have accurate material models at the microscale and would like to perform computational homogenization, those same models can be directly embedded into a hybrid architecture to make macroscale predictions.

Because the models in the architecture are the exact same as in the micromodel, a number of features can be directly inherited and therefore not learned from data:

  • Path dependency (loading/unloading/reloading) without training for it
  • Strain rate dependency while training with only a single rate
  • Consistent step size dependence (independent for inviscid models; correct dependence for viscous models)
  • Between $10\times$ and $100\times$ less training data than RNNs for comparable performance

Journal papers and preprints

In this package

The code in this package contains a standalone demonstration of PRNNs for a 2D micromodel with $J_2$ elastoplasticity (matrix) and linear elasticity (fibers):

  • J2Tensor_vect.py: a simple $J_2$ plasticity model in plane stress. This code comes directly from an FE package, demonstrating how PRNNs can embed existing material models with little to no changes in code;
  • prnn.py: A PyTorch network class that implements the PRNN, with single-layer encoder and decoder;
  • rnn.py: Implements GRU and LSTM networks with variational Gaussian dropout. For comparing predictions and learning performance with PRNNs;
  • utils.py: Implements a custom dataset class for handling stress and strain paths, and a class for training and evaluating networks, with the ability of saving and loading checkpoints;

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

pyprnn-0.0.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

pyprnn-0.0.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyprnn-0.0.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for pyprnn-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5f6fa6874e1931bd1cee66f602261787ba72e1948c5a031d4a5f6e8819e59a8d
MD5 d14b83a75c0107ec9a2783c5334d520c
BLAKE2b-256 9af342a62b83fbe75bf991a84ddef073dbd656fa90bf48b32664c68a263eabbe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyprnn-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for pyprnn-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4576a21c5d6b4b450a66cf3873c64fff9656300551bfaa0eda8f2bb5a8f15e41
MD5 da51f938615fcdcd69d2c26bba91465b
BLAKE2b-256 7c6b60f00d4a6a41e390f167bf954782bcb777c203d1dc10014a7c2f5a9198a5

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