-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating an arbitrary geometry, mesh and boundary assignment! #1122
Comments
You cannot create arbitrary curved meshes with Trixi.jl itself. However, we provide other tools for meshing, e.g., HOHQMesh.jl. We have a tutorial on that in our docs: https://trixi-framework.github.io/Trixi.jl/stable/tutorials/hohqmesh_tutorial |
Before I give more detailed answers I would point you to the Trixi tutorial 9: Unstructured meshes with HOHQMesh.jl. This should help answer some questions and clarify certain aspects of running Trixi on an unstructured mesh, e.g., setting up the boundary condition dictionary. Although this tutorial does not discuss running with AMR via
Yes, you need to use a third-party software to generate an appropriate mesh file for the type of geometry you mention, an outer boundary and multiple inner curved boundaries. This mesh file can then be parsed by Trixi.
The mesh generator that we typically use is HOHMesh.jl. This is a Julia package that is a wrapper around the spectral element mesh generator HOHQMesh that is written in Fortran. The HOHQMesh generator requires a "control file" to instruct what is the outer boundary, what are the inner boundaries, what are the boundaries named, and other mesh specifics. The most important aspect here is to remember what you named the outer boundary and any of the inner boundary The tutorial I linked above gives a short walk-through of how to create the control file. If you encounter problems there is a more thorough discussion of control files in the HOHQMesh docs.
There are two options for unstructured mesh formats from HOHQMesh:
Switching to a different mesh format is easy. Once you have your HOHQMesh control file you can freely change winthin the
We are currently developing some interactive tools within HOHQMesh.jl to somewhat streamline this mesh generation process. These tools will allow a user to add outer / inner boundary curves, change the background grid, change mesh flie format, etc. Then the control file is automatically created for the user and the mesh file is generated. You can follow its development here.
Then I will lastly mention that the outer boundaries of a box domain are automatically given the names |
Thank you very much for your helpful and prompt comments. Now It is much more clear. And is the following conclusion correct?!
|
Sounds right to me but @andrewwinters5000 should confirm this, too. |
Yes, the file extension
Then in the mesh construction step of the elixir file you would need to call the appropriate constructor # create the initial p4est mesh from your mesh file
mesh_file = joinpath("out", "ice_cream_straight_sides.inp")
mesh = P4estMesh{2}(mesh_file) Also, you need to add an AMR controller and AMR callback to the elixir to turn on this functionality. @ranocha Yes, it is a good idea to update this tutorial with a small discussion at the end about how to use the |
@ranocha @andrewwinters5000 It's all clear now. Let me just add this closing comment to thank you all for your very kind and helpful responses. |
Creating geometry, meshing, and assigning BCs to the named boundaries
The documentation is very comprehensive, educational, and well written, however a few sections such as Geometry is still missing. It is not clear how to create an arbitrary geometry and mesh it, then impose boundary conditions.
Should a meshed geometry necessarily be created though a third-party software, then get exported into Trixi.jl or it can be done directly in Julia using Trixi.jl? If it is done using another software, which software, and what kind of file format? The documentation quickly mentions to two ways, as far as I understood: 1: Abaqus, 2: P4est.
1: Abaqus: (.inp file), right? Then how Trixi.jl recognizes the names of the boundaries and how they can be assigned with different boundary conditions? By making a dictionary and using the names of the boundaries Abaqus had generated? Is the boundary naming that is made by Abacus directly applicable in Trixi using a Dict?!
2: P4est: It comes in C as well as Julia. Is the Julia package sufficient and can it be used to generate geometry/mesh? If yes, what about boundaries and how to assign each boundary to its boundary condition?
Is there an alternative to the two methods above?
Any kind of solution is appreciated.
By the way, I am working on a simple geometry, that should use adaptive refinement method.
The computational domain is a rectangle with two holes in it! Two circles with different boundary conditions and a rectangular domain with boundary conditions on each wall.
The text was updated successfully, but these errors were encountered: