8 monDico= { 'Equation_Liste' : ('initiation', 'propagation', 'termination', 'stabilization'),
\r
9 'Modele_TechnicalUse' : ('cable', 'coating', 'pipes'),
\r
12 monModele=listesDB.sModele().monModele
\r
14 JdC = JDC_CATA(code='VP',
\r
20 #---------------------------------
\r
21 Equation = PROC (nom="Equation",
\r
23 #---------------------------------
\r
24 Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),
\r
25 Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),
\r
28 # ---------------------------------------------------------------------------
\r
29 b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",
\r
30 # ---------------------------------------------------------------------------
\r
31 Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),
\r
33 b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",
\r
34 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],siValide=lienDB.recupereDicoEquation),
\r
35 ), # Fin b_reaction_type
\r
37 b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",
\r
38 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),siValide=lienDB.recupereDicoEquation),
\r
39 ), # Fin b_reaction_type
\r
41 ListeEquation = SIMP(statut='o', typ='TXM', homo='SansOrdreNiDoublon',siValide=lienDB.afficheValeurEquation),
\r
42 b_modification = BLOC(condition = " ListeEquation != None ",
\r
43 modification = SIMP(typ = bool, statut = 'o',defaut = False, fr='toto', ang='toto en anglais', siValide=lienDB.instancieChemicalFormulation),
\r
45 b_modif = BLOC(condition = "modification == True",
\r
46 Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),
\r
47 Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),
\r
48 ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),
\r
50 OptionnelConstituant = FACT ( statut = 'f',max = '**',
\r
51 Constituant = SIMP (statut = 'o', typ = 'TXM'),
\r
52 Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),
\r
54 OptionnelleConstante = FACT (statut = 'f', max = '**',
\r
55 ConstanteName= SIMP (statut = 'o', typ = 'TXM',),
\r
56 ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
57 ),# fin ConstanteOptionnelle
\r
58 Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),
\r
62 ), # fin b_modification
\r
63 ), # Fin b_type_show
\r
66 # ---------------------------------------------------------------------------
\r
67 b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",
\r
68 # ---------------------------------------------------------------------------
\r
69 Equation_Modification = FACT ( statut = 'o',
\r
71 ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),
\r
73 Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),
\r
74 Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),
\r
76 Constituants = FACT ( statut = 'o',
\r
77 ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',)),
\r
78 b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,
\r
79 Differential_Equation_POOH = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),
\r
81 #ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',)),
\r
82 #b_p = BLOC(condition = " ConstituantP == 'P'" ,
\r
83 # Differential_Equation_P = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),
\r
85 ConstituantP = FACT ( statut = 'f',
\r
86 ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',)),
\r
87 Differential_Equation_P = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),
\r
88 ), # Fin ConstituantP
\r
90 OptionnelConstituant = FACT ( statut = 'f',max = '**',
\r
91 Constituant = SIMP (statut = 'o', typ = 'TXM'),
\r
92 Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),
\r
94 ),# Fin Constituants
\r
96 Constante = FACT ( statut = 'o',
\r
97 Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),
\r
98 b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,
\r
99 ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
101 OptionnelleConstante = FACT (statut = 'f', max = '**',
\r
102 ConstanteName= SIMP (statut = 'o', typ = 'TXM',),
\r
103 ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
104 ),# fin ConstanteOptionnelle
\r
106 Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),
\r
108 ), # Fin Equation_Modification
\r
109 ), # fin b_type_creation
\r
114 #---------------------------------
\r
115 Modele = PROC (nom="Modele",
\r
117 Modele_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base"),siValide=lienDB.recupereDicoModele ),
\r
118 Modele_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show modele database", "Modele creation"),siValide=lienDB.creeListeEquation),
\r
119 # ---------------------------------------------------------------------------
\r
120 b_type_creation = BLOC(condition = " Modele_Type == 'Modele creation'",
\r
121 # ---------------------------------------------------------------------------
\r
122 technicalUse= SIMP(statut= 'o',typ= 'TXM',into=monDico['Modele_TechnicalUse'],defaut=monModele.technical_use ),
\r
123 modeleName=SIMP(statut='o',typ='TXM',defaut=monModele.nom,),
\r
124 material=SIMP(statut='o',typ='TXM',defaut=monModele.materiaux[0],),
\r
125 stabilizer = SIMP(typ = bool, statut = 'o',defaut = monModele.stabilise),
\r
126 model_developed_by_for_EDF = SIMP(typ = bool, statut = 'o',defaut = monModele.dvt_EDF[0]),
\r
127 documentation=SIMP(statut='o',typ='TXM',defaut=monModele.reference,),
\r
129 # ajouter la liste des equations et le remove (il faut garder ceux qu on a enlever)
\r
132 AjoutEquation=SIMP(statut= 'o',typ= bool, defaut=False, siValide=lienDB.recupereModeleEquation),
\r
133 b_ajout_equation = BLOC(condition = " AjoutEquation == True",
\r
134 listeEquation_initiation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
135 listeEquation_propagation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
136 listeEquation_termination=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
137 listeEquation_stabilization=SIMP(statut='o',typ='TXM', homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
138 ),# fin b_ajout_equation
\r
140 # coefficients monModele.coef = liste de dictionnaire mais il faut prendre que le 0
\r
141 # on enleve ceux qui commence par D, S et B(casse imprtante)
\r
142 # la clef est le coef, puis les valeurs
\r
144 Aging_Type=SIMP(statut= 'o',typ='TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'), defaut=monModele.type_vieil),
\r
145 Diffusion = SIMP(typ = bool, statut = 'o',defaut = monModele.diffusion,siValide = lienDB.prepareDiffusion),
\r
147 b_diffusion = BLOC(condition = " Diffusion == True",
\r
148 #coefficients monModele.coef = liste de dictionnaire mais il faut prendre que le 0
\r
149 # on met ceux qui commence par D, S et pas les B ni les aitres( casse imprtante)
\r
150 listeProduitPourLaDiffusion=SIMP(statut='o', typ='TXM', max='**', min=1,homo='SansOrdreNiDoublon', into = monModele.param_ini.keys(),siValide=lienDB.ajouteDiffusion),
\r
151 ), # fin b_diffusion
\r
153 ), # fin b_type_creation
\r
156 #AjoutEquation=Fact(statut='f',
\r
157 # Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],siValide=lienDB.recupereModeleEquation),
\r
158 #), # fin AjoutEquation
\r
160 Commentaire = SIMP (statut = 'f', typ = 'TXM'),
\r