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
19 #---------------------------------
\r
20 Equation = PROC (nom="Equation",
\r
22 #---------------------------------
\r
23 Equation_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base") ),
\r
24 Equation_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show equation database", "Equation creation"),),
\r
26 # ---------------------------------------------------------------------------
\r
27 b_type_show = BLOC(condition = " Equation_Type == 'Show equation database'",
\r
28 # ---------------------------------------------------------------------------
\r
29 Equation_Liste=SIMP(statut= 'o',typ= 'TXM', into=('reaction_type','aging_type')),
\r
31 b_reaction_type = BLOC(condition = " Equation_Liste == 'reaction_type'",
\r
32 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=monDico['Equation_Liste'],siValide=lienDB.recupereDicoEquation),
\r
33 ), # Fin b_reaction_type
\r
35 b_aging_type = BLOC(condition = " Equation_Liste == 'aging_type'",
\r
36 Equation_reaction=SIMP(statut= 'o',typ= 'TXM', into=('All', 'thermo', 'radio'),siValide=lienDB.recupereDicoEquation),
\r
37 ), # Fin b_reaction_type
\r
39 ListeEquation = SIMP(statut='o', typ='TXM', homo='SansOrdreNiDoublon',siValide=lienDB.afficheValeurEquation),
\r
40 b_modification = BLOC(condition = " ListeEquation != None ",
\r
41 modification = SIMP(typ = bool, statut = 'o',defaut = False, fr='toto', ang='toto en anglais', siValide=lienDB.instancieChemicalFormulation),
\r
43 b_modif = BLOC(condition = "modification == True",
\r
44 Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),
\r
45 Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),
\r
46 ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),
\r
48 OptionnelConstituant = FACT ( statut = 'f',max = '**',
\r
49 Constituant = SIMP (statut = 'o', typ = 'TXM'),
\r
50 Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),
\r
52 OptionnelleConstante = FACT (statut = 'f', max = '**',
\r
53 ConstanteName= SIMP (statut = 'o', typ = 'TXM',),
\r
54 ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
55 ),# fin ConstanteOptionnelle
\r
56 Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),
\r
60 ), # fin b_modification
\r
61 ), # Fin b_type_show
\r
64 # ---------------------------------------------------------------------------
\r
65 b_type_creation = BLOC(condition = " Equation_Type == 'Equation creation'",
\r
66 # ---------------------------------------------------------------------------
\r
67 Equation_Modification = FACT ( statut = 'o',
\r
69 ChemicalFormulation = SIMP(statut='o', typ='TXM', defaut = 'POOH -> 2P'),
\r
71 Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],),
\r
72 Aging_Type=SIMP(statut= 'o',typ= 'TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'),),
\r
74 Constituants = FACT ( statut = 'o',
\r
75 ConstituantPOOH = SIMP (statut = 'f', typ = 'TXM', into = ('POOH',)),
\r
76 b_pooh = BLOC(condition = " ConstituantPOOH == 'POOH'" ,
\r
77 Differential_Equation_POOH = SIMP(statut= 'o',typ= 'TXM', defaut = '-ku1*POOH'),
\r
79 #ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',)),
\r
80 #b_p = BLOC(condition = " ConstituantP == 'P'" ,
\r
81 # Differential_Equation_P = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),
\r
83 ConstituantP = FACT ( statut = 'f',
\r
84 ConstituantP = SIMP (statut = 'f', typ = 'TXM', into = ('P',)),
\r
85 Differential_Equation_P = SIMP(statut= 'o',typ= 'TXM', defaut = '2*ku1*POOH'),
\r
86 ), # Fin ConstituantP
\r
88 OptionnelConstituant = FACT ( statut = 'f',max = '**',
\r
89 Constituant = SIMP (statut = 'o', typ = 'TXM'),
\r
90 Differential_Equation = SIMP(statut= 'o',typ= 'TXM'),
\r
92 ),# Fin Constituants
\r
94 Constante = FACT ( statut = 'o',
\r
95 Constanteku1 = SIMP (statut = 'f', typ = 'TXM', into = ('ku1',), defaut= 'ku1'),
\r
96 b_cku1 = BLOC(condition = "Constanteku1 == 'ku1'" ,
\r
97 ConstanteType = SIMP(statut= 'o',typ= 'TXM', into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
99 OptionnelleConstante = FACT (statut = 'f', max = '**',
\r
100 ConstanteName= SIMP (statut = 'o', typ = 'TXM',),
\r
101 ConstanteType = SIMP(statut= 'o',typ= 'TXM', min=1,into=('Arrhenius type','non Arrhenius type'),defaut='Arrhenius type'),
\r
102 ),# fin ConstanteOptionnelle
\r
104 Commentaire = SIMP (statut = 'f', typ = 'TXM', defaut = ' '),
\r
106 ), # Fin Equation_Modification
\r
107 ), # fin b_type_creation
\r
112 #---------------------------------
\r
113 Modele = PROC (nom="Modele",
\r
115 Modele_DB=SIMP(statut= 'o',typ= 'TXM', into=("Approved data base", "My data base"),siValide=lienDB.recupereDicoModele ),
\r
116 Modele_Type = SIMP(statut= 'o',typ= 'TXM', into=("Show modele database", "Modele creation"),siValide=lienDB.creeListeEquation),
\r
117 # ---------------------------------------------------------------------------
\r
118 b_type_creation = BLOC(condition = " Modele_Type == 'Modele creation'",
\r
119 # ---------------------------------------------------------------------------
\r
120 technicalUse= SIMP(statut= 'o',typ= 'TXM',into=monDico['Modele_TechnicalUse'],defaut=monModele.technical_use ),
\r
121 modeleName=SIMP(statut='o',typ='TXM',defaut=monModele.nom,),
\r
122 material=SIMP(statut='o',typ='TXM',defaut=monModele.materiaux[0],),
\r
123 stabilizer = SIMP(typ = bool, statut = 'o',defaut = monModele.stabilise),
\r
124 model_developed_by_for_EDF = SIMP(typ = bool, statut = 'o',defaut = monModele.dvt_EDF[0]),
\r
125 documentation=SIMP(statut='o',typ='TXM',defaut=monModele.reference,),
\r
127 # ajouter la liste des equations et le remove (il faut garder ceux qu on a enlever)
\r
130 AjoutEquation=SIMP(statut= 'o',typ= bool, defaut=False, siValide=lienDB.recupereModeleEquation),
\r
131 b_ajout_equation = BLOC(condition = " AjoutEquation == True",
\r
132 listeEquation_initiation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
133 listeEquation_propagation=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
134 listeEquation_termination=SIMP(statut='o', typ='TXM',homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
135 listeEquation_stabilization=SIMP(statut='o',typ='TXM', homo='SansOrdreNiDoublon', max='**', min=0, defaut=[] ),
\r
136 ),# fin b_ajout_equation
\r
138 # coefficients monModele.coef = liste de dictionnaire mais il faut prendre que le 0
\r
139 # on enleve ceux qui commence par D, S et B(casse imprtante)
\r
140 # la clef est le coef, puis les valeurs
\r
142 Aging_Type=SIMP(statut= 'o',typ='TXM', min=1,max='**', homo='SansOrdreNiDoublon', into=('All', 'thermo', 'radio'), defaut=monModele.type_vieil),
\r
143 Diffusion = SIMP(typ = bool, statut = 'o',defaut = monModele.diffusion,siValide = lienDB.prepareDiffusion),
\r
145 b_diffusion = BLOC(condition = " Diffusion == True",
\r
146 #coefficients monModele.coef = liste de dictionnaire mais il faut prendre que le 0
\r
147 # on met ceux qui commence par D, S et pas les B ni les aitres( casse imprtante)
\r
148 listeProduitPourLaDiffusion=SIMP(statut='o', typ='TXM', max='**', min=1,homo='SansOrdreNiDoublon', into = monModele.param_ini.keys(),siValide=lienDB.ajouteDiffusion),
\r
149 ), # fin b_diffusion
\r
151 ), # fin b_type_creation
\r
154 #AjoutEquation=Fact(statut='f',
\r
155 # Reaction_Type=SIMP(statut= 'o',typ= 'TXM', min=1,into=monDico['Equation_Liste'],siValide=lienDB.recupereModeleEquation),
\r
156 #), # fin AjoutEquation
\r
158 Commentaire = SIMP (statut = 'f', typ = 'TXM'),
\r