Skip to content
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

Different Boundary Conditions for Standard Abaqus #1799

Merged
merged 78 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d1dfb76
first take on BCs for standard Abaqus
DanielDoehring Jan 4, 2024
23b2e84
simplify
DanielDoehring Jan 4, 2024
d86ea1e
Couple comments, example
DanielDoehring Jan 4, 2024
3b2f545
comments
DanielDoehring Jan 4, 2024
27e332b
shorten code
DanielDoehring Jan 5, 2024
db6fb46
refactor
DanielDoehring Jan 5, 2024
244f75f
fmt
DanielDoehring Jan 5, 2024
8f0e184
refactor
DanielDoehring Jan 5, 2024
c783247
3D
DanielDoehring Jan 5, 2024
06fb60c
tests and fmt
DanielDoehring Jan 5, 2024
4a8ff77
comment
DanielDoehring Jan 5, 2024
462a981
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 5, 2024
82fed9c
news
DanielDoehring Jan 5, 2024
a23e73f
comment
DanielDoehring Jan 5, 2024
46398cb
stick to polydeg
DanielDoehring Jan 5, 2024
504022a
polydeg 3
DanielDoehring Jan 5, 2024
a28314f
polydeg
DanielDoehring Jan 5, 2024
3197aa5
Update examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl
DanielDoehring Jan 6, 2024
b84cfa9
Update examples/p4est_2d_dgsem/elixir_euler_airfoil_mach2.jl
DanielDoehring Jan 6, 2024
ad5ff14
Update src/meshes/p4est_mesh.jl
DanielDoehring Jan 6, 2024
b63935b
Update NEWS.md
DanielDoehring Jan 6, 2024
02ccb9c
Update examples/p4est_3d_dgsem/elixir_euler_free_stream_boundaries.jl
DanielDoehring Jan 6, 2024
c18ad8e
improve (?) formatting
DanielDoehring Jan 7, 2024
99b96a6
fmt
DanielDoehring Jan 7, 2024
918a303
split constructor
DanielDoehring Jan 7, 2024
fb69699
comment
DanielDoehring Jan 7, 2024
2497727
two boundaries
DanielDoehring Jan 7, 2024
a006756
comment
DanielDoehring Jan 7, 2024
43c4f43
comment
DanielDoehring Jan 7, 2024
aca432d
rename elixir, change mesh
DanielDoehring Jan 7, 2024
0ffaba1
comments
DanielDoehring Jan 7, 2024
f306b86
add doc
DanielDoehring Jan 9, 2024
cc70d04
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 9, 2024
a0040e9
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 9, 2024
79e1107
avoid unicode
DanielDoehring Jan 10, 2024
4eb747b
Merge branch 'BCs_for_Standard_Abaqus' of github.com:DanielDoehring/T…
DanielDoehring Jan 10, 2024
f00ac14
improve doc
DanielDoehring Jan 10, 2024
682adc3
Add tutorial
DanielDoehring Jan 10, 2024
86bf70b
typos
DanielDoehring Jan 10, 2024
cd1a326
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 12, 2024
d542898
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 12, 2024
c0e6be8
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
5c65d70
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
c9ada6f
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
d3e9387
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
7152cfa
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
38ca019
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
6be55ee
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
22b7283
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
1d7f5a5
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
a3ca4e4
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
0b99b49
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
013ff84
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
0622b7a
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 13, 2024
dc2f232
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
77f22a6
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
f9af635
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
6405b0a
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
5d43f8b
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 13, 2024
8ff47e7
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 14, 2024
246878c
Apply suggestions from code review
DanielDoehring Jan 16, 2024
9de58c1
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 16, 2024
30b2946
Comments
DanielDoehring Jan 17, 2024
253c502
Update p4est_mesh.jl
DanielDoehring Jan 18, 2024
3696cfd
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 19, 2024
4b4ff81
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 22, 2024
d729235
Update src/meshes/p4est_mesh.jl
DanielDoehring Jan 23, 2024
b981727
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 23, 2024
9a116e5
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 23, 2024
43d0ac9
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 23, 2024
282ba82
Update docs/src/meshes/p4est_mesh.md
DanielDoehring Jan 23, 2024
6ad175e
more robust parsing
DanielDoehring Jan 23, 2024
9676b90
print warning if there has been a bc name supplied for which no nodes…
DanielDoehring Jan 23, 2024
964c2f8
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 23, 2024
8ae228d
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 23, 2024
16a7b25
Update src/meshes/p4est_mesh.jl
DanielDoehring Jan 23, 2024
85817af
Update docs/literate/src/files/p4est_from_gmsh.jl
DanielDoehring Jan 23, 2024
453c275
Merge branch 'main' into BCs_for_Standard_Abaqus
DanielDoehring Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ for human readability.
#### Added
- AMR for hyperbolic-parabolic equations on 3D `P4estMesh`
- `flux_hllc` on non-cartesian meshes for `CompressibleEulerEquations{2,3}D`
- Different boundary conditions for quad/hex meshes in Abaqus format, even if not generated by HOHQMesh,
can now be digested by Trixi in 2D and 3D.

