The Voigt notation of strain and elastic modulus

The qha-cij package provide the qha.cij.voigt module to facilitate converison between standard (\(c_{ijkl}\), \(e_{ij}\), where \(i,j,k,l=1,2,3\)) and Voigt notation (\(c_{ij}\), \(e_{i}\), where \(i,j,k,l=1,...,6\)) of symmetric metric tensor. With the help of this module, users could easily use both types of notations to work with strains and modulus.

The class cij.util.voigt.ModulusRepresentation (or C_) and cij.util.voigt.StrainRepresentation (or S_) are used to represent strain and modulus keys. But to create these values, user should use the lowercase c_ and s_ from cij.util.

[1]:
from cij.util import c_, e_

print(type(c_(11)))
print(type(e_(1)))
<class 'cij.util.voigt.ModulusRepresentation'>
<class 'cij.util.voigt.StrainRepresentation'>

The c_ and s_ allow different types of input, including standard and Voigt notations, as str and int. And best yet, they can be used to do compairson, to check whether they represent same value.

[2]:
print(c_(23))
print(c_('23'))
print(c_(2233))
print(c_('2233'))

print(c_(56))
print(c_(1323))
print(c_('2323'))

print(c_(11) == c_('1111'))
print(e_('1') == e_('11'))
print(e_('23') == e_(6))
print(c_('66') == c_(3223))
23(2233)
23(2233)
23(2233)
23(2233)
56(1312)
45(2313)
44(2323)
True
True
False
False

By accessing the .voigt (or .v) and .standard (or .s) property, one could retrive the Voigt and standard notations in the tuple format.

[3]:
print(c_(55).v)
print(c_(55).s)
print(c_(55).voigt)
print(c_(55).standard)
(5, 5)
(1, 3, 1, 3)
(5, 5)
(1, 3, 1, 3)

One could also create elastic modulus key from its two repective strains

[4]:
from cij.util import C_

print(c_(46) == C_.from_standard(*e_(4), *e_(6)))
print(c_(46) == C_.from_voigt(e_(4).v, e_(6).v))
True
True

For elastic modulus, we also provide .is_longitudinal, .is_off_diagonal, and .is_shear to check what type of modulus it is.

[5]:
print(c_(11).is_shear)
print(c_(55).is_shear)
print(c_(55).is_longitudinal)
False
True
False

The .mulitplicity property checks the multiplicity of \(c_ij\)

[6]:
print(c_(11).multiplicity)
print(c_(55).multiplicity)
print(c_(46).multiplicity)
1
4
8