From a7adc59b70b667227f3f874ef06ed28d3e3740c9 Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Thu, 8 Jul 2021 15:27:49 +0500 Subject: [PATCH] Mod: docs section --- docs/mesh.rst | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/netgen.rst | 6 ++++++ 2 files changed, 63 insertions(+) create mode 100644 docs/mesh.rst diff --git a/docs/mesh.rst b/docs/mesh.rst new file mode 100644 index 0000000..7ed145c --- /dev/null +++ b/docs/mesh.rst @@ -0,0 +1,57 @@ +Mesh generation +=============== + +The main goal for the current meshes is to achieve the following points: + +* fine mesh on ``strips`` surfaces (minimum 3-4 elements per width/radius) +* stabilize count of 3d volumes from small :math:`\theta` to final +* keep an adequate time of calculation for number of elements +* make very fine mesh (prisms) near the walls for the better calculation and convergence of the solution + +Example: + +.. code-block:: python + :linenos: + + shape, groups = simple(0.28, True, [1, 0, 0]) + lengths = [ geompy.BasicProperties(edge)[0] for edge in geompy.SubShapeAll(shape, geompy.ShapeType["EDGE"]) ] + meanSize = sum(lengths) / len(lengths) + + # master mesh + maxSize = meanSize + minSize = meanSize * 1e-1 + chordalError = maxSize / 2 + growthRate = 0.7 + nbSegsPerEdge = 0.3 + nbSegsPerRadius = 1 + + mesh = smesh.Mesh(shape) + netgen123 = mesh.Tetrahedron(algo = smeshBuilder.NETGEN_1D2D3D) + + param123 = netgen123.Parameters() + # ... + status = mesh.AddHypothesis(shape, param123) + + vlayer123 = netgen123.ViscousLayers() + # ... + status = mesh.AddHypothesis(shape, vlayer123) + + # strips + maxSize = meanSize * 1e-1 + minSize = meanSize * 1e-3 + chordalError = minSize * 1e+1 + growthRate = 0.2 + nbSegsPerEdge = 2 + nbSegsPerRadius = 3 + + netgen12 = mesh.Triangle(algo = smeshBuilder.NETGEN_1D2D, geom = strips) + + param12 = netgen12.Parameters() + #... + status = mesh.AddHypothesis(strips, param12) + + # compute + isDone = mesh.Compute() + + # groups + # ... diff --git a/docs/netgen.rst b/docs/netgen.rst index 539527f..3422faf 100644 --- a/docs/netgen.rst +++ b/docs/netgen.rst @@ -54,6 +54,12 @@ Mesh generation ``Local sizes`` allows to define size of elements on and around specified geometrical objects. To define the local size it is necessary to select a geometrical objects in the object browser or in the viewer, and to click a button corresponding to the type of the geometrical objects: **On Vertex**, **On Edge** etc. +``Viscous Layers`` + additional hypothesis can be used together with NETGEN 3D. This hypothesis allows creation of layers of highly stretched prisms near mesh boundary, which is beneficial for high quality viscous computations. The prisms constructed on the quadrangular mesh faces are actually the hexahedrons. + +``Quadrangle Preference`` + This additional hypothesis can be used together with Netgen 2D algorithm. It allows Netgen 2D to build quad-dominant meshes. + **NETGEN 2D simple parameters** and **NETGEN 3D simple parameters** allow defining the size of elements for each dimension.