Salome HOME
avoid compilation warnings
[modules/smesh.git] / src / Tools / padder / doc / input / padder_userguide.doc
index d92f85ef61b6835d041a64cc9e082f9266144b91..21a227997ace3079634793a5756de49ed1308880 100644 (file)
 -# \ref S2_PADDER
 -# \ref S3_PADDER
 
-\section S1_PADDER The PADDER Algorithm
-
-PADDER is an algorithm that creates a set of particules called a "discrete mesh".
-The particules are characterized by a location in space and a weight that can be considered
-as the radius of a sphere whose center is the location of the particule.
-
-Discrete meshes are typically used to modelize civil components in rapid dynamic
-computation problems (seisms, chocs). These components consists in concrete parts
-embedding steal bares for reinforcement. These parts are input to the algorithm
-as standard finite elements meshes. The cells of theses meshes drive the location
-and sizing of particules.
-
-In the med representation, a discrete mesh is described as MED_BALL elements.
-A MED_BALL element is defined by a location and a radius.
-
-\section S2_PADDER The PADDER SALOME plugin
-
-The PADDER algoritm is integrated in the module SMESH as a SALOME
-plugin. This section illustrates how to use this plugin to create a
-discrete mesh.
-
-In this example, we suppose that two standard meshes (Finite Elements
-Meshes) have been created and publish in the study to modelize the
-concrete part (here with the name "concrete") and the steal bars part
-(here with the name "ferrail"):
-
-\image html SMESH_spadder_start.png
-
-The PADDER plugin can be invoked from the SMESH plugins menu, as
-illustrated on the figure below:
-
-\image html SMESH_spadder_menu.png
-
-When you clic on the "PADDER mesher" item, the graphical interface of
-the PADDER plugin appears:
-
-\image html SMESH_spadder_plugindialog_start.png
-
-This interface invites you to specify input data by pressing the button
-"Input". This command opens the Input dialog box to specify the list
-of meshes and the type of the selected meshes (to be choosen between
-"concrete" or "steelbar" using the combobox on the right side of the
-input line):
-
-\image html SMESH_spadder_inputdialog_start.png
+\section S1_PADDER The SpherePadder Algorithm
+
+SpherePadder is a geometric algorithm that creates a set of rigid
+spherical particles of different sizes called a "discrete element
+mesh". The centroid positions of particles are randomly generated by a
+"disordering" technique described in [1] that provides a polydisperse
+assembly with a particular size distribution. The spheres are
+positioned or “padded” into a tetrahedral mesh, which must be
+generated first. As illustrated below, SpherePadder creates a Discrete
+Element (DE) assembly in seven steps (see [1] for details):
+
+\image html padder_image01.png
+
+In order to increase the density of the whole packing and to fill
+spheres in the gaps close to the mesh boundaries (created by removing
+boundary spheres), SpherePadder detect `void spaces' where new spheres
+could be added by applying a particular geometric procedure, using
+tetrahedra resulting from a tridimensional Delaunay triangulation
+built with the sphere centers. That triangulation is generated by
+using the CGAL library [2]. 
+
+DE meshes generated by SpherePadder algorithm are used in EUROPLEXUS
+fast dynamics software simulations [3] to model the discontinuous
+behaviour (fractures, fragmentation) of reinforced concrete structures
+under severe dynamic loads such as impacts or explosions. The
+characteristic size of elements does not have to be representative of
+concrete constituents, such as granulars or cement matrix, since the
+aim is to reproduce the dynamic behaviour of the simulated material at
+the macroscopic scale. 
+
+To generate DE mesh for a reinforced concrete structure, one should
+supply a single tetrahedral mesh for concrete and as many segment-type
+1D meshes as groups of steel reinforcement bars of different
+diameters. The size (length) of segment-type steel reinforcement
+elements should correspond to the modelled bar’s
+diameter. SpherePadder algorithm will create steel discrete elements
+by using the segment’s length as the DE diameter.
+
+Warning: The User should control that all steel bars of a given
+diameter in a mesh belong to the same mesh group, and that different
+steel bar groups do not use the same diameter.
+
+\image html padder_image02.png
+
+If steel mesh is not provided, a pure concrete DE mesh is generated.
+
+In MED representation, DE meshes are described by using MED_BALL type
+structural elements. Each MED_BALL element is defined by its centroid
+location and a diameter. 
+
+Written in C++, SpherePadder is free software licensed under the terms
+of the GNU General Public License. 
+
+Bibliography:
+- [1] J.-F.Jerier, V.Richefeu, D.Imbault, F.-V. Donzé, “Packing spherical discrete elements for large scale simulations”, Computer Methods in Applied Mechanics and Engineering 199 (2010) 1668–1676.
+- [2] CGAL, Computational Geometry Algorithms Library. https://gforge.inria.fr.
+- [3] EUROPLEXUS: a computer program for the finite element simulation of fluid–structure systems under transient dynamic loading. http://europlexus.jrc.ec.europa.eu, (User’s Manual).
+
+\section S2_PADDER The SpherePadder SALOME plugin
+
+The SpherePadder algorithm is implemented as an external software
+program. This external program is integrated in the SMESH module as a
+SALOME plugin that manage the execution of the SpherePadder program
+from within the SALOME framework. This section illustrates how to use
+this plugin to create a discrete element mesh.
+
+In this example, we consider a concrete piece with a single
+reinforcement bars group. Thus, two standard (Finite Element type)
+meshes have been created and published in the study, the first one
+named “concrete”, and second one named "ferrail", for the steel bars
+part: 
+
+\image html padder_image03.png
+
+The SpherePadder plugin can be activated in the SMESH plugins menu, as
+illustrated on the figure below: 
+
+\image html padder_image04.png
+
+When clicking on the "PADDER mesher" item, the graphical interface of
+the SpherePadder plugin appears:
+
+\image html padder_image05.png
+
+This interface invites you to specify input data by pressing the
+button "Input". This command opens the Input dialog box allowing to
+specify the list and the type of selected meshes (to be chosen between
+"concrete" and "steelbar" using the combobox on the right side of the
+input line): 
+
+\image html padder_image06.png
 
 In the figure below, the mesh with name "concrete" has been selected
-in the study and added in the list of input file as a "concrete
-mesh". You have to input the mesh in the dialog using the rounded
-arrow icon, then specify a group name (the name of the group of
-MED_BALL created for this mesh in the resulting mesh), and finnaly
-clic on the "Add" icon:
+in the study and added to the list of the input file as a "concrete
+mesh". First, you have to choose the mesh in the dialog box using the
+rounded arrow icon, then specify for this mesh a group name which will
+be published in the final DE mesh, and finally click on the "Add"
+icon: 
 
-\image html SMESH_spadder_inputdialog_concrete.png
+\image html padder_image07.png
 
 Then, the mesh with name "ferrail" is selected and added to the list
-as a "steelbar mesh":
+as a "steelbar mesh": 
 
-\image html SMESH_spadder_inputdialog_steelbar.png
+\image html padder_image08.png
 
-The input dialog box can be validated toreturn to the main plugin
-interface. The "Compute" button is now enable, indicating that the
-problem is ready to be computed:
+The input dialog box has to be validated to return to the main plugin
+interface. The "Compute" button is now enabled, indicating that the
+problem is ready to be computed: 
 
-\image html SMESH_spadder_plugindialog_compute_ready.png
+\image html padder_image09.png
 
-The command "Compute" start the job. The progression can be requested
-using the command "Refresh". In the figure below, the job is still
-running:
+The command "Compute" starts the job run. The progression can be
+requested using the command "Refresh". In the figure below, the job is
+still running: 
 
-\image html SMESH_spadder_plugindialog_compute_running.png
+\image html padder_image10.png
 
 Finally, the job is finished and the result is ready to be published
-in the SALOME study:
+in the SALOME study: 
+
+\image html padder_image11.png
 
-\image html SMESH_spadder_plugindialog_compute_finished.png
+Click on the button "Publish" to import the resulting MED file into
+SMESH and publish the resulting mesh in the SALOME study: 
 
-Clic on the command "Publish" to explicitly import the resulting med
-file in SMESH and published the resulting mesh in the SALOME study:
+\image html padder_image12.png
 
-\image html SMESH_spadder_plugindialog_published.png
+Note that the final ED mesh contains as many groups as the input
+meshes. Their names have been specified in the input dialog. For the
+moment, the DE mesh is shown as a set of points of equal size:
 
-Note that this mesh contains one group for each of the input mesh. A
-group with the name specified in the input dialog has been defined for
-the set of MED_BALL created from the corresponding input mesh:
+\image html padder_image13.png
 
-\image html SMESH_spadder_end.png
+In the next version, the PointSprite (sphere-like) mode will be used
+to show the MED_BALL elements with their real diameters. Then the
+above example should look like on the following capture (realized in
+module GEOM for illustration):
 
-\section S3_PADDER Configuring the plugin
+\image html padder_sphererendering.png
+
+\section S3_PADDER Configuring the SpherePadder SALOME plugin
 
 The configuration of the plugin consists in specifying the location of
-the padder executable program for each of the SALOME resource (at
-least for the localhost resource). This specification is done in the
-file padder.cfg, located in the plugin installation folder
-(i.e. <SMESH_ROOT_DIR>/plugins):
+the padder executable program (padder.exe) and its runtime environment
+file (padder.env). This configuration is automatically done at
+installation process of the SALOME plateform, on the basis of the
+environment variable PADDERHOME that localizes the installation root
+of the SpherePadder external program. This installation process
+creates a configuration file padder.cfg located in the folder
+\<SMESH_ROOT_DIR\>/share/salome/plugins/smesh, where \<SMESH_ROOT_DIR\> is
+the installation root directory of the SMESH module.
+
+In the case where you have to specify a different configuration than
+the generated configuration, you must edit the file padder.cfg. This
+file defines a list of computing resources, and at least a local
+resource (a padder program working on your local host), and a remote
+resource (a padder program working on a remote host):
 
 \code
 # This section specify the configurations to be used respectively for
@@ -135,5 +198,75 @@ binpath = /usr/local/bin/padder.exe
 envpath = /usr/local/share/envPadder.sh
 \endcode
 
-*/
+The resource labels (localhost and nepal in the above example) must
+correspond to existing computing resources of SALOME. These resources
+are specified in the SALOME configuration CatalogResources.xml,
+located at the root directory of your SALOME application. The
+resources catalog is supposed to contain at least the localhost
+resource of type 'ssh' defined as follow:
+
+\code
+<!DOCTYPE ResourcesCatalog>
+<resources>
+
+   <!-- Generic configuration that should works on every workstation -->
+   <machine name="localhost" hostname="localhost"
+            protocol="ssh" batch="ssh_batch"
+            memInMB="500" CPUFreqMHz="0" nbOfNodes="1" nbOfProcPerNode="1"/>
+
+</resources>
+\endcode
 
+Note that these SALOME computing resources can be graphically edited
+using the JOBMANAGER module (see JOBMANAGER documentation).
+
+The typical error message when trying to use the padder plugin while
+the localhost resource is not correctly defined is :
+
+\code
+ERR: the job with jobid = 0 can't be started
+ERR: No batchmanager for that cluster - Bad batch description of the resource"
+\endcode
+
+This error message is display in the graphical interface of the plugin
+when you request a computing of your mesh:
+
+\image html padder_error_noresource.png
+
+Another typical error when using the padder plugin is due to the ssh
+configuration between your client host and the execution host:
+
+\code
+ERR: the job with jobid = 0 can't be started
+ERR: Error of connection on remote host ! status = 65280
+\endcode
+
+This error message is display in the graphical interface of the plugin
+when you request a computing of your mesh:
+
+\image html padder_error_noconnection.png
+
+The underlying batch system for executing padder jobs is based on a
+ssh communication between the client local host and the execution host
+(see the protocol specified in the CatalogResources.xml file above),
+even if the executive host is your local host (i.e. the same as the
+client host). Then, a ssh connection must be configured so that the
+underlying batch system could work properly, even between your local
+host and itself. The configuration could be done using a set of
+instruction as follow in a shell terminal (see ssh documentation for
+details):
+
+\code 
+ssh-keygen
+ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<hostname>
+\endcode
+
+You can check the configuration by testing that you can connect to the
+host \<hostname\> with the login \<username\> without being asked a
+password:
+
+\code 
+ssh <username>@<hostname>
+\endcode
+
+*/