@@ -626,14 +626,14 @@ def v_f_left(t_):
626626 print (f"Time: { end - start } " )
627627elif case in ["FSI1_2" , "FSI2_2" , "FSI3_2" ]:
628628 T = 20 # 10.0 # 12.0
629- dt = Constant (0.001 ) #0.001
629+ dt = Constant (0.002 ) #0.001
630630 chkstride = int (0.01 / float (dt )) # save every 0.01 sec
631631 t = Constant (0.0 )
632632 CNshift = 1
633633 elast = True
634634 linear_elast = True
635635 serendipity = True
636- slip_bc = True
636+ slip_bc = False
637637 if use_netgen :
638638 fname_checkpoint = f"dumbdata/fsi3_P4_P2_nref{ nref } _0.002_shift{ CNshift } _{ elast } _{ linear_elast } _netgen_new"
639639 fname_FD = f"time_series_FD_P4_P2_nref{ nref } _0.002_shift{ CNshift } _{ elast } _{ linear_elast } _netgen_new.dat"
@@ -643,11 +643,11 @@ def v_f_left(t_):
643643 #fname_checkpoint = f"dumbdata/fsi3_Q4_Q3_nref{nref}_0.002_shift{CNshift}_{elast}_{linear_elast}_ALEparamvar1_S"
644644 #fname_FD = f"time_series_FD_Q4_Q3_nref{nref}_0.002_shift{CNshift}_{elast}_{linear_elast}_ALEparamvar1_S.dat"
645645 #fname_FL = f"time_series_FL_Q4_Q3_nref{nref}_0.002_shift{CNshift}_{elast}_{linear_elast}_ALEparamvar1_S.dat"
646- fname_checkpoint = f"dumbdata/fsi3_Q4_Q3_nref{ nref } _0.001_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S"
647- fname_FD = f"time_series_FD_Q4_Q3_nref{ nref } _0.001_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
648- fname_FL = f"time_series_FL_Q4_Q3_nref{ nref } _0.001_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
649- fname_ux = f"time_series_ux_Q4_Q3_nref{ nref } _0.001_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
650- fname_uy = f"time_series_uy_Q4_Q3_nref{ nref } _0.001_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
646+ fname_checkpoint = f"dumbdata/fsi3_Q4_Q3_nref{ nref } _0.002_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S"
647+ fname_FD = f"time_series_FD_Q4_Q3_nref{ nref } _0.002_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
648+ fname_FL = f"time_series_FL_Q4_Q3_nref{ nref } _0.002_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
649+ fname_ux = f"time_series_ux_Q4_Q3_nref{ nref } _0.002_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
650+ fname_uy = f"time_series_uy_Q4_Q3_nref{ nref } _0.002_shift { CNshift } _{ elast } _{ linear_elast } _{ slip_bc } _ALEparamvar1_S.dat"
651651 else :
652652 fname_checkpoint = f"dumbdata/fsi3_P4_P2_nref{ nref } _0.002_shift{ CNshift } _{ elast } _{ linear_elast } _ALEparamtest1"
653653 fname_FD = f"time_series_FD_P4_P2_nref{ nref } _0.002_shift{ CNshift } _{ elast } _{ linear_elast } _ALEparamtest1.dat"
@@ -933,16 +933,16 @@ def v_f_left(t_):
933933 outfile .write ("t val" + "\n " )
934934 with open (fname_uy , 'w' ) as outfile :
935935 outfile .write ("t val" + "\n " )
936- if False :
937- vf = solution .subfunctions [0 ]
936+ if True :
938937 Vplot = FunctionSpace (mesh_f , "P" , degree )
939- vfplot = Function (Vplot , name = "velocity" )
940- solve (J_f_ * inner (TrialFunction (Vplot ), TestFunction (Vplot )) * dx_f == J_f_ * inner (sqrt (dot (vf , vf )), TestFunction (Vplot )) * dx_f , vfplot )
938+ vfplot = Function (Vplot , name = "mesh_f" )
939+ #vf = solution.subfunctions[0]
940+ #solve(J_f_ * inner(TrialFunction(Vplot), TestFunction(Vplot)) * dx_f == J_f_ * inner(sqrt(dot(vf, vf)), TestFunction(Vplot)) * dx_f, vfplot)
941941 coords = mesh_f .coordinates .dat .data_with_halos
942- uplot = solution .subfunctions [2 ]
943- uplot = Function (V_0 ).project (solution .subfunctions [2 ])
944- coords [:] = coords [:] + uplot .dat .data_ro_with_halos [:]
945- pgfplot (vfplot , "velocity .dat" , degree = 2 )
942+ # uplot = solution.subfunctions[2]
943+ # uplot = Function(V_0).project(solution.subfunctions[2])
944+ # coords[:] = coords[:] + uplot.dat.data_ro_with_halos[:]
945+ pgfplot (vfplot , "mesh_f .dat" , degree = 2 )
946946 #pgfplot(solution.subfunctions[4], "pressure.dat", degree=2)
947947 #pgfplot(solution.subfunctions[0], "quiver.dat", degree=0)
948948 raise RuntimeError ("only plotted solution" )
0 commit comments