solution_start_time = time() os.chdir(initial_path) # ------------------------ Export VTK File --------------------------------------- # Linear and Mini Elements if polynomial_option == 0 or polynomial_option == 1 or polynomial_option == 2: save = exportVTK.Linear2D(x,y,IEN,numVerts,numElements,p,p,c,vx,vy) save.create_dir(folderResults) save.saveVTK(folderResults + str(0)) # Quad Element elif polynomial_option == 3: save = exportVTK.Quad2D(x,y,IEN,numNodes,numElements,w,psi,c,vx,vy) save.create_dir(folderResults) save.saveVTK(folderResults + str(0)) # --------------------------------------------------------------------------------- x_old = np.zeros([numNodes,1], dtype = float) y_old = np.zeros([numNodes,1], dtype = float) vx_old = np.zeros([numNodes,1], dtype = float) vy_old = np.zeros([numNodes,1], dtype = float) end_type = 0 for t in tqdm(range(1, nt)): numIteration = t try:
print ' Saving simulation in %s \n' % folderResults solution_start_time = time() os.chdir(initial_path) # ------------------------ Export VTK File --------------------------------------- # Linear and Mini Elements if polynomial_option == 1 or polynomial_option == 2: save = exportVTK.Linear2D(z, r, IEN, numNodes, numElements, w, w, psi, vz, vr) save.create_dir(folderResults) save.saveVTK(folderResults + str(0)) # Quad Element elif polynomial_option == 3: save = exportVTK.Quad2D(z, r, IEN, numNodes, numElements, w, w, psi, vz, vr) save.create_dir(folderResults) save.saveVTK(folderResults + str(0)) # --------------------------------------------------------------------------------- vorticityAux1BC = np.zeros([numNodes, 1], dtype=float) vz_old = np.zeros([numNodes, 1], dtype=float) vr_old = np.zeros([numNodes, 1], dtype=float) end_type = 0 for t in tqdm(range(1, nt)): numIteration = t try: print "" print ''' COPYRIGHT