From 7ff92652aaeca36e67eaa49b98c7553aa2cd657d Mon Sep 17 00:00:00 2001 From: shjNT <88530238+shjNT@users.noreply.github.com> Date: Mon, 11 Jul 2022 15:39:33 +0800 Subject: [PATCH] cylinder3d steady case (#114) * cylinder3d steady case * cylinder3d unsteady case * cylinder3d unsteady case fix * cylinder3d unsteady case fix * cylinder3d unsteady case fix --- .../standard/cylinder3d_steady.npz | Bin 0 -> 886 bytes .../standard/cylinder3d_unsteady.npz | Bin 0 -> 1270 bytes tests/test_models/test_cylinder3d_steady.py | 27 ++++++++++----- tests/test_models/test_cylinder3d_unsteady.py | 31 ++++++++++++++---- 4 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 tests/test_models/standard/cylinder3d_steady.npz create mode 100644 tests/test_models/standard/cylinder3d_unsteady.npz diff --git a/tests/test_models/standard/cylinder3d_steady.npz b/tests/test_models/standard/cylinder3d_steady.npz new file mode 100644 index 0000000000000000000000000000000000000000..a13d21f290d02edc6d55bcc99bf8417e52b8c371 GIT binary patch literal 886 zcmWIWW@Zs#fB;1X>+?DJ3xFID7GMxzNU6+=FV4>?Ey>K!)5|NUWCV(W z>=)`A5Xs0;#!#)El3JWxq;934Zj)xAuA`uymS0p-l$aNvUzCyx5_e0?DNY577iT0E zqyqUGCOVor3bhIp0ItVNXCGOxZ;z?GFUeyQKr|#%06xDGk`pN&&{Bp~I02Ci? zmwcN9aybZtd{|tPJm`IRuH(`@kPkQMD30^^X8NrV|!It4~06f`h` z80e`MT{mhPfazsmXkdH<&(y(026D4)A7W1F2yK!d*am854*H06#p+ A#Q*>R literal 0 HcmV?d00001 diff --git a/tests/test_models/standard/cylinder3d_unsteady.npz b/tests/test_models/standard/cylinder3d_unsteady.npz new file mode 100644 index 0000000000000000000000000000000000000000..5330a669d677a57ba2a5390c5bce30534127e9bb GIT binary patch literal 1270 zcmWIWW@Zs#fB;1XzQ_Uz1x5x25Eft%VMwXWi!aX4DJ{v&&(q5*sAL3+g5*E|Mo;z& z^$mz*WGG{(R!>PSPA*cnQc$-^vryMjP*2M*Dk)0Li_b4gNd<|!CFT^T0>z6n5(`p+ zd<|0_1rtpjg<1u&0hi^@`wKG!Ivh5%JJ`>a`C^|CZT~mjSN=e#LZ;d|0Zs?UE42(k z5;+cuCfc{#_k6J5B%!UaI7`?e=J)agd8slEyP9vzbUK>vAb;(^Z-3@*_H9p69))cb zIS@Lx%9CUF&;8yjTFnK_|Jw(Cc01nEINQGd?bltEy6O9Q@@6{kdbeVK^1CP}Ig4cu zvufoQ+dP&ykeFImKV_A|0ojhS`1?6Z2Lez+ICA5(*`SaEVNeJcmn09F5LW34wOkAg z;YXIy4jI4@)|%>VcM%xE%QsIx7zhmE{C6R#Ex-`I@KUZ06vFnql$>&bA$;cD$-|%! zwr;;ZD+n0Eiq~!afO=A?*8OY27`H5H`}5S4Ixul;V;>AHwl*4Yeg!9S+a(<}Nt7^|8G% zqZ9+Hl)`~eK60#ft~?GKLYt00bjxu#=;gmCf6rTc~x-+@bEX$bmHPFxMTNpZDA9vHstd^xxi1Mcev{;%xiEilRkJ z>kIc^Y4CQDR$sNBXY$IXi80F@Hj3oU>tC*L;7Cm+ next time current_interior = np.array(next_uvwp[0])[:, 0:3] current_user = np.array(next_uvwp[-1])[:, 0:3] + return np.mean(rslt, axis=0) + + +standard = np.load("./standard/cylinder3d_unsteady.npz", allow_pickle=True) @pytest.mark.cylinder3d_unsteady @@ -159,8 +166,16 @@ def test_cylinder3d_unsteady_0(): """ test cylinder3d_steady """ - cylinder3d_unsteady(static=False) - cylinder3d_unsteady(static=True) + dyn_standard, stc_standard = standard['dyn_solution'], standard[ + 'stc_solution'] + dyn_rslt = cylinder3d_unsteady(static=False) + stc_rslt = cylinder3d_unsteady(static=True) + + print(dyn_standard) + print(dyn_rslt) + compare(dyn_rslt, stc_rslt, delta=1e-5) + compare(dyn_standard, dyn_rslt, mode="equal") + compare(stc_standard, stc_rslt, mode="equal") @pytest.mark.cylinder3d_unsteady @@ -171,7 +186,9 @@ def test_cylinder3d_steady_1(): test cylinder3d_steady distributed case: padding """ - cylinder3d_unsteady() + dst_standard = standard['dst_solution'] + dst_rslt = cylinder3d_unsteady(static=True) + compare(dst_standard, dst_rslt, mode="equal") if __name__ == '__main__':