-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description Added cylindrical manifold option to manifolds.cc. Modified the parameter file input (arg1, arg2, ... arg6 became point coordinates and vector coordinates). Added a some documentation to explain how the manifold subsection works. Coarsest meshes were too coarse and lead to geometrical errors even when refined. A manifold makes it possible for the refinements to follow a particular geometry. Testing New 3D application test using a cylinder manifold. Documentation Modified existing simulation parameters which were unclear. Manifolds can now be described with a center point (spherical/cylindrical) and a direction vector (cylindrical) Former-commit-id: dabcf1f
- Loading branch information
Showing
21 changed files
with
373 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
applications_tests/lethe-fluid/cylinder_manifold.mpirun=2.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Running on 2 MPI rank(s)... | ||
Number of active cells: 80 | ||
Number of degrees of freedom: 500 | ||
Volume of triangulation: 2.83 | ||
Pressure drop: 0 Pa | ||
Total pressure drop: 0 Pa | ||
|
||
***************************** | ||
Steady iteration: 1/1 | ||
***************************** | ||
Pressure drop: 5.07 Pa | ||
Total pressure drop: 5.03 Pa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
$MeshFormat | ||
2.2 0 8 | ||
$EndMeshFormat | ||
$Nodes | ||
24 | ||
1 -1 0 0 | ||
2 -6.123233995736766e-17 0 1 | ||
3 1 0 1.224646799147353e-16 | ||
4 1.83697019872103e-16 0 -1 | ||
5 0.5 0 0 | ||
6 0 0 0.5 | ||
7 0 0 -0.5 | ||
8 -0.5 0 0 | ||
9 -6.123233995736766e-17 1 1 | ||
10 0 1 0.5 | ||
11 0 0.5 0.5 | ||
12 -6.123233995736766e-17 0.5 1 | ||
13 0.5 1 0 | ||
14 0.5 0.5 0 | ||
15 0 1 -0.5 | ||
16 0 0.5 -0.5 | ||
17 -0.5 1 0 | ||
18 -0.5 0.5 0 | ||
19 -1 1 0 | ||
20 -1 0.5 0 | ||
21 1 1 1.224646799147353e-16 | ||
22 1 0.5 1.224646799147353e-16 | ||
23 1.83697019872103e-16 1 -1 | ||
24 1.83697019872103e-16 0.5 -1 | ||
$EndNodes | ||
$Elements | ||
28 | ||
1 5 2 1 1 2 6 8 1 12 11 18 20 | ||
2 5 2 1 1 6 5 7 8 11 14 16 18 | ||
3 5 2 1 1 12 11 18 20 9 10 17 19 | ||
4 5 2 1 1 11 14 16 18 10 13 15 17 | ||
5 5 2 1 1 2 3 5 6 12 22 14 11 | ||
6 5 2 1 1 3 4 7 5 22 24 16 14 | ||
7 5 2 1 1 4 1 8 7 24 20 18 16 | ||
8 5 2 1 1 12 22 14 11 9 21 13 10 | ||
9 5 2 1 1 22 24 16 14 21 23 15 13 | ||
10 5 2 1 1 24 20 18 16 23 19 17 15 | ||
11 3 2 2 2 2 1 20 12 | ||
12 3 2 2 2 12 20 19 9 | ||
13 3 2 2 2 2 12 22 3 | ||
14 3 2 2 2 12 9 21 22 | ||
15 3 2 2 2 3 22 24 4 | ||
16 3 2 2 2 22 21 23 24 | ||
17 3 2 2 2 4 24 20 1 | ||
18 3 2 2 2 24 23 19 20 | ||
19 3 2 3 3 6 5 7 8 | ||
20 3 2 3 3 2 6 8 1 | ||
21 3 2 3 3 4 1 8 7 | ||
22 3 2 3 3 3 4 7 5 | ||
23 3 2 3 3 2 3 5 6 | ||
24 3 2 4 4 9 19 17 10 | ||
25 3 2 4 4 10 17 15 13 | ||
26 3 2 4 4 9 10 13 21 | ||
27 3 2 4 4 21 13 15 23 | ||
28 3 2 4 4 23 15 17 19 | ||
$EndElements | ||
$PhysicalNames | ||
4 | ||
3 1 "Unspecified" | ||
2 2 "cylinder-manifold" | ||
2 3 "inlet" | ||
2 4 "outlet" | ||
$EndPhysicalNames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Listing of Parameters | ||
#---------------------- | ||
|
||
set dimension = 3 | ||
|
||
#--------------------------------------------------- | ||
# Simulation Control | ||
#--------------------------------------------------- | ||
|
||
subsection simulation control | ||
set method = steady | ||
set output name = output | ||
set output frequency = 0 | ||
set log precision = 3 | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Mesh | ||
#--------------------------------------------------- | ||
|
||
subsection mesh | ||
set type = gmsh | ||
set file name = ../../cylinder_manifold.msh | ||
set initial refinement = 1 | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Boundary Conditions | ||
#--------------------------------------------------- | ||
|
||
subsection boundary conditions | ||
set number = 3 | ||
subsection bc 0 | ||
set id = 2 | ||
set type = noslip | ||
end | ||
subsection bc 1 | ||
set id = 4 | ||
set type = outlet | ||
end | ||
subsection bc 2 | ||
set id = 3 | ||
set type = function | ||
subsection u | ||
set Function expression = 0 | ||
end | ||
subsection v | ||
set Function expression = 1 | ||
end | ||
end | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Non-Linear Solver Control | ||
#--------------------------------------------------- | ||
|
||
subsection non-linear solver | ||
subsection fluid dynamics | ||
set tolerance = 1e-12 | ||
set verbosity = quiet | ||
end | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Linear Solver Control | ||
#--------------------------------------------------- | ||
|
||
subsection linear solver | ||
subsection fluid dynamics | ||
set verbosity = quiet | ||
end | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Manifolds | ||
#--------------------------------------------------- | ||
|
||
subsection manifolds | ||
set number = 1 | ||
subsection manifold 0 | ||
set id = 2 | ||
set type = cylindrical | ||
end | ||
end | ||
|
||
#--------------------------------------------------- | ||
# Post-processing | ||
#--------------------------------------------------- | ||
|
||
subsection post-processing | ||
set verbosity = verbose | ||
set output frequency = 1 | ||
|
||
# Pressure drop calculation | ||
set calculate pressure drop = true | ||
set pressure drop name = cylinder_manifold_pressure_drop | ||
set inlet boundary id = 3 | ||
set outlet boundary id = 4 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
========== | ||
Manifolds | ||
========== | ||
Linking parts of the mesh to manifolds is an interesting way to factor the real geometry of the mesh during refinements. This mesh treatment can lead to reduced geometric approximation error. | ||
|
||
.. code-block:: text | ||
subsection manifolds | ||
# Sets the total number of specified manifolds | ||
set number = 0 | ||
subsection manifold 0 | ||
# Boundary mesh id specified in the .gmsh file | ||
set id = 0 | ||
# Type of manifold. Choices are <spherical|cylindrical|iges|none> | ||
set type = none | ||
# Center of the sphere or a point along the cylinder's axis (x, y, z) | ||
set point coordinates = 0, 0, 0 #for 2D, set point coordinates = 0, 0 | ||
# Direction vector used only for the cylinder (x, y, z) | ||
set direction vector = 0, 1, 0 | ||
end | ||
end | ||
First the number of manifolds is specified by the ``set number`` command. Then a subsection for each of the manifolds is created starting with the ``manifold 0``. The boundary ``id`` is in this case set to ``0`` corresponding to the mesh boundary to which the manifold will be applied. Then the ``type`` of the manifold is specified. | ||
|
||
* Lethe supports three types of manifolds: | ||
|
||
* ``spherical`` manifold: The former can be used to describe any sphere, circle, hypesphere or hyperdisc in two or three dimensions and requires the center of the geometry to set the manifold. | ||
* ``cylindrical`` manifold: Used to describe cylinders in three dimensions. It uses the coordinates of a point and a direction vector located on the axis of the cylinder. | ||
|
||
.. caution:: | ||
Cylindrical manifolds are not supported in 2D. | ||
|
||
* ``iges``: manifold corresponding to a CAD geometry: the last two lines of the ``manifold 0`` subsection are replaced by the following command ``set cad file = file_name.iges`` where the path to the cad file is specified. | ||
|
||
.. note:: | ||
For more information about manifolds and the reasons behind them, we invite you to read the documentation page of deal.II: `Manifold description for triangulations <https://www.dealii.org/developer/doxygen/deal.II/group__manifold.html>`_. | ||
|
||
------------------------ | ||
Understanding Manifolds | ||
------------------------ | ||
|
||
We can clearly see that the geometry is more similar to an octagon than to a circle. This is a problem because the cells composing the mesh are not aware that they should morph to shape a cylinder. After every refinement, an extra node is added between the existing nodes in order to generate new cells. The octagonal shape is therefore conserved as it is illustrated below: | ||
|
||
A really coarse mesh of a cylinder viewed from the top looks like this: | ||
|
||
.. image:: images/coarse_cylinder.png | ||
:align: center | ||
:width: 400 | ||
|
||
Manifolds are added to the geometry in order to solve this issue. Using a point and a direction vector along the axis of the cylinder, the cells of a part of the mesh are restricted to respect a certain geometry while refining the mesh. On the image below, the geometry on the left is obtained by adding a cylindrical manifold to the mesh. The geometry on the right is obtained if no manifold are specified. | ||
|
||
.. image:: images/fine_cylinder_manifold.png | ||
:align: center | ||
:width: 800 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.