Closed qzhu2017 closed 5 months ago
@jochym
I think there maybe something wrong with your code for the tetragonal systems.
def tetragonal(u): ''' Equation matrix generation for the tetragonal lattice. The order of constants is as follows: .. math:: C_{11}, C_{33}, C_{12}, C_{13}, C_{44}, C_{66} :param u: vector of deformations: [ :math:`u_{xx}, u_{yy}, u_{zz}, u_{yz}, u_{xz}, u_{xy}` ] :returns: Symmetry defined stress-strain equation matrix ''' uxx, uyy, uzz, uyz, uxz, uxy = u[0], u[1], u[2], u[3], u[4], u[5] return array( [[uxx, 0, uyy, uzz, 0, 0], [uyy, 0, uxx, uzz, 0, 0], [0, uzz, 0, uxx+uyy, 0, 0], [0, 0, 0, 0, 2*uyz, 0], [0, 0, 0, 0, 2*uxz, 0], [0, 0, 0, 0, 0, 2*uxy]])
Also, https://github.com/jochym/Elastic/blob/8daae37d0c48aab8dfb1de2839dab02314817f95/elastic/elastic.py#L297 The last independent elastic constant should be C_66 not C_14.
4: ('C_11', 'C_33', 'C_12', 'C_13', 'C_44', 'C_66'), #error in the original code
Could you please check if my fix is correct?
Thanks,
You are right. The correct last component is indeed C66. Thanks @qzhu2017
Fixed in https://github.com/jochym/Elastic/commit/ec9cd7088ba13979d2ba032b42f238dbd9fa3931 and published in v5.2.1.
@jochym
I think there maybe something wrong with your code for the tetragonal systems.
Also, https://github.com/jochym/Elastic/blob/8daae37d0c48aab8dfb1de2839dab02314817f95/elastic/elastic.py#L297 The last independent elastic constant should be C_66 not C_14.
Could you please check if my fix is correct?
Thanks,