Skip to content

Commit 0c3d712

Browse files
committed
Add unit test for EOS4 / MOP(19) = 2
1 parent 07551ac commit 0c3d712

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_t2data.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,17 @@ def initial_test():
10511051
self.assertEqual(j['initial']['region'], 4)
10521052
json.dumps(j)
10531053

1054+
# EOS4 test with MOP(19) = 2 (EOS3-style init)
1055+
dat.multi['eos'] = 'EWAV'
1056+
P, X, T, Pa = 8.e5, 1e-6, 120., 6220.9968260563
1057+
incons = [P, X, T]
1058+
dat.parameter['option'][19] = 2
1059+
j = dat.initial_json(geo, incons, eos, convert_primary_eos_3)
1060+
self.assertTrue(np.allclose(np.array(j['initial']['primary']),
1061+
np.array([P, T, Pa]), rtol = 1e-9))
1062+
self.assertEqual(j['initial']['region'], 1)
1063+
json.dumps(j)
1064+
10541065
def generators_test():
10551066

10561067
dat.parameter['option'][12] = 0

0 commit comments

Comments
 (0)