4 =====================================
\r
6 « Bloc Fissure » has a script mode which is very close to the :ref:`GUI <gui>`, in the sense that the same information is needed as input.This documentation aims at giving an example and explains how to generate a cracked mesh using a python script calling « Bloc Fissure » functions. There are several others functions available in « Bloc Fissure » but they are not documented in this documentation.
\r
8 The main command of « Bloc Fissure » is the casStandard function. It has a single argument which is a python dictionary with the following keys. All are mandatory parameters except those marked by /.
\r
10 +------------------------------------------------------------------------------------------------------------------+
\r
11 | Script parameters |
\r
12 +======================+===================================+=======================================================+
\r
13 | / **nomCas** | *[string, default=’casStandard’]* | Name of the problem |
\r
14 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
15 | **maillageSain** | *[string]* | Absolute address of the input structure 3D mesh |
\r
16 | | | in MED format |
\r
17 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
18 | **CAOFaceFissure** | *[string]* | Absolute address of the input crack geometry |
\r
19 | | | in XAO or BREP format |
\r
20 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
21 | **edgeFiss** | *[list of strings]* | List of edges group which define the crack front |
\r
22 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
23 | | *[list of integers]* | List of edges number which define the crack front |
\r
24 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
25 | **meshBrep** | *[list of 2 floats]* | List of two floats defining respectively minimum and |
\r
26 | | | maximum size of elements of the crack mesh |
\r
27 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
28 | **lgInfluence** | *[float]* | Length of influence - distance that defines the |
\r
29 | | | size of the extracted Box around the crack |
\r
30 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
31 | **rayonPipe** | *[float]* | Radius of the tore around the front |
\r
33 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
34 | / **lenSegPipe** | *[float, default=rayonPipe]* | Length of the segments of the tore along crack front |
\r
36 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
37 | **nbSegRad** | *[integer]* | Number of radial segment of the tore |
\r
39 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
40 | **nbSegCercle** | *[integer]* | Number of sectors of the tore |
\r
42 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
43 | **areteFaceFissure** | *[float]* | Mesh size of elements for the Box remeshing |
\r
45 +----------------------+-----------------------------------+-------------------------------------------------------+
\r
47 Geometrical parameters of the tore are illustrated :
\r
49 .. image:: images/parametres.png
\r
52 :alt: Geometrical parameters of the tore
\r
54 Different levels of verbose are available. The prints are located in the file ''LOGFILE''. Use one of this 4 optional functions to set verbose type:
\r
56 - / **setDebug(LOGFILE)**
\r
58 - / **setVerbose(LOGFILE)**
\r
60 - / **setRelease(LOGFILE)**
\r
62 - / **setUnitTests(LOGFILE)**
\r
64 **example to run in salome session**::
\r
66 from blocFissure import gmu
\r
67 from blocFissure.gmu import initLog
\r
68 initLog.setDebug("/tmp/blocFissure.log")
\r
70 from blocFissure.casStandard import casStandard
\r
72 dicoParams = dict(nomCas = 'cubeFiss',
\r
73 maillageSain = "/home/A123456/BF/cube.med",
\r
74 CAOFaceFissure = "/home/A123456/BF/fiss.xao",
\r
75 edgeFiss = ["Fond"],
\r
77 meshBrep = (5.,10.),
\r
82 areteFaceFissure = 5)
\r
84 execInstance = casStandard(dicoParams)
\r
86 newmesh = execInstance.maillageFissure
\r