Skip to content

Commit

Permalink
Add test for transverse_isotropic
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianDepriester committed Dec 20, 2024
1 parent 06d5008 commit 62ee059
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_StiffnessTensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,21 @@ def test_orthotropic(self):
assert nu.eval([0, 0, 1], [0, 1, 0]) == approx(nu_zy)
assert nu.eval([0, 0, 1], [1, 0, 0]) == approx(nu_zx)

def test_transverse_isotropic(self):
Ex, Ez = 100., 200.
nu_yx, nu_zx = 0.2, 0.3
Gxz = 80
C = StiffnessTensor.transverse_isotropic(Ex=Ex, Ez=Ez, nu_yx=nu_yx, nu_zx=nu_zx, Gxz=Gxz)
E = C.Young_modulus
assert E.eval([1,0,0]) == approx(Ex)
assert E.eval([0,1,0]) == approx(Ex)
assert E.eval([0,0,1]) == approx(Ez)
G = C.shear_modulus
assert G.eval([1, 0, 0], [0, 0, 1]) == approx(Gxz)
nu = C.Poisson_ratio
assert nu.eval([0,1,0], [1,0,0]) == approx(nu_yx)
assert nu.eval([0, 0, 1], [0, 1, 0]) == approx(nu_zx)
assert nu.eval([0, 0, 1], [1, 0, 0]) == approx(nu_zx)

if __name__ == '__main__':
unittest.main()

0 comments on commit 62ee059

Please sign in to comment.