Gmsh mesh.random factor3/9/2023 ![]() Moreover, high quality mesh generation cannot always be entirely automated, and often requires a lot of manual work for complicated domains. The efficiency of mesh generation limits the overall accuracy, robustness and speed of the numerical simulation process. Despite advances in mesh generation technology and computer hardware, the generation and management of meshes is often the most difficult and time consuming part of the simulation procedure on geometrically complex domains. The generated mesh can be visualized in Python with pyvista.Most numerical methods for solving partial differential equations require the generation of a mesh over the computational domain. generate_mesh ( dim = 2, algorithm = 6 ) # Convert cell sets to material cell_data = field_data = # Export the mesh for post-processing mesh. add_physical (, "BOUND" ) # Remove duplicate entities geo. add_polygon ( bound_bot_pts, mesh_size = lc ) # Define materials geo. add_polygon ( bound_top_pts, mesh_size = lc ) bound_bot = geo. add_polygon ( bound_right_pts, mesh_size = lc ) bound_top = geo. add_polygon ( basaq_right_pts, mesh_size = 2.0 * lc ) bound_right = geo. add_polygon ( uppaq_right_pts, mesh_size = 2.0 * lc ) basaq_right = geo. add_polygon ( capro_bot_right_pts, mesh_size = 0.75 * lc ) uppaq_right = geo. add_polygon ( capro_top_right_pts, mesh_size = 0.75 * lc ) capro_bot_right = geo. add_polygon ( cenaq_right_pts, mesh_size = 0.75 * lc ) capro_top_right = geo. add_polygon ( basaq_left_pts, mesh_size = 2.0 * lc ) cenaq_right = geo. ![]() add_polygon ( uppaq_left_pts, mesh_size = 2.0 * lc ) basaq_left = geo. add_polygon ( capro_bot_left_pts, mesh_size = 0.2 * lc ) uppaq_left = geo. add_polygon ( capro_top_left_pts, mesh_size = 0.2 * lc ) capro_bot_left = geo. add_polygon ( cenaq_left_pts, mesh_size = 0.1 * lc ) capro_top_left = geo. add_polygon ( fault_pts, mesh_size = 0.1 * lc ) cenaq_left = geo. Geometry () as geo : # Define polygons fault = geo. This is because Gmsh keeps the first node defined in the geometry in case it detects duplicated nodes. Note that layers are defined such that their characteristic lengths are increasing. To refine the mesh in the injection zone, the characteristic length of each layer entity is increased the farther we get from the injection point. Once all the points have been created, we can now generate the geometry, assign rock types/materials as Gmsh physical properties, and generate the mesh. Similarly to the fault entity, boundary entities are segmented to ensure conformity of the final mesh.īound_right_pts =, ,, ,, ,, , ] bound_top_pts =, ,, ,, ,, ,, ] bound_bot_pts =, ,, ,, ,, ,, ] Thus, physical boundary elements must be defined at the top, right and bottom sides of the model. In this sample problem, a no-flow boundary condition is imposed on the left side of the model (default in TOUGH), and Dirichlet boundary conditions are imposed elsewhere. Likewise, we also define the aquifer located at the right side of the fault.Ĭenaq_right_pts =, ,, , ] capro_top_right_pts =, ,, , ] capro_bot_right_pts =, ,, , ] uppaq_right_pts =, ,, , ] basaq_right_pts =, ,, , ]
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |