create_figure_scheduler = fk.schedules(times=WHEN) ################################################################################ # # Mesh: #-------------------- # .. math:: # # L = 25 m, l = 1 m # dir_path = os.path.abspath(os.path.dirname(sys.argv[0])) triangular_mesh = fk.TriangularMesh.from_msh_file(dir_path + '/inputs/bump.mesh') if not args.nographics: fk_plt.plot_mesh(triangular_mesh) ################################################################################ # # 1D Steady state analytic solutions: #------------------------------------ # #1D steady state analytic solution is defined in a Bump class. #Computation of the solution depends on intial state, boundary conditions #and flow type. #The topography is defined as a function of x: # X_B = 10.
output_scheduler = fk.schedules(count=NB_VTK) output_scheduler_lag = fk.schedules(count=NB_VTK) ################################################################################ # # Mesh: #-------------------- dir_path = os.path.abspath(os.path.dirname(sys.argv[0])) triangular_mesh = fk.TriangularMesh.from_msh_file(dir_path + '/inputs/raceway.msh') NC = triangular_mesh.NV if WITH_PARTICLES: triangular_mesh.set_neighbours() if not args.nographics: fk_plt.plot_mesh(triangular_mesh, plot_labels=False) ################################################################################ # # Layers: #-------------------- layer = fk.Layer(NL, triangular_mesh, topography=ZB) ################################################################################ # # Primitives: #-------------------- primitives = fk.Primitive(triangular_mesh, layer, height=H0)
TG, vertex_labels, boundary_labels = fk.read_msh('inputs/bump{}.msh'.format(First_mesh)) triangular_mesh = fk.TriangularMesh(TG, vertex_labels, boundary_labels) triangular_mesh_list.append(triangular_mesh) os.system('rm inputs/bump{}.msh'.format(First_mesh)) else: triangular_mesh = triangular_mesh.refine_by_splitting() triangular_mesh_list.append(triangular_mesh) else: #Generates all meshes from bump#.geo files os.system('gmsh -2 inputs/bump{}.geo -o inputs/bump{}.msh'.format(M, M)) TG, vertex_labels, boundary_labels = fk.read_msh('inputs/bump{}.msh'.format(M)) triangular_mesh_list.append(fk.TriangularMesh(TG, vertex_labels, boundary_labels)) os.system('rm inputs/bump{}.msh'.format(M)) NT.append(triangular_mesh_list[M].NT) if PLOT_MESH: fk_plt.plot_mesh(triangular_mesh_list[M]) ################################################################################ # # Cases: #-------------------- # #Here we define cases based on a ``case`` class containing info such as space order #or time order for each simulation we want to run. class case(): def __init__(self, NL=1, mesh_id=0, time_order=False, space_order=False): self.NL = NL self.mesh_id = mesh_id self.time_order = time_order self.space_order = space_order