pyoptmat: statistical inference for material models
pyoptmat takes uncertain experimental data and uses it to train a statistical material model that can predict and extrapolate that variability to new loading conditions.
pyoptmat is a Python package for using Bayesian inference to train statistical material constitutive models against experimental data. Material models describe how the material responds to some external stimulus. For example, structural material models describe how the material reacts to mechanical forces. Mathematically, these models are systems of ordinary differential equations. pyoptmat trains stoachastic ordinary differential equations to match the variability in the experimental data.
As an example, consider a collection of tension test data from several samples of a material. Test measurements vary due to manufacturing variability and uncertainty in the experimental controls and measurements. pyoptmat uses the pyro package to find statistical distributions of the model parameters to explain the variation in the experimental data.
The image below shows pyoptmat makes the process of a training a statistical model simple. The trained statistical model captures the variability in the experimental data and then can translate this uncertainty to models of engineering components.
pyoptmat takes uncertain experimental data and uses it to train a statistical material model that can predict and extrapolate that uncertainty.
pyoptmat features
A complete open source solution for training statistical, ODE models against uncertain data.
Efficient backward pass/gradient calculation using the adjoint method. This approach vastly outperforms automatic differentiation for time series data.
Blocked time integration for both the forward and backward/adjoint passes, which vectorizes/parallelizes integrating ODEs through time.
Implicit time integration algorithms suitable for material models represents as stiff systems of ordinary differential equations.
Prebuilt model components aimed at high temperature structural materials.
An abstraction that makes it easy to train both deterministic and statistical models, starting from the same base material model form.
Examples and tests to help you get started.
Getting started
To get started, simply install pyopmat and then review the complete tutorial, which takes you through the process of formatting experimental data, building a model, and training it against the data. If you are interested in the details of how pyopmat efficiently integrates ODEs and constructs the sensitivities using an adjoint method, the ode module documentation outlines that process. The flowrules, hardening, and damage modules are where to find the current set of prebuilt models, focusing on structural materials.
Submodule documentation
The following are links to the complete API descriptions of each pyoptmat submodule.
- pyopmat.optimize: calibrating parameters against data
- pyoptmat.experiments: storing, formatting, and saving experimental data
- pyoptmat.ode: integrating ODEs and getting back gradients
- pyoptmat.chunktime: utilities for blocked time integration
BidiagonalForwardOperatorBidiagonalHybridFactorizationBidiagonalOperatorBidiagonalPCRFactorizationBidiagonalThomasFactorizationChunkTimeOperatorSolverContextLUFactorizationSquareBatchedBlockDiagonalMatrixSquareBatchedBlockDiagonalMatrix.deviceSquareBatchedBlockDiagonalMatrix.dtypeSquareBatchedBlockDiagonalMatrix.nSquareBatchedBlockDiagonalMatrix.nnzSquareBatchedBlockDiagonalMatrix.shapeSquareBatchedBlockDiagonalMatrix.to_batched_coo()SquareBatchedBlockDiagonalMatrix.to_dense()SquareBatchedBlockDiagonalMatrix.to_unrolled_csr()
newton_raphson_chunk()thomas_solve()
- pyoptmat.solvers: integrating structural material models
- pyoptmat.models: structural material models
- pyoptmat.flowrules: inelastic flow rules for structural materials
FlowRuleIsoKinViscoplasticityKocksMeckingRegimeFlowRuleKocksMeckingRegimeFlowRule.dflow_derate()KocksMeckingRegimeFlowRule.dflow_dhist()KocksMeckingRegimeFlowRule.dhist_derate()KocksMeckingRegimeFlowRule.dhist_dstress()KocksMeckingRegimeFlowRule.flow_rate()KocksMeckingRegimeFlowRule.g()KocksMeckingRegimeFlowRule.history_rate()KocksMeckingRegimeFlowRule.nhistKocksMeckingRegimeFlowRule.switch_values()
PerfectViscoplasticityRateIndependentFlowRuleWrapperRateIndependentFlowRuleWrapper.dflow_derate()RateIndependentFlowRuleWrapper.dflow_dhist()RateIndependentFlowRuleWrapper.dhist_derate()RateIndependentFlowRuleWrapper.dhist_dstress()RateIndependentFlowRuleWrapper.dscale()RateIndependentFlowRuleWrapper.flow_rate()RateIndependentFlowRuleWrapper.history_rate()RateIndependentFlowRuleWrapper.nhistRateIndependentFlowRuleWrapper.scale()
SoftKocksMeckingRegimeFlowRuleSoftKocksMeckingRegimeFlowRule.blend_values()SoftKocksMeckingRegimeFlowRule.df_e()SoftKocksMeckingRegimeFlowRule.dflow_derate()SoftKocksMeckingRegimeFlowRule.dflow_dhist()SoftKocksMeckingRegimeFlowRule.dg_e()SoftKocksMeckingRegimeFlowRule.dhist_derate()SoftKocksMeckingRegimeFlowRule.dhist_dstress()SoftKocksMeckingRegimeFlowRule.f()SoftKocksMeckingRegimeFlowRule.flow_rate()SoftKocksMeckingRegimeFlowRule.g()SoftKocksMeckingRegimeFlowRule.history_rate()SoftKocksMeckingRegimeFlowRule.nhist
SuperimposedFlowRule
- pyoptmat.hardening: inelastic flow hardening models for structural materials
ChabocheHardeningModelChabocheHardeningModelRecoveryChabocheHardeningModelRecovery.dhistory_rate_derate()ChabocheHardeningModelRecovery.dhistory_rate_dhistory()ChabocheHardeningModelRecovery.dhistory_rate_dstress()ChabocheHardeningModelRecovery.dvalue()ChabocheHardeningModelRecovery.history_rate()ChabocheHardeningModelRecovery.nhistChabocheHardeningModelRecovery.value()
FAKinematicHardeningModelFAKinematicHardeningModelNoRecoveryFAKinematicHardeningModelNoRecovery.dhistory_rate_derate()FAKinematicHardeningModelNoRecovery.dhistory_rate_dhistory()FAKinematicHardeningModelNoRecovery.dhistory_rate_dstress()FAKinematicHardeningModelNoRecovery.dvalue()FAKinematicHardeningModelNoRecovery.history_rate()FAKinematicHardeningModelNoRecovery.nhistFAKinematicHardeningModelNoRecovery.value()
HardeningModelIsotropicHardeningModelKinematicHardeningModelNoKinematicHardeningModelSuperimposedKinematicHardeningSuperimposedKinematicHardening.dhistory_rate_derate()SuperimposedKinematicHardening.dhistory_rate_dhistory()SuperimposedKinematicHardening.dhistory_rate_dstress()SuperimposedKinematicHardening.dhistory_rate_dtotalrate()SuperimposedKinematicHardening.dvalue()SuperimposedKinematicHardening.history_rate()SuperimposedKinematicHardening.nhistSuperimposedKinematicHardening.value()
Theta0RecoveryVoceIsotropicHardeningModelTheta0RecoveryVoceIsotropicHardeningModel.dhistory_rate_derate()Theta0RecoveryVoceIsotropicHardeningModel.dhistory_rate_dhistory()Theta0RecoveryVoceIsotropicHardeningModel.dhistory_rate_dstress()Theta0RecoveryVoceIsotropicHardeningModel.dvalue()Theta0RecoveryVoceIsotropicHardeningModel.history_rate()Theta0RecoveryVoceIsotropicHardeningModel.nhistTheta0RecoveryVoceIsotropicHardeningModel.value()
Theta0VoceIsotropicHardeningModelTheta0VoceIsotropicHardeningModel.dhistory_rate_derate()Theta0VoceIsotropicHardeningModel.dhistory_rate_dhistory()Theta0VoceIsotropicHardeningModel.dhistory_rate_dstress()Theta0VoceIsotropicHardeningModel.dvalue()Theta0VoceIsotropicHardeningModel.history_rate()Theta0VoceIsotropicHardeningModel.nhistTheta0VoceIsotropicHardeningModel.value()
VoceIsotropicHardeningModelVoceIsotropicHardeningModel.dhistory_rate_derate()VoceIsotropicHardeningModel.dhistory_rate_dhistory()VoceIsotropicHardeningModel.dhistory_rate_dstress()VoceIsotropicHardeningModel.dvalue()VoceIsotropicHardeningModel.history_rate()VoceIsotropicHardeningModel.nhistVoceIsotropicHardeningModel.value()
- pyoptmat.damage: damage models for structural materials
- pyoptmat.temperature: dealing with temperature dependence
- pyoptmat.utility: useful miscellaneous mathematical functions
ArbitraryBatchTimeSeriesInterpolatorBatchTimeSeriesInterpolatorCheaterBatchTimeSeriesInterpolatoradd_id()batch_differentiate()compose()differentiate()heaviside()jacobianize()macaulay()mbmm()new_differentiate()timeseries_interpolate_batch_times()timeseries_interpolate_single_times()visualize_variance()