complement of 3897: add isotropic and anisotropic Barlat 1991 to the dictionary

This commit is contained in:
Haiming Zhang 2015-02-03 12:57:18 +00:00
parent bef846d294
commit 3845c47e61
1 changed files with 27 additions and 14 deletions

View File

@ -192,10 +192,10 @@ def Barlat1994(sigmas, sigma0, a):
fittingCriteria = { fittingCriteria = {
'Tresca': {'fit' :np.ones(1,'d'),'err':np.inf, 'Tresca' :{'fit' :np.ones(1,'d'),'err':np.inf,
'name' :'Tresca', 'name' :'Tresca',
'paras':'Initial yield stress:'}, 'paras':'Initial yield stress:'},
'vonMises':{'fit' :np.ones(1,'d'),'err':np.inf, 'vonMises' :{'fit' :np.ones(1,'d'),'err':np.inf,
'name' :'Huber-Mises-Hencky(von Mises)', 'name' :'Huber-Mises-Hencky(von Mises)',
'paras':'Initial yield stress:'}, 'paras':'Initial yield stress:'},
'Hill48' :{'fit' :np.ones(6,'d'),'err':np.inf, 'Hill48' :{'fit' :np.ones(6,'d'),'err':np.inf,
@ -204,10 +204,17 @@ fittingCriteria = {
'Drucker' :{'fit' :np.ones(2,'d'),'err':np.inf, 'Drucker' :{'fit' :np.ones(2,'d'),'err':np.inf,
'name' :'Drucker', 'name' :'Drucker',
'paras':'Initial yield stress, C_D:'}, 'paras':'Initial yield stress, C_D:'},
'Barlat1991iso' :{'fit' :np.ones(2,'d'),'err':np.inf,
'name' :'Barlat1991iso',
'paras':'Initial yield stress, m:'},
'Barlat1991aniso':{'fit' :np.ones(8,'d'),'err':np.inf,
'name' :'Barlat1991aniso',
'paras':'Initial yield stress, m, a, b, c, f, g, h:'},
'worst' :{'err':np.inf}, 'worst' :{'err':np.inf},
'best' :{'err':np.inf} 'best' :{'err':np.inf}
} }
thresholdParameter = ['totalshear','equivalentStrain'] thresholdParameter = ['totalshear','equivalentStrain']
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
@ -276,7 +283,13 @@ class Criterion(object):
elif self.name.lower() == 'hill48': elif self.name.lower() == 'hill48':
funResidum = Hill1948 funResidum = Hill1948
text = '\nCoefficient of Hill1948 criterion:\n[F, G, H, L, M, N]:\n'+formatOutput(6) text = '\nCoefficient of Hill1948 criterion:\n[F, G, H, L, M, N]:\n'+formatOutput(6)
elif self.name.lower() == 'barlat91iso':
funResidum = Barlat1991iso
text = '\nCoefficient of isotropic Barlat 1991 criterion:\nsigma0, m:\n'+formatOutput(2)
elif self.name.lower() == 'barlat91aniso':
funResidum = Barlat1991iso
text = '\nCoefficient of anisotropic Barlat 1991 criterion:\nsigma0, \m, a, b, c, f, g, h:\n' \
+formatOutput(8)
if fitResults == []: if fitResults == []:
initialguess = fittingCriteria[funResidum.__name__]['fit'] initialguess = fittingCriteria[funResidum.__name__]['fit']
else: else: