Update user documentation

This commit is contained in:
vsr 2011-06-08 06:50:21 +00:00
parent 0ae2084641
commit db06de940e
9 changed files with 81 additions and 62 deletions

View File

@ -60,7 +60,7 @@ hypothesis with type <b>Triangle Preference</b> set instead.</i>
\anchor viscous_layers_anchor \anchor viscous_layers_anchor
<h2>Viscous Layers</h2> <h2>Viscous Layers</h2>
<b>Viscous Layers</b> additional hypotheses can be used together with <b>Viscous Layers</b> additional hypothesis can be used together with
several 3D algorithms: NETGEN 3D, GHS3D and Hexahedron(i,j,k). This several 3D algorithms: NETGEN 3D, GHS3D and Hexahedron(i,j,k). This
hypothesis allows creation of layers of highly stretched prisms near hypothesis allows creation of layers of highly stretched prisms near
mesh boundary, which is beneficial for high quality viscous mesh boundary, which is beneficial for high quality viscous
@ -72,13 +72,13 @@ actually the hexahedrons.
<ul> <ul>
<li><b>Name</b> - allows to define the name of the hypothesis.</li> <li><b>Name</b> - allows to define the name of the hypothesis.</li>
<li><b>Total thicknes</b> - gives total thickness of layers of prisms.</li> <li><b>Total thicknes</b> - gives the total thickness of prism layers.</li>
<li><b>Number of layers</b> - defines number of layers of prisms.</li> <li><b>Number of layers</b> - defines the number of prism layers.</li>
<li><b>Stretch factor</b> - defines factor of growth of height of <li><b>Stretch factor</b> - defines the growth factor of prism height
prisms from the mesh boundary towards inside of mesh.</li> from the mesh boundary inwards.</li>
<li><b>Faces without layers</b> - defines geometrical faces on which <li><b>Faces without layers</b> - defines geometrical faces on which
layers of prisms should not be constructed. By default the layers of prism layers should not be constructed. By default the prism layers
prisms are not constructed on geometrical faces shared by solids.</li> are not constructed on geometrical faces shared by solids.</li>
</ul> </ul>
\image html viscous_layers_mesh.png A group containing viscous layer prisms. \image html viscous_layers_mesh.png A group containing viscous layer prisms.

View File

@ -247,38 +247,56 @@ In order to compute the mean of several values, the arithmetic mean is used by d
More specific size maps can be defined on faces. More specific size maps can be defined on faces.
<ul> <ul>
<li> <i> Attractors </i> allow to define the size of the mesh elements on a face so that the mesh is the finest on the attractor shape and becomes coarser when getting far from this shape. <li> <i> Attractors </i> allow to define the size of the mesh elements
on a face so that the mesh is the finest on the attractor shape and
becomes coarser when getting far from this shape.
<ul> <ul>
<li> The selected attractor can be a Vertex, an Edge, a Wire or a Compound mixing several entities of those types.</li> <li> The selected attractor can be a Vertex, an Edge, a Wire or a
Compound mixing several entities of those types.</li>
<li> The attractor doesn't have to be a sub-shape of the shape to mesh.</li> <li> The attractor doesn't have to be a sub-shape of the shape to mesh.</li>
<li> The size will grow exponentially (see formula below) but is bounded by gradation, \n so if you want the formula to be strictly respected, you should set the <i>gradation</i> <li> The size will grow exponentially (see the formula below) but is
bounded by gradation, \n so if you want the formula to be strictly
respected, you should set the <i>gradation</i>
to its maximum (2.5) in the <i>arguments</i> tab. to its maximum (2.5) in the <i>arguments</i> tab.
</ul> </ul>
\n \n
<li> Furthermore you can choose to <i> keep the size constant </i> until a certain distance from a shape. This option can be combined or not with an <i>attractor</i> size map described above. <li> Furthermore you can choose to <i> keep the size constant </i>
until a certain distance from a shape. This option can be combined or
not with an <i>attractor</i> size map described above.
<ul> <ul>
<li> If the two options are combined the size will remain constant until the distant specified in "constant over" and grow then as prescribed by the attractor function.</li> <li> If the two options are combined the size will remain constant
<li> Else the growing is only controled by the standard arguments of BLSURF (gradation ...).</li> until the distance specified in "constant over" and grow then as
prescribed by the attractor function.</li>
<li> Else the growing is only controled by the standard arguments of
BLSURF (gradation ...).</li>
</ul> </ul>
</ul> </ul>
\image html blsurf_attractors2.png "Example of mesh created using attractors, the attractors here are the side edges and the size grow from the side of the surface towards the apex" \image html blsurf_attractors2.png "Example of mesh created using
attractors, the attractors here are the side edges and the size grows
from the side of the surface towards the apex"
\n \n
\image html blsurf_const_size_near_shape2.png "Example of size map with constant size option, the size is kept constant on the left side of the surface until a certain distance" \image html blsurf_const_size_near_shape2.png "Example of size map
with constant size option, the size is kept constant on the left side
of the surface until a certain distance"
\n \n
Remark : The validation of the hypothesis might take a few seconds if attractors are defined or the "constant size" option is used because a map of distances has to be built on the whole surface for each face where such an hypothesis has been defined. Remark : The validation of the hypothesis might take a few seconds if
attractors are defined or the "constant size" option is used because a
map of distances has to be built on the whole surface for each face
where such a hypothesis has been defined.
<br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including size map. <br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including size map.
\anchor blsurf_attractor_computation \anchor blsurf_attractor_computation
<h2>Computation of attractors</h2> <h2>Computation of attractors</h2>
\n \n
The size grow exponentially following the equation : h(d) = User size + (h_start - User Size) * exp( -(d / R)^2 ). The size grows exponentially following the equation : h(d) = User size + (h_start - User Size) * exp( -(d / R)^2 ).
\n \n
Where : Where :
<ul> <ul>
<li>h_start is the desired size on the given attractor shape</li> <li>h_start is the desired size on the given attractor shape</li>
<li>d is the distance of the current point from the attractor shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed) </li> <li>d is the distance of the current point from the attractor
shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed) </li>
<li>R is called the distance of influence and allows controlling the growth rate of the mesh </li> <li>R is called the distance of influence and allows controlling the growth rate of the mesh </li>
</ul> </ul>

View File

@ -52,7 +52,7 @@ The use of additional hypotheses is optional (i.e. you may leave
Proceed in the same way with 2d and 3d Algorithms and Hypotheses, note Proceed in the same way with 2d and 3d Algorithms and Hypotheses, note
that the choice of hypotheses depends on the algorithm. There must be that the choice of hypotheses depends on the algorithm. There must be
one Algorithm and zero or several Hypotheses for each dimension of your one Algorithm and zero or several Hypotheses for each dimension of your
object (most of the standard 2D and 3D algorithms can work without object (most standard 2D and 3D algorithms can work without
hypotheses using some default parameters), hypotheses using some default parameters),
otherwise you will not get any mesh at all. Of course, if you otherwise you will not get any mesh at all. Of course, if you
wish to mesh a face, which is a 2d object, you don't need to define 3d wish to mesh a face, which is a 2d object, you don't need to define 3d
@ -74,11 +74,11 @@ algorithms applied to the construction of the mesh.</li>
There is an alternative way to create a mesh on an object simply by There is an alternative way to create a mesh on an object simply by
clicking <b>Assign a set of hypotheses</b> button and selecting among clicking <b>Assign a set of hypotheses</b> button and selecting among
pre-defined sets of hypotheses. In addition to the standard pre-defined sets of hypotheses. In addition to the standard
sets of hypotheses, one can create his own sets by creating sets of hypotheses, it is possible to create custom sets by editing
CustomMeshers.xml file located in the home directory. CustomMeshers.xml CustomMeshers.xml file located in the home directory. CustomMeshers.xml
file must describe sets of hypotheses the file must describe sets of hypotheses in the
same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml
file does (hypotheses sets are enclosed between <hypotheses-set-group> file does (sets of hypotheses are enclosed between <hypotheses-set-group>
tags). tags).
\image html hypo_sets.png \image html hypo_sets.png
<center>List of sets of hypotheses: <em>[custom]</em> is automatically added to the sets defined <center>List of sets of hypotheses: <em>[custom]</em> is automatically added to the sets defined

View File

@ -2,11 +2,11 @@
\page convert_to_from_quadratic_mesh_page Convert to/from Quadratic Mesh \page convert_to_from_quadratic_mesh_page Convert to/from Quadratic Mesh
\n This functionality allows you to transtorm standard meshes (or \n This functionality allows transforming standard meshes (or
sum-mesh) to quadratic and vice versa. sub-meshes) to quadratic and vice versa.
See \ref adding_quadratic_elements_page "Adding quadratic elements" See \ref adding_quadratic_elements_page "Adding quadratic elements"
for more information about quadratic meshes. for more information about quadratic meshes.
Note that conversion of the sub-mesh most probably will Note that conversion of a sub-mesh most probably will
produce a non-conformal mesh. Elements on the boundary between produce a non-conformal mesh. Elements on the boundary between
quadratic and linear sub-meshes become (or remain) quadratic. quadratic and linear sub-meshes become (or remain) quadratic.
@ -14,8 +14,8 @@ quadratic and linear sub-meshes become (or remain) quadratic.
<ol> <ol>
<li>Select a mesh or a sub-mesh in the Object Browser or in the <li>Select a mesh or a sub-mesh in the Object Browser or in the
Viewer.</li> Viewer.</li>
<li>From the Modification menu choose the Convert to/from Quadratic <li>From the Modification menu choose <b> Convert to/from Quadratic
Mesh item, or click <em>"Convert to/from quadratic"</em> button in the Mesh item </b>, or click <em>"Convert to/from quadratic"</em> button in the
toolbar. toolbar.
\image html image154.png \image html image154.png
@ -26,18 +26,17 @@ The following dialog box will appear:
\image html convert.png \image html convert.png
</li> </li>
<li>In this dialog box you should specify: <li>In this dialog box specify:
<ul> <ul>
<li>if you wish to convert a standard mesh to quadratic or a quadratic <li>if it is necessary to convert a standard mesh to quadratic or a quadratic
mesh to standard. Note that the choice is available only if the selected mesh mesh to standard. Note that the choice is available only if the selected mesh
(or sub-mesh) contains both quadratic and linear elements, else the (or sub-mesh) contains both quadratic and linear elements, else the
sole direction of convertion is automatically selected.</li> direction of conversion is selected automatically.</li>
<li>if you wish to place medium nodes of the quadratic mesh on the <li>if it is necessary to place medium nodes of the quadratic mesh on the
geometry (meshed object). This option is active at convertion to geometry (meshed object). This option is relevant for conversion to
qudratic mesh only and provided that the mesh is based on some quadratic provided that the mesh is based on a geometry (not imported from file).</li>
geometry (not imported from the file).</li>
</ul> </ul>
\image html image156.gif \image html image156.gif

View File

@ -2,8 +2,8 @@
\page cut_mesh_by_plane_page Cut a tetrahedron mesh by a plane \page cut_mesh_by_plane_page Cut a tetrahedron mesh by a plane
\n MeshCut works only on Med files and produces Med files, and is a standalone program. \n MeshCut works only with MED files and produces MED files, and is a standalone program.
It can be used either directly on a shell command outside SALOME, or with a GUI interface in SMESH, It can be used either directly from a command shell outside SALOME, or with a GUI interface in SMESH,
provided in a python plugin that needs to be installed in your SALOME application. provided in a python plugin that needs to be installed in your SALOME application.
\n MeshCut allows to cut a mesh constituted of linear tetrahedrons by a plane. \n MeshCut allows to cut a mesh constituted of linear tetrahedrons by a plane.
@ -31,20 +31,21 @@ MeshCut input.med output.med resuMeshName aboveGroup belowGroup nx ny nz px py p
\n nx ny nz = vector normal to the cut plane \n nx ny nz = vector normal to the cut plane
\n px py pz = a point of the cut plane \n px py pz = a point of the cut plane
\n T = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to \n T = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to
\n the cut plane if their distance to the plane is inferior to L*T \n the cut plane if their distance from the plane is inferior to L*T,
\n where L is the mean edge size of the tetrahedron \n where L is the mean edge size of the tetrahedron
<br> <br>
\anchor meshcut_plugin \anchor meshcut_plugin
<h2>Using MeshCut inside SALOME</h2> <h2>Using MeshCut inside SALOME</h2>
When the MeshCut plugin is installed, you will find it in the Mesh menu, sub-menu SMESH_plugins. When the MeshCut plugin is installed, it can be found in the Mesh menu, sub-menu SMESH_plugins.
\n If the plugin is not installed, look for a file named meshcut_plugin.py in your SMESH installation. \n If the plugin is not installed, the file meshcut_plugin.py is in
The file is normally in the subdirectory bin/salome/meshcut_plugin.py. SMESH installation in subdirectory bin/salome/meshcut_plugin.py.
\n If you already have plugins defined in a smesh_plugins.py file, add this file at the end. \n If there are already plugins defined in a smesh_plugins.py file,
if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py this file should be added at the end.
or in your ${PLUGINPATH} Directory. if not, copied as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
or in ${PLUGINPATH} Directory.
<li>From the Mesh menu, sub-menu SMESH_plugins, choose "MeshCut" item <li>From the Mesh menu, sub-menu SMESH_plugins, choose "MeshCut" item
The following dialog box will appear: The following dialog box will appear:

View File

@ -7,6 +7,6 @@ allow to generate flat volume elements on the boundaries of a list
of groups of volumes, or on a list of groups of faces. of groups of volumes, or on a list of groups of faces.
\n These functionalities are only available in python scripts. \n These functionalities are only available in python scripts.
<br><b>See </b> a sample TUI Script of a \ref tui_double_nodes_on_group_boundaries "Generate flat elements" operations. <br><b>See </b> a sample TUI Script of \ref tui_double_nodes_on_group_boundaries "Generate flat elements" operation.
*/ */

View File

@ -139,5 +139,6 @@ the following links:
- \subpage tui_transforming_meshes_page - \subpage tui_transforming_meshes_page
- \subpage tui_notebook_smesh_page - \subpage tui_notebook_smesh_page
- \subpage tui_measurements_page - \subpage tui_measurements_page
- \subpage tui_generate_flat_elements_page
*/ */

View File

@ -38,11 +38,11 @@ ghs3dMesh.Compute()
# - the coordinates x,y,z # - the coordinates x,y,z
# - a GEOM vertex or compound (No geometry, TUI only) # - a GEOM vertex or compound (No geometry, TUI only)
# #
# The enforced nodes created can also be stored in # The created enforced nodes can also be stored in
# a group (No geometry, TUI only). # a group (No geometry, TUI only).
# Ex1: Add 1 enforced vertices by coords at (50,50,100) # Ex1: Add one enforced vertex with coordinates (50,50,100)
# with a physical size of 2 # and physical size 2.
import geompy import geompy
import smesh import smesh
@ -73,10 +73,10 @@ GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2) # no group
ghs3dMesh.Compute() ghs3dMesh.Compute()
# Ex2: Add 1 enforced vertices by GEOM vertex at (50,50,100) # Ex2: Add one vertex enforced by a GEOM vertex at (50,50,100)
# with a physical size of 5 and add it to a group called "My special nodes" # with physical size 5 and add it to a group called "My special nodes"
# Create another GHS3D hypothesis and assign it to the mesh wo geometry # Create another GHS3D hypothesis and assign it to the mesh without geometry
GHS3D_Parameters_wo_geometry = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') GHS3D_Parameters_wo_geometry = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine')
ghs3dMesh_wo_geometry.AddHypothesis( GHS3D ) ghs3dMesh_wo_geometry.AddHypothesis( GHS3D )
ghs3dMesh_wo_geometry.AddHypothesis( GHS3D_Parameters_wo_geometry ) ghs3dMesh_wo_geometry.AddHypothesis( GHS3D_Parameters_wo_geometry )
@ -104,8 +104,8 @@ GHS3D_Parameters.ClearEnforcedVertices()
\code \code
# It is possible to constraint GHS3D with another mesh or group. # It is possible to constrain GHS3D with another mesh or group.
# The constraint can be the nodes, edges or faces. # The constraint can refer to the nodes, edges or faces.
# This feature is available only in TUI, on meshes without geometry. # This feature is available only in TUI, on meshes without geometry.
# The constraining elements are called enforced elements for the mesh. # The constraining elements are called enforced elements for the mesh.
# They can be recovered using groups if necessary. # They can be recovered using groups if necessary.
@ -133,7 +133,7 @@ geompy.addToStudy( p1, "p1" )
geompy.addToStudy( p2, "p2" ) geompy.addToStudy( p2, "p2" )
geompy.addToStudy( c, "c" ) geompy.addToStudy( c, "c" )
# Create the 2D algo and hypothesis # Create the 2D algorithm and hypothesis
BLSURF = smesh.CreateHypothesis('BLSURF', 'BLSURFEngine') BLSURF = smesh.CreateHypothesis('BLSURF', 'BLSURFEngine')
# For the box # For the box
BLSURF_Parameters = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') BLSURF_Parameters = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine')
@ -143,7 +143,7 @@ BLSURF_Parameters.SetPhySize( 200 )
BLSURF_Parameters2 = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine') BLSURF_Parameters2 = smesh.CreateHypothesis('BLSURF_Parameters', 'BLSURFEngine')
BLSURF_Parameters2.SetGeometricMesh( 1 ) BLSURF_Parameters2.SetGeometricMesh( 1 )
# Create the 3D algo and hypothesis # Create the 3D algorithm and hypothesis
GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine') GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine')
GHS3D_Parameters_node = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine') GHS3D_Parameters_node = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine')
#GHS3D_Parameters_node.SetToMeshHoles( 1 ) #GHS3D_Parameters_node.SetToMeshHoles( 1 )
@ -173,7 +173,7 @@ Mesh_box_tri.AddHypothesis( BLSURF_Parameters )
Mesh_box_tri.Compute() Mesh_box_tri.Compute()
# Create 4 copies of the 2D mesh to test the 3 types of contraints (NODE, EDGE, FACE) # Create 4 copies of the 2D mesh to test the 3 types of contraints (NODE, EDGE, FACE)
# from a whole mesh and from groups of elements. # from the whole mesh and from groups of elements.
# Then the 3D algo and hypothesis are assigned to them. # Then the 3D algo and hypothesis are assigned to them.
mesh_mesh = smesh.CopyMesh( Mesh_box_tri, 'Enforced by faces of mesh', 0, 0) mesh_mesh = smesh.CopyMesh( Mesh_box_tri, 'Enforced by faces of mesh', 0, 0)
@ -213,4 +213,4 @@ mesh_mesh.Compute()
\image html ghs3d_screenshot_enf5.png \image html ghs3d_screenshot_enf5.png
\image html ghs3d_screenshot_enf6.png \image html ghs3d_screenshot_enf6.png
*/ */

View File

@ -7,10 +7,10 @@
<h2>Double nodes on groups boundaries</h2> <h2>Double nodes on groups boundaries</h2>
\n Double nodes on shared faces between groups of volumes and create flat elements on demand. \n Double nodes on shared faces between groups of volumes and create flat elements on demand.
\n The list of groups must describe a partition of the mesh volumes.The nodes of the internal \n The list of groups must describe a partition of the mesh volumes. The nodes of the internal
faces at the boundaries of the groups are doubled. In option, the internal faces are replaced faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced
by flat elements. by flat elements.
\n Triangles are transformed in prisms, and quadrangles in hexahedrons. \n Triangles are transformed into prisms, and quadrangles into hexahedrons.
\n The flat elements are stored in groups of volumes. \n The flat elements are stored in groups of volumes.
\n \n
@ -37,7 +37,7 @@ Partition_1 = geompy.MakePartition([Fuse_1], [Cylinder_1], [], [], geompy.ShapeT
[Solid_1,Solid_2,Solid_3] = geompy.SubShapes(Partition_1, [53, 2, 30]) [Solid_1,Solid_2,Solid_3] = geompy.SubShapes(Partition_1, [53, 2, 30])
[Face_1,Face_2] = geompy.SubShapes(Partition_1, [37, 20]) [Face_1,Face_2] = geompy.SubShapes(Partition_1, [37, 20])
# meshing (linear tetrahedrons here, but other elements are OK) # meshing (linear tetrahedrons are here, but other elements are OK)
Mesh_1 = smesh.Mesh(Partition_1) Mesh_1 = smesh.Mesh(Partition_1)
BLSURF = Mesh_1.Triangle(algo=smesh.BLSURF) BLSURF = Mesh_1.Triangle(algo=smesh.BLSURF)
@ -61,7 +61,7 @@ Face_2_1 = Mesh_1.GroupOnGeom(Face_2,'Face_2',SMESH.FACE)
\n Here, the 3 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1] constitute a partition of the mesh. \n Here, the 3 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1] constitute a partition of the mesh.
The flat elements on group boundaries and on faces are built with the following code. The flat elements on group boundaries and on faces are built with the following code.
\n If the last argument (boolean) in DoubleNodesOnGroupBoundaries is set to 1, \n If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
the flat elements are built, otherwise, there is only a duplication of the nodes. the flat elements are built, otherwise, there is only a duplication of the nodes.
\code \code
@ -70,6 +70,6 @@ Mesh_1.DoubleNodesOnGroupBoundaries([Solid_1_1, Solid_2_1, Solid_3_1], 1)
Mesh_1.CreateFlatElementsOnFacesGroups([Face_1_1, Face_2_1]) Mesh_1.CreateFlatElementsOnFacesGroups([Face_1_1, Face_2_1])
\endcode \endcode
\n To observe the flat element groups, save the resulting mesh on a Med file and reload it. \n To observe flat element groups, save the resulting mesh on a MED file and reload it.
*/ */