]> SALOME platform Git repositories - modules/homard.git/blob - doc/en/gui_create_yacs.rst
Salome HOME
Documentation sur les schémas YACS
[modules/homard.git] / doc / en / gui_create_yacs.rst
1 .. _gui_create_yacs:
2
3 The schema YACS
4 ###############
5 .. index:: single: YACS
6 .. index:: single: case
7
8 The object YACS contains every definition that allows the creation of a schema. This schema will drive the alternation of the computation of a physical modelization over a mesh and the adaptation of the mesh for the computation. This alternation is driven by some criteria for the convergence.
9
10 .. note::
11   To read an exhaustive description of any part of the schema, see :ref:`yacs`
12
13 Procedure
14 *********
15 The automatic creation of the schema is going to be made in three phases.
16
17 - At first, it is necessary to have done a calculation on the very first mesh. This calculation will have produced the results in a MED file.
18 - Then, a case is created in the module HOMARD, as described in :ref:`gui_create_case`. In this case, we create the following iteration of the mesh by defining a hypothesis of adaptation ; see :ref:`gui_create_iteration`.
19 - Last, from this case, a schema will be created, based on the hypothesis for the adaptation.
20
21
22 .. image:: images/create_yacs_01.png
23    :align: center
24    :alt: yacs - creation
25    :width: 516
26    :height: 295
27
28 Name of the schema
29 ******************
30 A name of schema is automatically proposed: YACS_1, YACS_2, etc. This name can be modified. He must not have been already used for another schema.
31
32 The script
33 **********
34
35 The file containing the script which allows to launch the calculation connected to the physical modelling is supplied here. It is a script python who has to respect the following rules:
36
37 - the name of the class which manages the calculation is ``Script``
38 - to launch the calculation is made by the method``Compute()``
39 - the result of the calculation is under the shape of three variables: the code of error, a message, a dictionary python.
40
41 If they are necessary for the creation of the class, we can supply arguments under the shape:
42
43 - ``--rep_calc=rep_calc``, where ``rep_calc`` is the directory for the computation
44 - ``--num=num``, where ``num`` eis the number of calculation : 0 for the very first calculation, then 1, 2 etc.
45 - ``--mesh_file=meshfile``, where ``meshfile`` is the file that contains the mesh for the computation
46 - ``-v``, for the messages
47
48 In return:
49
50 - ``error`` : the error code, integer: 0 if it was correct, non 0 if not
51 - ``message`` : a possible message of information about the calculation
52 - ``dico_resu`` : a dictionary python that contains at less the two following keys: ``FileName`` is the key for the name of the MED file which contains the results of the calculation, ``V_TEST`` is the key for the real value to be tested.
53
54
55
56 Example for the script:
57 ::
58
59     argu = ["--rep_calc=" + rep_calc)]
60     argu.append("--num=%d" % numCalc)
61     argu.append("--mesh_file="  + MeshFile)
62     Script_A = Script(argu)
63     error, message, dico_resu = Script_A.compute ()
64
65 .. note::
66
67   * To drive Code_Aster : :download:`ScriptAster<../files/yacs_script.py>`
68
69 The directory
70 *************
71 The directory will countain all the files producted by the computations. By default, nothing is suggested. The choice is made either by giving a name into the text zone or by a selection through the search window.
72
73 The initial mesh
74 ****************
75 The initial mesh must be stored into a MED file. It is the very first mesh that is used to solve the physical problem. The name of the file is choosen either by giving a name into the text zone or by a selection through the search window.
76
77 The type of the schema
78 **********************
79 Two types of schemas are proposed: constant or variable.
80
81 The default choice, 'constant', alternate a computation that is always the same and a mesh adaptation: from a computation to another one, the only part that is changed is the mesh. All the rest is identical. For example, in case the calculation would model a transient phenomenon, it is always the completeness of the transient phenomenon that is taken into account.
82
83 The option 'variable' is inactive today.
84
85 Corresponding python functions
86 ******************************
87 Look :ref:`tui_create_yacs`
88