![]() # classify the surface mesh according to given angle, and create discrete model rge(os.path.join(path, 'terrain_stl_data.stl')) Path = os.path.dirname(os.path.abspath(_file_)) ![]() May it help to introduce intermediate layers, STL meshes for all sides or are there particularly suited meshing algorithms or options?įor sake of completeness, here is the complete code (Python) import gmsh What is the reason behind these distorted elements and how can they be circumvented? However, the preparation of such transfinite meshes generally requires more efforts and is even not always feasible. Setting transfinite=True (hex mesh) gives warnings Failed to compute equidistant parameters, but the generated mesh works. < 0)Īnd the generated mesh is unusable for subsequent FEM simulations. Warning : Volume mesh: worst distortion = -0.124232 (avg = 0.997014, 1 elements with jac. I demonstrate this problem at the official Gmsh demo-model terrain_stl.py.Īdding the line (2) to this script with transfinite=False (tetra mesh) leads to the warnings Warning : Surface mesh: worst distortion = -0.148472 (avg = 0.990486, 2 elements with jac. This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 851768).Quite moderately shaped terrains, given as stl-file, lead to unusable meshes ( jac.<0) when meshed with higher order elements (required for geomechanical simulations). In case of questions just open an issue or contact Arved Enders-Seidlitz. A more extensive documentation using sphinx is under construction. Model.write_msh("crystal-growth-3D.msh") Documentation MeshControlLinear(model, if_crucible_melt, sh_size, sh_size) If_crucible_melt = Shape(model, 2, "if_crucible_melt", crucible.get_interface(melt)) If_crystal_melt = Shape(model, 2, "if_crystal_melt", crystal.get_interface(melt)) If x not in crucible.get_interface(melt) + bnd_crucible_bottom.geo_ids If x not in melt.get_interface(crystal) + melt.get_interface(crucible)īnd_crucible_bottom = Shape(model, 2, "bnd_crucible_bottom", ) Model, 3, "melt", Ĭrucible = Shape(model, 3, "crucible", ) Mesh of a simple 3D Czochralski crystal growth model: import gmshįrom objectgmsh.objects import MeshControlLinear Model, if_crystal_melt, 0.001, exp=1.7, shapes=Ī similar but more complex example can be found here. If_crystal_melt = Shape(model, 1, "if_crystal_melt", crystal.get_interface(melt)) ,, one_only=Trueīnd_crucible_outside = Shape(model, 1, "bnd_crucible_outside", surfs)īnd_crucible_bottom = Shape(model, 1, "bnd_crucible_bottom", ) ![]() Model, 1, "bnd_melt_surf", melt.get_boundaries_in_box(, ) Melt = Shape(model, 2, "melt", )Ĭrucible = occ.addRectangle(0, -melt_h - (cruc_h - cruc_hi), 0, cruc_r, cruc_h)Ĭrucible_hole = occ.addRectangle(0, -melt_h, 0, melt_r, cruc_hi)Ĭut(, )Ĭrucible = Shape(model, 2, "crucible", ) Mesh of a simple 2D axisymmetric Czochralski crystal growth model: import gmshįrom objectgmsh import Model, Shape, MeshControlConstant, MeshControlExponential, cutĬrystal = Shape(model, 2, "crystal", ) However, in complex geometries, it highly reduces the modelling effort. Objectgmsh is just a wrapper for the gmsh python API, and all gmsh commands are still working "as usual". Furthermore, several classes for simplified control of mesh sizes are provided. Objectgmsh bases on a Model class implementing an interface to the main Gmsh functionality, and a Shape class used to access information about the geometry, e.g., the IDs of the interface between two bodies. The latest release can be installed using pip: pip install objectgmsh Basic principle If you use this code in your research, please cite our article: The project is developed and maintained by the Model experiments group at the Leibniz Institute for Crystal Growth (IKZ). This tool provides some utilities for the gmsh python API that are especially helpful when you're working on complex geometries using the Open CASCADE kernel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |