An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`Create Mesh <create_mesh_anchor>` or :ref:`Create Sub-Mesh <constructing_submeshes_page>` dialog.
*:ref:`Viscous Layers <viscous_layers_anchor>` and :ref:`Viscous Layers 2D <viscous_layers_anchor>` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations.
of highly stretched elements, prisms in 3D and quadrilaterals in 2D,
near mesh boundary, which is beneficial for high quality viscous
computations.
..image:: ../images/viscous_layers_hyp.png
:align: center
..image:: ../images/viscous_layers_2d_hyp.png
:align: center
***Name** - allows to define the name of the hypothesis.
***Total thickness** - gives the total thickness of element layers.
***Number of layers** - defines the number of element layers.
***Stretch factor** - defines the growth factor of element height from the mesh boundary inwards.
***Extrusion method** (available in 3D only) - defines how positions of nodes are found during prism construction and how the creation of distorted and intersecting prisms is prevented.
***Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms.
***Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms.
***Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms.
***Specified Faces/Edges are** - defines how the shapes specified by the next parameter are used.
***Faces/Edges with/without layers** - defines geometrical faces or edges on which element layers either should be or should not be constructed, depending on the value of the previous parameter (**Specified Faces/Edges are**). Faces (or edges) can be selected either in the Object Browser or in the VTK Viewer. **Add** button becomes active as soon as a suitable sub-shape is selected.
A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of :ref:`Sub-shapes preview chunk size <chunk_size_pref>` preference (in Preferences/Mesh/General tab).
The Viscous layer API is available on TUI. Allows to compute a shrink version of the geometry. This shrank version can be passed to any mesher and be used to
build the viscous layer from the mesh computed in the shrank geometry. The current implementation only support the **Face offset** method to extrude the
nodes from the shrank mesh to the original geometry.
This implementation supports 3D (Solids and Solid Compound) and 2D (Face) geometries. For the 3D case, the faces Ids are
used to identify the faces (perpendicular to it) where the solid is to be reduced. For the 2D case, the edges Ids can be provided but will not have any effect
on the geometry computation (this control is not available in the opencascade library), therefore, for this case the entire face is shrank.
The Viscous Layer API receive the same parameters as the Viscous Layers Hypothesis and implements four methods:
* The constructor ``ViscousLayerBuilder()``
* The parameters definitions ``setBuilderParameters(...)``
* The ``GetShrinkGeometry()`` method that returns the shrink version of the original geomtry.
* The ``AddLayers( shrinkMesh )`` method that returns the complet version of the mesh (shrink+viscous layer)
**See also** a sample TUI script of a :ref:`tui_viscous_layers_api`.
Usage of this hypothesis with :ref:`Quadrangle: Mapping <quad_ijk_algo_page>` meshing algorithm is obsolete since introducing :ref:`Quadrangle parameters <hypo_quad_params_anchor>` hypothesis.
Usage of this hypothesis with :ref:`Quadrangle: Mapping <quad_ijk_algo_page>` meshing algorithm corresponds to specifying *Quadrangle Preference* transition type of :ref:`Quadrangle parameters <hypo_quad_params_anchor>` hypothesis.
*Quadrangle Preference* transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else *Standard* transition type is used.