-
Notifications
You must be signed in to change notification settings - Fork 21
Constitutive Models
Hyperelastic material models often rely upon the strain energy density function W formulated in terms of strain invariants. Under the assumption of an isotropic incompressible behavior of the material under uniaxial loading, the principal Cauchy stress constitutive models as a function of invariants yields:
where, the Cauchy-Green invariants I1 and I2, are in this particular case a function of the stretch lambda:
import numpy as np
class Hyperelastic:
def __init__(self, model, parameters, order, data_type):
self.model = model
self.order = order
self.parameters = parameters
self.param_names = []
self.data_type = data_type
if model == 'Ogden':
initialGuessMu = np.array([0.1]*self.order)
initialGuessAlpha = np.array([0.2]*self.order)
self.initialGuessParam = np.append(initialGuessMu,initialGuessAlpha)
self.nbparam = self.order*2
muVec_names = ["µ1","µ2","µ3"][0:self.order]
alphaVec_names = ["α1","α2","α3"][0:self.order]
self.param_names = np.append(muVec_names,alphaVec_names)
def OgdenModel(self, parameters, Strain):
"""Ogden hyperelastic model (incompressible material under uniaxial tension)
Uses true strain and true stress data"""
# parameter is a 1D array : [mu0,mu1,...,mun,alpha0,alpha1,...,alphan]
muVec = parameters.reshape(2, self.order)[0] # muVec is a 1D array : [mu0,mu1,...,mun]
alphaVec = parameters.reshape(2, self.order)[1] # muVec is a 1D array : [alpha0,alpha1,...,alphan]
if self.data_type == 'True':
lambd = np.exp(Strain) # lambd i.e lambda
elif self.data_type == 'Engineering':
lambd = 1 + Strain
else:
print("Data type error. Data is neither 'True' or 'Engineering'. ")
# broadcasting method to speed up computation
lambd = lambd[np.newaxis, :]
muVec = muVec[:self.order, np.newaxis]
alphaVec = alphaVec[:self.order, np.newaxis]
if self.data_type == 'True':
Stress = np.sum(2*muVec*(lambd**(alphaVec - 1) - lambd**(-((1/2)*alphaVec + 1))), axis=0)
elif self.data_type == 'Engineering':
Stress = np.sum((2*muVec*(lambd**(alphaVec - 1) - lambd**(-((1/2)*alphaVec + 1)))/lambd), axis=0)
return Stressimport numpy as np
import matplotlib as plt
# Hyperelastic object
hyperelastic = Hyperelastic('Ogden', np.array([0]), 3, 'True')
model_param = np.array([ 0.35401376, -0.1295043, -0.2269272, 3.31652768, 3.27872196, 3.27875269]) # [mu1,mu2,mu3,alpha1,alpha2,alpha3]
trueStrain = linspace(0, 1.5, 50)
trueStress = hyperelastic.ConsitutiveModel(model_param, trueStrain)
plt.plot(trueStrain, trueStress, 'r')
plt.xlabel('True Strain')
plt.ylabel('True Stress (MPa)')
plt.grid('on')
plt.show() Martins PALS, Natal Jorge RM, Ferreira AJM. A Comparative Study of Several Material Models for Prediction of Hyperelastic Properties: Application to Silicone-Rubber and Soft Tissues. Strain. 2006;42(3):135–147.
Rackl M. Material testing and hyperelastic material model curve fitting for Ogden, Polynomial and Yeoh models. In: ScilabTEC (7th International Scilab Users Confer ence). Paris; 2015.
Ogden RW, Saccomandi G, Sgura I. Fitting hyperelastic models to experimental data. Computational Mechanics. 2004 nov;34(6):484–502.
Bergström J. Elasticity/Hyperelasticity. In: Mechanics of Solid Polymers: Theory and Computational Modeling. William Andrew Publishing; 2015. p.209–307.