## Changes when updating to v0.6 from v0.5.x

Expand Down
458 changes: 458 additions & 0 deletions docs/literate/src/files/p4est_from_gmsh.jl

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ files = [
"Adaptive mesh refinement" => "adaptive_mesh_refinement.jl",
"Structured mesh with curvilinear mapping" => "structured_mesh_mapping.jl",
"Unstructured meshes with HOHQMesh.jl" => "hohqmesh_tutorial.jl",
"P4est mesh from gmsh" => "p4est_from_gmsh.jl",
# Topic: other stuff
"Explicit time stepping" => "time_stepping.jl",
"Differentiable programming" => "differentiable_programming.jl",
Expand Down
256 changes: 253 additions & 3 deletions docs/src/meshes/p4est_mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This heading is used to indicate to the mesh constructor which of the above mapp
create a curvilinear mesh.
If the Abaqus file header is **not** present then the `P4estMesh` is created with the first strategy above.

#### List of corner nodes
#### <a name="nodes"></a>List of corner nodes

Next, prefaced with `*NODE`, comes a list of the physical `(x,y,z)` coordinates of all the corners.
The first integer in the list of the corners provides its id number.
Expand All @@ -71,7 +71,7 @@ Thus, for the two-dimensional example mesh this block of corner information is
7, 3.0, -1.0, 0.0
```

#### List of elements
#### <a name="elements"></a>List of elements

The element connectivity is given after the list of corners. The header for this information block is
```
Expand All @@ -98,7 +98,9 @@ The construction of the element neighbor ids and identifying physical boundary s
directly from the [`p4est`](https://github.com/cburstedde/p4est) library.
For example, the neighbor connectivity is created in the mesh constructor using the wrapper `read_inp_p4est` function.

#### HOHQMesh boundary information
#### Encoding of boundaries

##### HOHQMesh boundary information

If present, any additional information in the mesh file that was created by `HOHQMesh` is prefaced with
`** ` to make it an Abaqus comment.
Expand Down Expand Up @@ -230,8 +232,38 @@ For completeness, we provide the entire Abaqus mesh file for the example mesh in
** Bottom --- Right ---
```

##### Standard Abaqus format boundary information

As an alternative to an Abaqus mesh generated by `HOHQMesh`, `.inp` files with boundary information encoded as nodesets `*NSET,NSET=` can be used to construct a `p4est` mesh.
This is especially useful for usage of existing meshes (consisting of bilinear elements) which could stem from the popular [`gmsh`](https://gmsh.info/) meshing software.

In addition to the list of [nodes](#nodes) and [elements](#elements) given above, there are nodesets of the form
```
*NSET,NSET=PhysicalLine1
1, 4, 52, 53, 54, 55, 56, 57, 58,
DanielDoehring marked this conversation as resolved.
Show resolved Hide resolved
```
present which are used to associate the edges defined through their corner nodes with a label. In this case it is called `PhysicalLine1`.
By looping over every element and its associated edges, consisting of two nodes, we query the read in `NSET`s if the current node pair is present.

To prevent that every nodeset following `*NSET,NSET=` is treated as a boundary, the user must supply a `boundary_symbols` keyword to the [`P4estMesh`](@ref) constructor:

```julia
boundary_symbols = [:PhysicalLine1]

mesh = P4estMesh{2}(mesh_file, polydeg = polydeg, boundary_symbols = boundary_symbols)
```
By doing so, only nodesets with a label present in `boundary_symbols` are treated as physical boundaries.
Other nodesets that could be used for diagnostics are not treated as external boundaries.
Note that there is a leading colon `:` compared to the label in the `.inp` mesh file.
This is required to turn the label into a [`Symbol`](https://docs.julialang.org/en/v1/manual/metaprogramming/#Symbols).

A 2D example for this mesh, which is read-in for an unstructured mesh file created with `gmsh`, is presented in
`examples/p4est_2d_dgsem/elixir_euler_NACA6412airfoil_mach2.jl`.

### Mesh in three spatial dimensions

#### `HOHQMesh`-Extended Abaqus format

The 3D Abaqus file format with high-order boundary information from `HOHQMesh` is very similar to the
2D version discussed above. There are only three changes:

Expand Down Expand Up @@ -346,4 +378,222 @@ transfinite map of the straight sided hexahedral element to find
\mathbf{X}(\boldsymbol{\xi}) = \boldsymbol\Sigma(\boldsymbol{\xi})
- \mathcal{C}_{\texttt{edge}}(\boldsymbol{\xi})
+ \mathbf{X}_{linear}(\boldsymbol{\xi}).
```

#### Construction from standard Abaqus

Also for a mesh in standard Abaqus format there are no qualitative changes when going from 2D to 3D.
The most notable difference is that boundaries are formed in 3D by faces defined by four nodes while in 2D boundaries are edges consisting of two elements.
A simple mesh file, which is used also in `examples/p4est_3d_dgsem/elixir_euler_free_stream_boundaries.jl`, is given below:
```
*Heading
<SOMETHING DIFFERENT FROM "File created by HOHQMesh">
*NODE
1, -2, 0, 0
2, -1, 0, 0
3, -1, 1, 0
4, -2, 1, 0
5, -2, 0, 1
6, -1, 0, 1
7, -1, 1, 1
8, -2, 1, 1
9, -1.75, 1, 0
10, -1.5, 1, 0
11, -1.25, 1, 0
12, -1, 0.75000000000035, 0
13, -1, 0.50000000000206, 0
14, -1, 0.25000000000104, 0
15, -1.25, 0, 0
16, -1.5, 0, 0
17, -1.75, 0, 0
18, -2, 0.24999999999941, 0
19, -2, 0.49999999999869, 0
20, -2, 0.74999999999934, 0
21, -1.75, 0, 1
22, -1.5, 0, 1
23, -1.25, 0, 1
24, -1, 0.24999999999941, 1
25, -1, 0.49999999999869, 1
26, -1, 0.74999999999934, 1
27, -1.25, 1, 1
28, -1.5, 1, 1
29, -1.75, 1, 1
30, -2, 0.75000000000035, 1
31, -2, 0.50000000000206, 1
32, -2, 0.25000000000104, 1
33, -2, 0, 0.24999999999941
34, -2, 0, 0.49999999999869
35, -2, 0, 0.74999999999934
36, -2, 1, 0.24999999999941
37, -2, 1, 0.49999999999869
38, -2, 1, 0.74999999999934
39, -1, 0, 0.24999999999941
40, -1, 0, 0.49999999999869
41, -1, 0, 0.74999999999934
42, -1, 1, 0.24999999999941
43, -1, 1, 0.49999999999869
44, -1, 1, 0.74999999999934
45, -1.25, 0.25000000000063, 0
46, -1.25, 0.50000000000122, 0
47, -1.25, 0.7500000000001, 0
48, -1.5, 0.25000000000023, 0
49, -1.5, 0.50000000000038, 0
50, -1.5, 0.74999999999984, 0
51, -1.75, 0.24999999999982, 0
52, -1.75, 0.49999999999953, 0
53, -1.75, 0.74999999999959, 0
54, -1.75, 0.25000000000063, 1
55, -1.75, 0.50000000000122, 1
56, -1.75, 0.7500000000001, 1
57, -1.5, 0.25000000000023, 1
58, -1.5, 0.50000000000038, 1
59, -1.5, 0.74999999999984, 1
60, -1.25, 0.24999999999982, 1
61, -1.25, 0.49999999999953, 1
62, -1.25, 0.74999999999959, 1
63, -2, 0.24999999999982, 0.24999999999941
64, -2, 0.49999999999953, 0.24999999999941
65, -2, 0.74999999999959, 0.24999999999941
66, -2, 0.25000000000023, 0.49999999999869
67, -2, 0.50000000000038, 0.49999999999869
68, -2, 0.74999999999984, 0.49999999999869
69, -2, 0.25000000000063, 0.74999999999934
70, -2, 0.50000000000122, 0.74999999999934
71, -2, 0.7500000000001, 0.74999999999934
72, -1.25, 1, 0.74999999999934
73, -1.25, 1, 0.49999999999869
74, -1.25, 1, 0.24999999999941
75, -1.5, 1, 0.74999999999934
76, -1.5, 1, 0.49999999999869
77, -1.5, 1, 0.24999999999941
78, -1.75, 1, 0.74999999999934
79, -1.75, 1, 0.49999999999869
80, -1.75, 1, 0.24999999999941
81, -1, 0.25000000000063, 0.24999999999941
82, -1, 0.50000000000122, 0.24999999999941
83, -1, 0.7500000000001, 0.24999999999941
84, -1, 0.25000000000023, 0.49999999999869
85, -1, 0.50000000000038, 0.49999999999869
86, -1, 0.74999999999984, 0.49999999999869
87, -1, 0.24999999999982, 0.74999999999934
88, -1, 0.49999999999953, 0.74999999999934
89, -1, 0.74999999999959, 0.74999999999934
90, -1.75, 0, 0.74999999999934
91, -1.75, 0, 0.49999999999869
92, -1.75, 0, 0.24999999999941
93, -1.5, 0, 0.74999999999934
94, -1.5, 0, 0.49999999999869
95, -1.5, 0, 0.24999999999941
96, -1.25, 0, 0.74999999999934
97, -1.25, 0, 0.49999999999869
98, -1.25, 0, 0.24999999999941
99, -1.75, 0.25000000000043, 0.74999999999934
100, -1.75, 0.25000000000023, 0.49999999999869
101, -1.75, 0.25000000000002, 0.24999999999941
102, -1.75, 0.5000000000008, 0.74999999999934
103, -1.75, 0.50000000000038, 0.49999999999869
104, -1.75, 0.49999999999995, 0.24999999999941
105, -1.75, 0.74999999999997, 0.74999999999934
106, -1.75, 0.74999999999984, 0.49999999999869
107, -1.75, 0.74999999999972, 0.24999999999941
108, -1.5, 0.25000000000023, 0.74999999999934
109, -1.5, 0.25000000000023, 0.49999999999869
110, -1.5, 0.25000000000023, 0.24999999999941
111, -1.5, 0.50000000000038, 0.74999999999934
112, -1.5, 0.50000000000038, 0.49999999999869
113, -1.5, 0.50000000000038, 0.24999999999941
114, -1.5, 0.74999999999984, 0.74999999999934
115, -1.5, 0.74999999999984, 0.49999999999869
116, -1.5, 0.74999999999984, 0.24999999999941
117, -1.25, 0.25000000000002, 0.74999999999934
118, -1.25, 0.25000000000023, 0.49999999999869
119, -1.25, 0.25000000000043, 0.24999999999941
120, -1.25, 0.49999999999995, 0.74999999999934
121, -1.25, 0.50000000000038, 0.49999999999869
122, -1.25, 0.5000000000008, 0.24999999999941
123, -1.25, 0.74999999999972, 0.74999999999934
124, -1.25, 0.74999999999984, 0.49999999999869
125, -1.25, 0.74999999999997, 0.24999999999941
******* E L E M E N T S *************
*ELEMENT, type=C3D8, ELSET=Volume1
153, 54, 21, 5, 32, 99, 90, 35, 69
154, 99, 90, 35, 69, 100, 91, 34, 66
155, 100, 91, 34, 66, 101, 92, 33, 63
156, 101, 92, 33, 63, 51, 17, 1, 18
157, 55, 54, 32, 31, 102, 99, 69, 70
158, 102, 99, 69, 70, 103, 100, 66, 67
159, 103, 100, 66, 67, 104, 101, 63, 64
160, 104, 101, 63, 64, 52, 51, 18, 19
161, 56, 55, 31, 30, 105, 102, 70, 71
162, 105, 102, 70, 71, 106, 103, 67, 68
163, 106, 103, 67, 68, 107, 104, 64, 65
164, 107, 104, 64, 65, 53, 52, 19, 20
165, 29, 56, 30, 8, 78, 105, 71, 38
166, 78, 105, 71, 38, 79, 106, 68, 37
167, 79, 106, 68, 37, 80, 107, 65, 36
168, 80, 107, 65, 36, 9, 53, 20, 4
169, 57, 22, 21, 54, 108, 93, 90, 99
170, 108, 93, 90, 99, 109, 94, 91, 100
171, 109, 94, 91, 100, 110, 95, 92, 101
172, 110, 95, 92, 101, 48, 16, 17, 51
173, 58, 57, 54, 55, 111, 108, 99, 102
174, 111, 108, 99, 102, 112, 109, 100, 103
175, 112, 109, 100, 103, 113, 110, 101, 104
176, 113, 110, 101, 104, 49, 48, 51, 52
177, 59, 58, 55, 56, 114, 111, 102, 105
178, 114, 111, 102, 105, 115, 112, 103, 106
179, 115, 112, 103, 106, 116, 113, 104, 107
180, 116, 113, 104, 107, 50, 49, 52, 53
181, 28, 59, 56, 29, 75, 114, 105, 78
182, 75, 114, 105, 78, 76, 115, 106, 79
183, 76, 115, 106, 79, 77, 116, 107, 80
184, 77, 116, 107, 80, 10, 50, 53, 9
185, 60, 23, 22, 57, 117, 96, 93, 108
186, 117, 96, 93, 108, 118, 97, 94, 109
187, 118, 97, 94, 109, 119, 98, 95, 110
188, 119, 98, 95, 110, 45, 15, 16, 48
189, 61, 60, 57, 58, 120, 117, 108, 111
190, 120, 117, 108, 111, 121, 118, 109, 112
191, 121, 118, 109, 112, 122, 119, 110, 113
192, 122, 119, 110, 113, 46, 45, 48, 49
193, 62, 61, 58, 59, 123, 120, 111, 114
194, 123, 120, 111, 114, 124, 121, 112, 115
195, 124, 121, 112, 115, 125, 122, 113, 116
196, 125, 122, 113, 116, 47, 46, 49, 50
197, 27, 62, 59, 28, 72, 123, 114, 75
198, 72, 123, 114, 75, 73, 124, 115, 76
199, 73, 124, 115, 76, 74, 125, 116, 77
200, 74, 125, 116, 77, 11, 47, 50, 10
201, 24, 6, 23, 60, 87, 41, 96, 117
202, 87, 41, 96, 117, 84, 40, 97, 118
203, 84, 40, 97, 118, 81, 39, 98, 119
204, 81, 39, 98, 119, 14, 2, 15, 45
205, 25, 24, 60, 61, 88, 87, 117, 120
206, 88, 87, 117, 120, 85, 84, 118, 121
207, 85, 84, 118, 121, 82, 81, 119, 122
208, 82, 81, 119, 122, 13, 14, 45, 46
209, 26, 25, 61, 62, 89, 88, 120, 123
210, 89, 88, 120, 123, 86, 85, 121, 124
211, 86, 85, 121, 124, 83, 82, 122, 125
212, 83, 82, 122, 125, 12, 13, 46, 47
213, 7, 26, 62, 27, 44, 89, 123, 72
214, 44, 89, 123, 72, 43, 86, 124, 73
215, 43, 86, 124, 73, 42, 83, 125, 74
216, 42, 83, 125, 74, 3, 12, 47, 11
*NSET,NSET=PhysicalSurface1
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71,
*NSET,NSET=PhysicalSurface2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 21, 22, 23,
24, 25, 26, 27, 28, 29, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98,
```
Loading
Loading