doc:user:elements:volumes:isohard
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:user:elements:volumes:isohard [2018/06/19 10:46] – [LinearIsotropicHardening] cerquaglia | doc:user:elements:volumes:isohard [2020/07/08 10:16] (current) – [Python] papeleux | ||
---|---|---|---|
Line 250: | Line 250: | ||
|Θ0 | |Θ0 | ||
|ΘIV | '' | |ΘIV | '' | ||
+ | |||
+ | ===== Python ===== | ||
+ | |||
+ | User defined Isotropic Hardening by a pythonDirector : | ||
+ | |||
+ | Python Director allows user to define their own Isotropic Hardening law. Five functions has to be defined in the Python Class : | ||
+ | * a constructor (< | ||
+ | * a destructor (< | ||
+ | * computeSvm | ||
+ | * computeH (epl, pLaw) | ||
+ | * computePotential (epl, pLaw) for hyperElastics models | ||
+ | See the example below of a Linear Isotropic Hardening : | ||
+ | < | ||
+ | |||
+ | class MyIsoH(PythonIsotropicHardening): | ||
+ | def __init__(self, | ||
+ | print(" | ||
+ | PythonIsotropicHardening.__init__(self, | ||
+ | self.svm0 = _svm0 | ||
+ | self.h | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | print(" | ||
+ | def __del__(self): | ||
+ | print(" | ||
+ | print(" | ||
+ | input('' | ||
+ | exit(1) | ||
+ | def computeSvm(self, | ||
+ | #print " | ||
+ | return self.svm0+epl*self.h | ||
+ | def computeH(self, | ||
+ | #print " | ||
+ | return self.h | ||
+ | def computePotential(self, | ||
+ | #print " | ||
+ | return (self.svm0+self.h*epl*0.5)*epl | ||
+ | </ | ||
doc/user/elements/volumes/isohard.1529397977.txt.gz · Last modified: 2018/06/19 10:46 by cerquaglia