@@ -40,8 +40,6 @@ def crossSection0(N):
4040parser = argparse .ArgumentParser ()
4141parser .add_argument ("configurationFileName" , help = "Name of the xml precice configuration file." ,
4242 nargs = '?' , type = str , default = "../precice-config.xml" )
43- parser .add_argument (
44- "--write-vtk" , help = "Save vtk files of each timestep in the 'VTK' folder." , action = 'store_true' )
4543parser .add_argument (
4644 "--enable-plot" , help = "Show a continuously updated plot of the tube while simulating." , action = 'store_true' )
4745parser .add_argument ("--write-video" , help = "Save a video of the simulation as 'writer_test.mp4'. \
@@ -55,7 +53,6 @@ def crossSection0(N):
5553 print ("Try '$ python FluidSolver.py precice-config.xml'" )
5654 quit ()
5755
58- output_mode = config .OutputModes .VTK if args .write_vtk else config .OutputModes .OFF
5956plotting_mode = config .PlottingModes .VIDEO if args .enable_plot else config .PlottingModes .OFF
6057if args .write_video and not args .enable_plot :
6158 print ("" )
@@ -64,6 +61,8 @@ def crossSection0(N):
6461 quit ()
6562writeVideoToFile = True if args .write_video else False
6663
64+ print ("Plotting Mode: {}" .format (plotting_mode ))
65+
6766print ("Starting Fluid Solver..." )
6867
6968print ("N: " + str (N ))
@@ -81,7 +80,6 @@ def crossSection0(N):
8180crossSectionLength = a0 * np .ones (N + 1 )
8281crossSectionLength_old = a0 * np .ones (N + 1 )
8382
84-
8583if plotting_mode == config .PlottingModes .VIDEO :
8684 fig , ax = plt .subplots (1 )
8785 if writeVideoToFile :
@@ -153,9 +151,9 @@ def crossSection0(N):
153151 velocity_old = np .copy (velocity )
154152 pressure_old = np .copy (pressure )
155153 crossSectionLength_old = np .copy (crossSectionLength )
156- if output_mode is config . OutputModes . VTK :
157- writeOutputToVTK (time_it , "out_fluid_" , dx , datanames = ["velocity" , "pressure" , "diameter" ], data = [
158- velocity_old , pressure_old , crossSectionLength_old ])
154+
155+ writeOutputToVTK (time_it , "out_fluid_" , dx , datanames = ["velocity" , "pressure" , "diameter" ], data = [
156+ velocity_old , pressure_old , crossSectionLength_old ])
159157 time_it += 1
160158
161159print ("Exiting FluidSolver" )
0 commit comments