示例#1
0
def check_general():
    global plot_type 
    print 'Plot type=0 displays certain timestep'
    print 'Plot type=1 displays the liquid groth in time'
    print 'Plot type=2 displays multiple timesteps'
    print 'Plot type=3 saves plots '
    q=raw_input('Plot type='+str(plot_type)+' ? [Y/n]')
    if(q=='n' or q=='N'):
        plot_type=int(raw_input('Plot type : '))
        check_general()
    return
check_general()

time_data=np.zeros(100)
time_data = general_plot.read_timedata(data_path, time_data)

if (plot_type == 0):
  
  ########################################################################
  #Check all global variables 
  ########################################################################
  def check():
      global tstart, tstep, tend, nbins
      q=raw_input('Do ['+str(tstart)+':'+str(tstep)+':'+str(tend)+'] with nbins=' +str(nbins)+' ? [Y/n]')
      if(q=='n' or q=='N'):
          tstart=int(raw_input('Start at: '))
          tend  =int(raw_input('End at  : '))
          tstep =int(raw_input('Steps   : '))
          nbins =int(raw_input('Number of bins   : '))
          check()
示例#2
0
# p_title_part_1  = 'DYCOMS_II'
# p_title_part_2  = 'ARCTIC Re=400'
p_title_part_2 = "DYCOMS_II Re=400"
p_title_part_t = " - Time: "

# p_title_1 = p_title_part_1+p_title_part_t+str((plt_ts_1+1)*100)
# p_title_2 = p_title_part_2+p_title_part_t+str((plt_ts_2+1)*100)
# p_title_3 = p_title_part_2+p_title_part_t+str((plt_ts_2+1)*100)

plot_type = 0


time_data_1 = np.zeros(100)
time_data_2 = np.zeros(100)
time_data_3 = np.zeros(100)
time_data_1 = general_plot.read_timedata(data_path_1, time_data_1)
time_data_2 = general_plot.read_timedata(data_path_2, time_data_2)
if dycoms == 0:
    time_data_3 = general_plot.read_timedata(data_path_3, time_data_3)

if plot_type == 0:

    ########################################################################
    # Calculate real time
    ########################################################################
    if dycoms == 0:
        # VERDI
        t_lambda = 15
        t_F = 60
        t_gravity = 9.81
        t_rho_c = 1.164