From: Eric Fayolle Date: Thu, 31 Mar 2022 17:16:44 +0000 (+0200) Subject: Préparation de la version subtree pour RN avec la génération du .comm à partir du... X-Git-Tag: merge_uncertainty_odysee_1210~105 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=15fd04092cd9c715ccb5b834532cbec7b74c6ec0;p=tools%2Feficas.git Préparation de la version subtree pour RN avec la génération du .comm à partir du .xml --- diff --git a/Editeur/session.py b/Editeur/session.py index 7a415370..941904aa 100644 --- a/Editeur/session.py +++ b/Editeur/session.py @@ -265,7 +265,7 @@ def createparser(): help=tr("catalogue a utiliser")) parser.add_option(u"-o","--fichierOut", action="store", type="string",dest="fichierOut", - help=tr("nom du fichier xml genere")) + help=tr("nom du fichier xml/comm genere")) parser.add_option(u"-v","--label", action="store", type="string",dest="labelCode", help=tr("version de catalogue a utiliser")) @@ -279,7 +279,7 @@ def createparser(): parser.add_option(u"-x","--withXSD", action="store_true", dest="withXSD", default=False, - help=tr("construit le .xml en meme temps que le .comm")) + help=tr("active la gestion XSD/XML du noyau eficas")) parser.add_option(u"-a","--withEltAbstrait", action="store_true", dest="avecEltAbstrait", default=False, diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py index 38e06de9..52270980 100755 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2007-2021 EDF R&D # @@ -648,9 +648,9 @@ class X_compoFactoriseAmbigu(X_definition): if debug : print ('------------------------------------------ ') def fusionneDesMatrices(self,nomMC): - print ('______fusionneDesMatrices ', nomMC, ' dans : ', self) - print ('Pas d union des types complexes') - if debug : print (self.texteComplexe) + #print ('______fusionneDesMatrices ', nomMC, ' dans : ', self) + #print ('Pas d union des types complexes') + #if debug : print (self.texteComplexe) #self.texteComplexe = debutTypeSubstDsBlocFactorise.format(self.nomDuTypePyxb) self.texteComplexe +=debutChoiceDsBloc for mc in self.entites[nomMC]: @@ -982,7 +982,6 @@ class X_SIMP (X_definition): def dumpXsd(self, dansFactorisation=False, multiple=False, first=False, debug=False): #debug = True #if PourTraduction : print (self.nom) - if self.nom == 'test_simp_2_5' : debug = True if debug : print ('X_SIMP dumpXsd pour', self.nom, '___________________________') self.prepareDumpXSD() # si inUnion la comparaison est fausse : on cree le nomDuType @@ -1052,7 +1051,6 @@ class X_SIMP (X_definition): if self.max > 1 or self.max == '**' or self.max == float('inf') : txtDefaut="" for val in self.defaut : txtDefaut+=str(val) + " " - print (self.defaut, txtDefaut) # cela ne fonctionne pas tres bien. a revoir txtDefaut =txtDefaut[0:-1] if not('TXM' in (self.type)) : @@ -1253,7 +1251,6 @@ class X_SIMP (X_definition): # il faut ajouter les regles # il faut gerer les types tuple et fichier # on ne paut pas tester le type qui depend du cataloge - if self.nom == "assembly_list" : debug=True if hasattr(self.type[0], 'typElt') : if debug : print ( self.nom , 'est une matrice') self.suisUneMatrice = True @@ -1488,7 +1485,7 @@ class X_JDC_CATA : #import pprint #if (not PourTraduction) and (dico != {}) : pprint.pprint(dico) - print ('__________________________ decommenter pour le texteXSD________________________') + #print ('__________________________ decommenter pour le texteXSD________________________') #print (dico) #print (self.texteXSD) self.texteXSD += texteFin diff --git a/Efi2Xsd/MCAccasXML.py b/Efi2Xsd/MCAccasXML.py index 02bf2e81..8563bbe0 100755 --- a/Efi2Xsd/MCAccasXML.py +++ b/Efi2Xsd/MCAccasXML.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2007-2021 EDF R&D # diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index fef0bf17..308aa513 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2007-2021 EDF R&D # @@ -36,8 +36,11 @@ if ihmDir not in sys.path : sys.path.append(ihmDir) if ihmQTDir not in sys.path : sys.path.append(ihmQTDir) if editeurDir not in sys.path : sys.path.append(editeurDir) -if sys.version_info[0] < 3: - print("Must be using Python 3") +# if sys.version_info[0] < 3: +# print('----------- sys.executable : ',sys.executable,' --------------') +EFICAS_PYTHON_VERSION_MIN=30600 +if sys.version_info[0]*10000+sys.version_info[1]*100 < EFICAS_PYTHON_VERSION_MIN: + print("Must be using at least Python 3.6") sys.exit() def lanceEficas(code=None, multi=False, langue='en', labelCode=None): @@ -147,7 +150,7 @@ def genereComm(code=None): from .editorSsIhm import JDCEditorSsIhm if options.fichierOut == None : fichierCommOut=fichier[:fichier.rfind(".")]+'.comm' - else : fichierCommOut = fichierXMLOut + else : fichierCommOut = options.fichierOut monEditeur=JDCEditorSsIhm(monEficasSsIhm,fichier) # on ne sait lire que des xml valides monEditeur.pythonGenerator.gener(monEditeur.jdc,format = 'beautifie') diff --git a/InterfaceQT4/monBoutonValide.py b/InterfaceQT4/monBoutonValide.py index 12767af9..82f51392 100644 --- a/InterfaceQT4/monBoutonValide.py +++ b/InterfaceQT4/monBoutonValide.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2021 EDF R&D # diff --git a/InterfaceQT4/monLabelClic.py b/InterfaceQT4/monLabelClic.py index 9e998cb8..e92432df 100644 --- a/InterfaceQT4/monLabelClic.py +++ b/InterfaceQT4/monLabelClic.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2021 EDF R&D # diff --git a/InterfaceQT4/monWidgetMatrice.py b/InterfaceQT4/monWidgetMatrice.py index cb6f3cf1..14c6d2f0 100644 --- a/InterfaceQT4/monWidgetMatrice.py +++ b/InterfaceQT4/monWidgetMatrice.py @@ -105,7 +105,7 @@ class MonWidgetMatrice (Ui_desWidgetMatrice,Feuille): self.TBMatrice.setColumnCount(self.nbCols) self.TBMatrice.setRowCount(self.nbLigs) if self.nbLigs <15 : taille = 50 - else : taille = 30 + else : taille = 40 for i in range(self.nbLigs) : self.TBMatrice.setRowHeight(i,taille) for i in range(self.nbCols) : diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 6fc23c22..e92c4160 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2021 EDF R&D # diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 226d31c9..38656674 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -278,7 +278,7 @@ class ReaderCata (ReaderCataCommun): #print ('dans readerCata _________', dicoEltDif) except : - if self.appliEficas.ssIhm == False :print ('______________ poum import cata_genere ') + if self.appliEficas.ssIhm == False :print ('______________ unable to load xsd driver ') self.QWParent.informe('XSD driver', 'unable to load xsd driver',critique=False) modeleMetier = None diff --git a/ReacteurNumerique/GNUmakefile b/ReacteurNumerique/GNUmakefile index a7876cb0..d687de5e 100644 --- a/ReacteurNumerique/GNUmakefile +++ b/ReacteurNumerique/GNUmakefile @@ -48,7 +48,7 @@ $(eval $(call cata_dependencies,.xsd)) # $(subst .py,.xsd,cata_dependencies) cata_files= \ -cata_RN_EDG_PN.py +cata_RN_EDG.py cata_basename=$(cata_files:%.py=%) xsd_files = $(cata_files:%.py=%.xsd) @@ -126,7 +126,7 @@ testAll: exec.sh driverAll $(new_test_driver_py) $(new_test_driver_xml) ################# REGLES DE NETTOYAGE ######################## clean: - rm -f *.pyc *~ qtEficasSlm.sh exec.sh environ.sh + rm -f *.pyc *~ qtEficas.sh exec.sh environ.sh rm -rf raw binding.py __pycache__ rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml diff --git a/ReacteurNumerique/cata_RN_EDG.py b/ReacteurNumerique/cata_RN_EDG.py new file mode 100644 index 00000000..d1d389e5 --- /dev/null +++ b/ReacteurNumerique/cata_RN_EDG.py @@ -0,0 +1,820 @@ +# -*- coding: utf-8 -*- + +"""Definition of the data model used by the integration bench. + +Warnings +-------- +EFICAS will import this file as Python module with the ``__import__`` special +function so, this module must not use relative import. +""" +# pylint: disable=too-few-public-methods + +# TODO: Create a main object that point on the different subobjects and force its name + +# EFICAS +from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice +from Extensions.i18n import tr + +# Warning: The names of these variables are defined by EFICAS +JdC = JDC_CATA(code="RN_EDG") +VERSION_CATALOGUE = "V_0" + +# Define the minimum and the maximum number of elements (reflectors and fuel +# assemblies) on the core's side +NMIN_CORE_FUEL_ELTS = 1 +NMAX_CORE_FUEL_ELTS = 18 + +class Tuple: + """Organize the data into a fixed size tuple. + + Warnings + -------- + This class respect the EFICAS conventions. + """ + + def __init__(self, ntuple): + self.ntuple = ntuple + + def __convert__(self, valeur): + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): # pylint: disable=missing-function-docstring + return "Tuple de %s elements" % self.ntuple + + +class VerifPostTreatment(VerifTypeTuple): + """Validate the data comming from ``Scenario_data.post_processing``. + + Warnings + -------- + This class respect the EFICAS conventions. + """ + # pylint: disable=invalid-name + # pylint: disable=missing-function-docstring + # pylint: disable=no-self-use + + PHYSICS = ("Neutronics", "Thermalhydraulics") + FORMATS = ("MED", "SUM", "MIN", "MAX", "MEAN") + + def __init__(self): + super().__init__(("TXM", "TXM")) + self.cata_info = "" + + def info(self): + return tr(": vérifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait être de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait être de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + if ok < 0: + raise ValueError( + tr("%s devrait être dans %s ") % (valeur[1], self.FORMATS)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: # pylint: disable=bare-except + return 0 + return 1 + + def verifType(self, valeur): # pylint: disable=arguments-differ + ok = 0 + for v in valeur: + if isinstance(v, (bytes, str)): + ok += 1 + if ok == len(self.typeDesTuples): + if valeur[1] in self.FORMATS: + return 1 + return -1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class VerifNeutLib(VerifTypeTuple): + """Validate the data comming from ``Model_data.b_neutro_compo.library_map``. + + Warnings + -------- + This class respect the EFICAS conventions. + """ + # pylint: disable=invalid-name + # pylint: disable=no-self-use + # pylint: disable=missing-function-docstring + + def __init__(self): + super().__init__((_Assembly, "TXM")) + self.cata_info = "" + + def info(self): + return tr(": vérifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait être de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait être de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: # pylint: disable=bare-except + return 0 + return 1 + + def verifType(self, valeur): # pylint: disable=arguments-differ + ok = 0 + a, v = valeur + if isinstance(a, _Assembly): + ok += 1 + if isinstance(v, (bytes, str)): + ok += 1 + if ok == len(self.typeDesTuples): + return 1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class _Assembly(ASSD): + pass + + +class _TechnoData(ASSD): + pass + + +class _RodBank(ASSD): + pass + + +class _ModelData(ASSD): + pass + + +class _ScenarioData(ASSD): + pass + + +Assembly = OPER( + nom="Assembly", + sd_prod=_Assembly, + fr="Description d'un élément du cœur", + ang="Core element description", + assembly_type=SIMP( + fr="Type d'élément cœur (assemblage combustible ou réflecteur", + ang="Type of the core element (fuel assembly or reflector", + statut="o", + typ="TXM", + into=("UOX", "MOX", "REF")), + description=BLOC( + condition="assembly_type != 'REF'", + fr="Description d'un assemblage combustible", + ang="Fuel assembly description", + assembly_width=SIMP( + fr="Pas inter-assemblage dans le cœur", + ang="Fuel assembly pitch in the core", + unite="m", + statut="o", + typ="R"), + fuel_density=SIMP( + fr=("Ratio entre masse volumique nominale et la masse volumique " + "théorique des pastilles combustible"), + ang=("Ratio between the nominal density and the theoretical " + "density of the fuel pellets"), + unite="g/cm3", + statut="o", + typ="R", + defaut=0.95), + radial_description=FACT( + fr="Description radiale de l'assemblage combustible", + ang="Fuel assembly radial description", + statut="o", + clad_outer_radius=SIMP( + fr="Rayon externe de la gaine des crayons combustible", + ang="Clad external radius of the fuel pins", + unite="m", + statut="o", + typ="R"), + guide_tube_outer_radius=SIMP( + fr="Rayon externe des tubes guides", + ang="Clad external radius of the guide tubes", + unite="m", + statut="o", + typ="R"), + fuel_rod_pitch=SIMP( + fr="Pas inter-crayon dans l'assemblage", + ang="Fuel pin pitch in the assembly", + unite="m", + statut="o", + typ="R"), + nfuel_rods=SIMP( + fr="Nombre de crayons combustibles dans l'assemblage", + ang="Number of fuel pins in the assembly", + statut="o", + typ="I")), + axial_description=FACT( + fr="Description axiale de l'assemblage combustible", + ang="Fuel assembly axial description", + statut="o", + active_length_start=SIMP( + fr="Altitude basse de la partie active", + ang="Lower altitude of the active part", + unite="m", + statut="o", + typ="R"), + active_length_end=SIMP( + fr="Altitude haute de la partie active", + ang="Upper altitude of the active part", + unite="m", + statut="o", + typ="R")), + grids=FACT( + fr="Description des grilles", + ang="Grids description", + statut="o", + mixing=FACT( + fr="Description des grilles de mélange", + ang="Mixing grids description", + statut="o", + positions=SIMP( + fr="Altitude basse de la grille", + ang="Grid lower altitude", + unite="m", + statut="f", + typ="R", + max="**"), + size=SIMP( + fr="Hauteur de la grille", + ang="Grid height", + unite="m", + statut="o", + typ="R")), + non_mixing=FACT( + fr="Description des grilles de maintien", + ang="Holding grids description", + statut="o", + positions=SIMP( + fr="Altitude basse de la grille", + ang="Grid lower altitude", + unite="m", + statut="f", + typ="R", + max="**"), + size=SIMP( + fr="Hauteur de la grille", + ang="Grid height", + unite="m", + statut="o", + typ="R"))))) + + +# TODO: Define the names of the possible compositions (Black, Grey, B4C, Hafnium and Pyrex) +RodBank = OPER( + nom="RodBank", + sd_prod=_RodBank, + fr="Description d'un groupe de grappes absorbantes", + ang="Rod bank description", + rod_type=SIMP( + fr="Type de grappes absorbantes", + ang="Type of rod clusters", + statut="o", + typ="TXM", + into=("homogeneous", "heterogeneous")), + description_HOM=BLOC( + condition="rod_type == 'homogeneous'", + fr="Description d'un groupe de grappes absorbantes homogènes axialement", + ang="Axially homogeneous rod bank description", + rod_composition=SIMP( + fr="Type de matériau absorbant des grappes absorbantes", + ang="Absorbing material type of the rod clusters", + statut="o", + typ="TXM")), + description_HET=BLOC( + condition="rod_type == 'heterogeneous'", + fr="Description d'un groupe de grappes absorbantes hétérogène axialement", + ang="Axially heterogeneous rod bank description", + bottom_composition=SIMP( + fr="Type de matériau absorbant dans la partie basse des grappes absorantes", + ang="Absorbing material type in the lower part of the rod clusters", + statut="o", + typ="TXM"), + splitting_heigh=SIMP( + fr=("Altitude de séparation entre la partie haute et la partie " + "basse des grappes absorbantes"), + ang=("Splitting height between the upper part and the lower part " + "of the rod clusters"), + unite="m", + statut="o", + typ="R"), + upper_composition=SIMP( + fr="Type de matériau absorbant dans la partie haute des grappes absorantes", + ang="Absorbing material type in the upper part of the rod clusters", + statut="o", + typ="TXM")), + step_height=SIMP( + fr="Hauteur d'un pas", + ang="Step height", + unite="m", + statut="o", + typ="R"), + nsteps=SIMP( + fr="Nombre de pas du groupe de grappes", + ang="Rod bank steps number", + statut="o", + typ="I")) + + +def gen_assembly_maps(): + """Generate all the possible maps (one for each possible core size) for the + data cointained in ``Techno_data.radial_description.assembly_map``.""" + # Build the default axes names + xsym_list = list("ABCDEFGHJKLNPRSTUVWXYZ") + xsym_list.reverse() + ysym_list = ["%02d" % i for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS + 1)] + ysym_list.reverse() + def_xaxis = {} + def_yaxis = {} + for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS + 1): + def_xaxis[i] = ["RW"] + xsym_list[-i:] + ["RE"] + def_yaxis[i] = ["RS"] + ysym_list[-i:] + ["RN"] + + dico = {} + for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS): + dico["assembly_map_%d" % i] = BLOC( + condition="nb_assembly == %d" % i, + fr="Description radiale du cœur", + ang="Core radial description", + xaxis=SIMP( + fr="Nom des repères radiaux du cœur suivant l'axe ouest-est", + ang="Name of core radial marks following the west-east axis", + statut="o", + typ="TXM", + min=i + 2, + max=i + 2, + defaut=def_xaxis[i]), + yaxis=SIMP( + fr="Nom des repères radiaux du cœur suivant l'axe nord-sud", + ang="Name of core radial marks following the north-south axis", + statut="o", + typ="TXM", + min=i + 2, + max=i + 2, + defaut=def_yaxis[i]), + assembly_map=SIMP( + fr=("Répartition radiale des assemblages combustibles et des " + "réflecteurs dans le cœur"), + ang=("Radial repartition of the fuel assemblies and the " + "reflectors in the core"), + statut="o", + typ=Matrice( + nbLigs=i + 2, + nbCols=i + 2, + typElt=_Assembly, + listeHeaders=( + ("RW","S","R","P","N","L","K","J","H","G","F","E","D","C","B","A","RE",), + ("RS","15","14","13","12","11","10","09","08","07","06","05","04","03","02","01","RN",)), + defaut=(i + 2) * [(i + 2) * ["."]], + coloree=True)), + rod_map=SIMP( + fr="Répartition radiale des groupes de grappes dans le cœur", + ang="Rod banks radial repartition in the core", + statut="o", + typ=Matrice( + nbLigs=i + 2, + nbCols=i + 2, + valSup=1, + valMin=-1, + typElt="TXM", + listeHeaders=None, + coloree=True), + defaut=(i + 2) * [(i + 2) * ["."]]), + BU_map=SIMP( + fr="Taux de combustion moyen des assemblages combustibles en GW.j/t", + ang="Average burnup of the fuel assemblies in GW.d/t", + statut="o", + typ=Matrice( + nbLigs=i + 2, + nbCols=i + 2, + valSup=90000., + valMin=0., + typElt="R", + listeHeaders=None, + coloree=True), + defaut=(i + 2) * [(i + 2) * ["."]])) + return dico + + +Techno_data = OPER( + nom="Techno_data", + sd_prod=_TechnoData, + fr="Description technologique du cœur", + ang="Core technological description", + assembly_list=SIMP( + fr="Sélection des assemblages combustible", + ang="Fuel assemblies selection", + statut="o", + typ=_Assembly, + min=1, + max="**"), + rodbank_list=SIMP( + fr="Sélection des groupes de grappes", + ang="Rod banks selection", + statut="o", + typ=_RodBank, + min=0, + max="**"), + radial_description=FACT( + fr="Description radiale du cœur", + ang="Radial description of the core", + statut="o", + nb_assembly=SIMP( + fr="Nombre d'éléments combustible sur la tranche du cœur", + ang="Number of fuel elements on one side of the core", + statut="o", + typ="I", + into=list(range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS))), + **(gen_assembly_maps())), + axial_description=FACT( + fr="Description axiale du cœur", + ang="Axial description of the core", + statut="o", + lower_refl_size=SIMP( + fr="Hauteur du réflecteur axial bas", + ang="Height of bottom axial reflector", + unite="m", + statut="o", + typ="R"), + upper_refl_size=SIMP( + fr="Hauteur du réflecteur axial haut", + ang="Height of top axial reflector", + unite="m", + statut="o", + typ="R")), + nominal_power=SIMP( + fr="Puissance thermique nominale du cœur", + ang="Nominal thermal power of the core", + unite="W", + statut="o", + typ="R"), + Fuel_power_fraction=SIMP( + fr="Fraction de la puissance dissipée dans le combustible", + ang="Power fraction dissipated in the fuel", + statut="o", + typ="R", + defaut=0.974), + by_pass=SIMP( + fr="Fraction du débit de bypass cœur", + ang="Bypass core flow fraction", + statut="o", + typ="R", + defaut=0.07), + core_volumic_flowrate=SIMP( + fr="Débit volumique cœur", + ang="Core volume flowrate", + unite="m3/h", + statut="o", + typ="R")) + + +# TODO: Split this class in two: neutronic and thermalhydraulic) +# TODO: Or split this class in N classes (one for each code) +Model_data = OPER( + nom="Model_data", + sd_prod=_ModelData, + fr="Description de la modélisation physique", + ang="Physical modeling description", + physics=SIMP( + fr="Sélection de la physique du modèle", + ang="Physic model selection", + statut="o", + typ="TXM", + into=("Neutronics", "Thermalhydraulics")), + scale=SIMP( + fr="Sélection de l'échelle du modèle", + ang="Scale model selection", + statut="o", + typ="TXM", + into=("system", "component", "local")), + b_neutro_compo=BLOC( + condition="physics == 'Neutronics' and scale == 'component'", + fr="Description de la modélisation neutronique à l'échelle du composant", + ang="Neutronic modeling description at the component scale", + + # TODO: Split this in two: fuel assemblies libraries and reflector libraries) + # TODO: Use a triplet (assembly, filename, pattern) instead of a doublet for the fuel assemblies libraries + # TODO: Use a doublet (reflector, filename) for the reflector libraries + library_map=SIMP( + fr=("Association des éléments du cœur aux bibliothèques neutroniques " + "sous la forme (assemblage combustible, nom du fichier@pattern) " + "pour les bibliothèques assemblages et sous la forme " + "(réflecteur, nom du fichier) pour les bibliothèques réflecteur"), + ang=("Association between the core elements and the neutronic libraries " + "in the form (fuel assembly, filename@pattern) for the fuel assembly " + "libraries and in the form of (reflector, filename) for the " + "reflector libraries"), + statut="f", + typ=Tuple(2), + validators=VerifNeutLib(), + max="**"), + code=SIMP( + fr="Sélection du code de neutronique cœur", + ang="Core neutronic code selection", + statut="o", + typ="TXM", + into=("COCAGNE", "APOLLO3")), + # TODO: Implement the *4x4* mesh + radial_meshing=FACT( + fr="Maillage radial du cœur", + ang="Core radial meshing", + statut="o", + flux_solver=SIMP( + fr="Type de maillage radial du solveur de flux", + ang="Radial mesh type for the flux solver", + statut="o", + typ="TXM", + into=("subdivision", "pin-by-pin")), + b_flux_subdivision=BLOC( + condition="flux_solver == 'subdivision'", + fr=("Paramètres pour les maillages radiaux de type subdivisé " + "pour le solveur de flux"), + ang=("Parameters for the subdivided radial meshes types for the " + "flux solver"), + flux_subdivision=SIMP( + fr=("Nombre de sous-divisions à appliquer à chaque maille " + "radiale pour le solveur de flux"), + ang=("Subdivision number to apply to all radial meshes for " + "the flux solver"), + statut="o", + typ="I")), + feedback_solver=SIMP( + fr="Type de maillage radial du solveur de contre-réaction", + ang="Radial mesh type for the feedback solver", + statut="o", + typ="TXM", + into=("subdivision", "pin-by-pin")), + b_feedback_subdivision=BLOC( + condition="feedback_solver == 'subdivision'", + fr=("Paramètres pour les maillages radiaux de type subdivisé " + "pour le solveur de contre-réaction"), + ang=("Parameters for the subdivided radial meshes types for the " + "feedback solver"), + feedback_subdivision=SIMP( + fr=("Nombre de sous-divisions à appliquer à chaque maille " + "radiale pour le solveur de contre-réaction"), + ang=("Subdivision number to apply to all radial meshes for " + "the feedback solver"), + statut="o", + typ="I")))), + b_thermo_compo=BLOC( + condition="physics == 'Thermalhydraulics' and scale == 'component'", + fr="Description de la modélisation thermohydraulique à l'échelle du composant", + ang="Thermalhydraulic modeling description at the component scale", + code=SIMP( + fr="Sélection du code de thermohydraulique cœur", + ang="Core thermalhydraulic code selection", + statut="o", + typ="TXM", + into=("THYC", "CATHARE3", "FLICA4")), + radial_meshing=FACT( + fr="Description du maillage radial thermohydraulique à l'échelle du composant", + ang="Thermalhydraulic radial meshing description at the component scale", + statut="o", + fluid=SIMP( + fr="Méthode de maillage radial", + ang="Radial meshing method", + statut="o", + typ="TXM", + into=("subdivision", "subchannel")), + b_fluid_subdivision=BLOC( + condition="fluid == 'subdivision'", + fr="Données spécifiques au maillage radial par subdivision", + ang="Specific data for the radial meshing by subdivision", + fluid_subdivision=SIMP( + fr="Nombre de mailles radiales dans les assemblages combustibles", + ang="Radial mesh number in the fuel assemblies", + statut="o", + typ="I")), + pellet=SIMP( + fr="Nombre de mailles radiales dans la pastille combustible", + ang="Radial mesh number in the fuel pellet", + statut="o", + typ="I"), + clad=SIMP( + fr="Nombre de mailles radiales dans la gaine des crayons combustibles", + ang="Radial mesh number in the clad of the fuel pins", + statut="o", + typ="I"))), + b_scale_compo=BLOC( + condition="scale == 'component'", + fr="Description de la modélisation à l'échelle du composant", + ang="Modeling description at the component scale", + axial_meshing=FACT( + fr="Maillage axial du cœur", + ang="Core axial meshing", + statut="o", + lower_refl=SIMP( + fr="Nombre de mailles axiales dans le réflecteur bas", + ang="Axial mesh number in the lower reflector", + statut="o", + typ="I"), + fuel=SIMP( + fr="Nombre de mailles axiales dans la partie active de l'assemblage combustible", + ang="Axial mesh number in the active part of the fuel assembly", + statut="o", + typ="I"), + upper_refl=SIMP( + fr="Nombre de mailles axiales dans le réflecteur haut", + ang="Axial mesh number in the upper reflector", + statut="o", + typ="I"))), + b_scale_local=BLOC( + condition="scale == 'local'", + fr="Description de la modélisation à l'échelle du locale", + ang="Modeling description at the local scale", + mesh_file=SIMP( + fr="Nom du fichier décrivant le maillage", + ang="Name of the file describing the mesh", + statut="o", + typ="Fichier"))) + + +Scenario_data = OPER( + nom="Scenario_data", + sd_prod=_ScenarioData, + fr="Description du transitoire", + ang="Transient description", + initial_power=SIMP( + fr="Puissance thermique initiale du cœur", + ang="Initial thermal power of the core", + statut="o", + typ="R", + val_min=0., + defaut=100.), + initial_power_unit=SIMP( + fr="Unité de la puissance thermique initiale du cœur", + ang="Unit of the initial thermal power of the core", + statut="o", + typ="TXM", + into=("% Nominal power", "W"), + defaut="% Nominal power"), + initial_core_inlet_temperature=SIMP( + fr="Température initiale de l'eau à l'entrée du cœur", + ang="Initial water temperature at the inlet of the core", + unite="°C", + statut="o", + typ="R", + val_min=0., + defaut=280.), + initial_boron_concentration=SIMP( + fr="Concentration en bore initiale", + ang="Initial boron concentration", + unite="ppm", + statut="o", + typ="R", + val_min=0., + defaut=1300.), + initial_inlet_pressure=SIMP( + fr="Pression initiale de l'eau à l'entrée du cœur", + ang="Initial water pressure at the inlet of the core", + unite="bar", + statut="o", + typ="R", + val_min=0., + defaut=160.2), + initial_outlet_pressure=SIMP( + fr="Pression initiale de l'eau à la sortie du cœur", + ang="Initial water pressure at the outlet of the core", + unite="bar", + statut="o", + typ="R", + val_min=0., + defaut=157.2), + initial_rod_positions=SIMP( + fr=("Position initiale des groupes de grappes et des grappes dans le " + "cœur sous la forme (type@nom, position) " + "(ex. (Rodbank@RB, 62) pour le groupe de grappe RB positionné à 62 " + "pas extraits et (Rodcluster@H08, 0) pour la grappe H08 " + "complètement insérée)"), + ang=("Initial position of the rod banks and the rod clusters in the " + "core in the form (type@name, position) " + "(e.g. (Rodbank@RB, 62) for the RB rod bank placed at 62 " + "extracted steps and (Rodcluster@H08, 0) for the rod cluster H08 " + "completely inserted)"), + unite="extracted steps", + statut="o", + typ=Tuple(2), # TODO: Use a triplet (type, name, position) instead of a doublet + validators=VerifTypeTuple(("TXM", "I")), + max="**"), + scenario_type=SIMP( + fr="Type de transitoire à modéliser", + ang="Type of transient to model", + statut="o", + typ="TXM", + into=("RIA", )), + b_ria=BLOC( + condition="scenario_type == 'RIA'", + fr="Données du transitoire 'accident de réactivité'", + ang="Data of the 'Reactivity-initiated Accident' transient", + ejected_rod=SIMP( + fr="Nom de la grappe éjectée", + ang="Name of the ejected rod cluster", + statut="o", + typ="TXM"), + rod_position_program=SIMP( + fr="Loi d'éjection à appliquer à la grappe sous la forme (temps, position)", + ang="Ejection law to apply to the ejected rod cluster in the form (time, position)", + unite="s, extracted steps", + statut="o", + typ=Tuple(2), + validators=VerifTypeTuple(("R", "I")), + max="**"), + SCRAM=SIMP( + fr="Activation/désactivation de l'arrêt automatique du réacteur", + ang="Activation/deactivation of automatic reactor shutdown", + statut="o", + typ="TXM", + into=("YES", "NO")), + SCRAM_option=BLOC( + condition="SCRAM == 'YES'", + fr="Options relatives à l'arrêt automatique du réacteur", + ang="Options relative to the automatic reactor shutdown", + SCRAM_power=SIMP( + fr=("Puissance thermique du cœur déclenchant un arrêt " + "automatique du réacteur"), + ang="Core thermal power triggering an automatic reactor shutdown", + unite="MW", + statut="o", + typ="R"), + complete_SCRAM_time=SIMP( + fr="Temps de chute des grappes", + ang="Rod cluster fall time", + unite="s", + statut="o", + typ="R"))), + post_processing=SIMP( + # TODO: Give all the possible parameters depending of the physics + fr=("Données de sortie du calcul sous la forme (paramètre@physique, format). " + "'physique' peut valoir {physics!r} et 'format' peut valoir {formats!r}".format( + physics=VerifPostTreatment.PHYSICS, + formats=VerifPostTreatment.FORMATS)), + ang=("Output computed data in function of time in the form (parameter@physic, format). " + "'physic' can be {physics!r} and 'format' can be {formats!r})".format( + physics=VerifPostTreatment.PHYSICS, + formats=VerifPostTreatment.FORMATS)), + statut="f", + typ=Tuple(2), # TODO: Use a triplet (parameter, physic, format) instead of a doublet + validators=VerifPostTreatment(), + max="**")) diff --git a/ReacteurNumerique/cata_RN_EDG_PN.py b/ReacteurNumerique/cata_RN_EDG_PN.py deleted file mode 100644 index d1d389e5..00000000 --- a/ReacteurNumerique/cata_RN_EDG_PN.py +++ /dev/null @@ -1,820 +0,0 @@ -# -*- coding: utf-8 -*- - -"""Definition of the data model used by the integration bench. - -Warnings --------- -EFICAS will import this file as Python module with the ``__import__`` special -function so, this module must not use relative import. -""" -# pylint: disable=too-few-public-methods - -# TODO: Create a main object that point on the different subobjects and force its name - -# EFICAS -from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice -from Extensions.i18n import tr - -# Warning: The names of these variables are defined by EFICAS -JdC = JDC_CATA(code="RN_EDG") -VERSION_CATALOGUE = "V_0" - -# Define the minimum and the maximum number of elements (reflectors and fuel -# assemblies) on the core's side -NMIN_CORE_FUEL_ELTS = 1 -NMAX_CORE_FUEL_ELTS = 18 - -class Tuple: - """Organize the data into a fixed size tuple. - - Warnings - -------- - This class respect the EFICAS conventions. - """ - - def __init__(self, ntuple): - self.ntuple = ntuple - - def __convert__(self, valeur): - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): # pylint: disable=missing-function-docstring - return "Tuple de %s elements" % self.ntuple - - -class VerifPostTreatment(VerifTypeTuple): - """Validate the data comming from ``Scenario_data.post_processing``. - - Warnings - -------- - This class respect the EFICAS conventions. - """ - # pylint: disable=invalid-name - # pylint: disable=missing-function-docstring - # pylint: disable=no-self-use - - PHYSICS = ("Neutronics", "Thermalhydraulics") - FORMATS = ("MED", "SUM", "MIN", "MAX", "MEAN") - - def __init__(self): - super().__init__(("TXM", "TXM")) - self.cata_info = "" - - def info(self): - return tr(": vérifie les \ntypes dans un tuple") - - def infoErreurListe(self): - return tr("Les types entres ne sont pas permis") - - def default(self, valeur): - return valeur - - def isList(self): - return 1 - - def convertItem(self, valeur): - if len(valeur) != len(self.typeDesTuples): - raise ValueError( - tr("%s devrait être de type %s ") % (valeur, self.typeDesTuples)) - ok = self.verifType(valeur) - if ok == 0: - raise ValueError( - tr("%s devrait être de type %s (%d)") % (valeur, self.typeDesTuples, ok)) - if ok < 0: - raise ValueError( - tr("%s devrait être dans %s ") % (valeur[1], self.FORMATS)) - return valeur - - def verifItem(self, valeur): - try: - if len(valeur) != len(self.typeDesTuples): - return 0 - ok = self.verifType(valeur) - if ok != 1: - return 0 - except: # pylint: disable=bare-except - return 0 - return 1 - - def verifType(self, valeur): # pylint: disable=arguments-differ - ok = 0 - for v in valeur: - if isinstance(v, (bytes, str)): - ok += 1 - if ok == len(self.typeDesTuples): - if valeur[1] in self.FORMATS: - return 1 - return -1 - return 0 - - def verif(self, valeur): - if type(valeur) in (list, tuple): - liste = list(valeur) - for val in liste: - if self.verifItem(val) != 1: - return 0 - return 1 - return 0 - - -class VerifNeutLib(VerifTypeTuple): - """Validate the data comming from ``Model_data.b_neutro_compo.library_map``. - - Warnings - -------- - This class respect the EFICAS conventions. - """ - # pylint: disable=invalid-name - # pylint: disable=no-self-use - # pylint: disable=missing-function-docstring - - def __init__(self): - super().__init__((_Assembly, "TXM")) - self.cata_info = "" - - def info(self): - return tr(": vérifie les \ntypes dans un tuple") - - def infoErreurListe(self): - return tr("Les types entres ne sont pas permis") - - def default(self, valeur): - return valeur - - def isList(self): - return 1 - - def convertItem(self, valeur): - if len(valeur) != len(self.typeDesTuples): - raise ValueError( - tr("%s devrait être de type %s ") % (valeur, self.typeDesTuples)) - ok = self.verifType(valeur) - if ok == 0: - raise ValueError( - tr("%s devrait être de type %s (%d)") % (valeur, self.typeDesTuples, ok)) - return valeur - - def verifItem(self, valeur): - try: - if len(valeur) != len(self.typeDesTuples): - return 0 - ok = self.verifType(valeur) - if ok != 1: - return 0 - except: # pylint: disable=bare-except - return 0 - return 1 - - def verifType(self, valeur): # pylint: disable=arguments-differ - ok = 0 - a, v = valeur - if isinstance(a, _Assembly): - ok += 1 - if isinstance(v, (bytes, str)): - ok += 1 - if ok == len(self.typeDesTuples): - return 1 - return 0 - - def verif(self, valeur): - if type(valeur) in (list, tuple): - liste = list(valeur) - for val in liste: - if self.verifItem(val) != 1: - return 0 - return 1 - return 0 - - -class _Assembly(ASSD): - pass - - -class _TechnoData(ASSD): - pass - - -class _RodBank(ASSD): - pass - - -class _ModelData(ASSD): - pass - - -class _ScenarioData(ASSD): - pass - - -Assembly = OPER( - nom="Assembly", - sd_prod=_Assembly, - fr="Description d'un élément du cœur", - ang="Core element description", - assembly_type=SIMP( - fr="Type d'élément cœur (assemblage combustible ou réflecteur", - ang="Type of the core element (fuel assembly or reflector", - statut="o", - typ="TXM", - into=("UOX", "MOX", "REF")), - description=BLOC( - condition="assembly_type != 'REF'", - fr="Description d'un assemblage combustible", - ang="Fuel assembly description", - assembly_width=SIMP( - fr="Pas inter-assemblage dans le cœur", - ang="Fuel assembly pitch in the core", - unite="m", - statut="o", - typ="R"), - fuel_density=SIMP( - fr=("Ratio entre masse volumique nominale et la masse volumique " - "théorique des pastilles combustible"), - ang=("Ratio between the nominal density and the theoretical " - "density of the fuel pellets"), - unite="g/cm3", - statut="o", - typ="R", - defaut=0.95), - radial_description=FACT( - fr="Description radiale de l'assemblage combustible", - ang="Fuel assembly radial description", - statut="o", - clad_outer_radius=SIMP( - fr="Rayon externe de la gaine des crayons combustible", - ang="Clad external radius of the fuel pins", - unite="m", - statut="o", - typ="R"), - guide_tube_outer_radius=SIMP( - fr="Rayon externe des tubes guides", - ang="Clad external radius of the guide tubes", - unite="m", - statut="o", - typ="R"), - fuel_rod_pitch=SIMP( - fr="Pas inter-crayon dans l'assemblage", - ang="Fuel pin pitch in the assembly", - unite="m", - statut="o", - typ="R"), - nfuel_rods=SIMP( - fr="Nombre de crayons combustibles dans l'assemblage", - ang="Number of fuel pins in the assembly", - statut="o", - typ="I")), - axial_description=FACT( - fr="Description axiale de l'assemblage combustible", - ang="Fuel assembly axial description", - statut="o", - active_length_start=SIMP( - fr="Altitude basse de la partie active", - ang="Lower altitude of the active part", - unite="m", - statut="o", - typ="R"), - active_length_end=SIMP( - fr="Altitude haute de la partie active", - ang="Upper altitude of the active part", - unite="m", - statut="o", - typ="R")), - grids=FACT( - fr="Description des grilles", - ang="Grids description", - statut="o", - mixing=FACT( - fr="Description des grilles de mélange", - ang="Mixing grids description", - statut="o", - positions=SIMP( - fr="Altitude basse de la grille", - ang="Grid lower altitude", - unite="m", - statut="f", - typ="R", - max="**"), - size=SIMP( - fr="Hauteur de la grille", - ang="Grid height", - unite="m", - statut="o", - typ="R")), - non_mixing=FACT( - fr="Description des grilles de maintien", - ang="Holding grids description", - statut="o", - positions=SIMP( - fr="Altitude basse de la grille", - ang="Grid lower altitude", - unite="m", - statut="f", - typ="R", - max="**"), - size=SIMP( - fr="Hauteur de la grille", - ang="Grid height", - unite="m", - statut="o", - typ="R"))))) - - -# TODO: Define the names of the possible compositions (Black, Grey, B4C, Hafnium and Pyrex) -RodBank = OPER( - nom="RodBank", - sd_prod=_RodBank, - fr="Description d'un groupe de grappes absorbantes", - ang="Rod bank description", - rod_type=SIMP( - fr="Type de grappes absorbantes", - ang="Type of rod clusters", - statut="o", - typ="TXM", - into=("homogeneous", "heterogeneous")), - description_HOM=BLOC( - condition="rod_type == 'homogeneous'", - fr="Description d'un groupe de grappes absorbantes homogènes axialement", - ang="Axially homogeneous rod bank description", - rod_composition=SIMP( - fr="Type de matériau absorbant des grappes absorbantes", - ang="Absorbing material type of the rod clusters", - statut="o", - typ="TXM")), - description_HET=BLOC( - condition="rod_type == 'heterogeneous'", - fr="Description d'un groupe de grappes absorbantes hétérogène axialement", - ang="Axially heterogeneous rod bank description", - bottom_composition=SIMP( - fr="Type de matériau absorbant dans la partie basse des grappes absorantes", - ang="Absorbing material type in the lower part of the rod clusters", - statut="o", - typ="TXM"), - splitting_heigh=SIMP( - fr=("Altitude de séparation entre la partie haute et la partie " - "basse des grappes absorbantes"), - ang=("Splitting height between the upper part and the lower part " - "of the rod clusters"), - unite="m", - statut="o", - typ="R"), - upper_composition=SIMP( - fr="Type de matériau absorbant dans la partie haute des grappes absorantes", - ang="Absorbing material type in the upper part of the rod clusters", - statut="o", - typ="TXM")), - step_height=SIMP( - fr="Hauteur d'un pas", - ang="Step height", - unite="m", - statut="o", - typ="R"), - nsteps=SIMP( - fr="Nombre de pas du groupe de grappes", - ang="Rod bank steps number", - statut="o", - typ="I")) - - -def gen_assembly_maps(): - """Generate all the possible maps (one for each possible core size) for the - data cointained in ``Techno_data.radial_description.assembly_map``.""" - # Build the default axes names - xsym_list = list("ABCDEFGHJKLNPRSTUVWXYZ") - xsym_list.reverse() - ysym_list = ["%02d" % i for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS + 1)] - ysym_list.reverse() - def_xaxis = {} - def_yaxis = {} - for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS + 1): - def_xaxis[i] = ["RW"] + xsym_list[-i:] + ["RE"] - def_yaxis[i] = ["RS"] + ysym_list[-i:] + ["RN"] - - dico = {} - for i in range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS): - dico["assembly_map_%d" % i] = BLOC( - condition="nb_assembly == %d" % i, - fr="Description radiale du cœur", - ang="Core radial description", - xaxis=SIMP( - fr="Nom des repères radiaux du cœur suivant l'axe ouest-est", - ang="Name of core radial marks following the west-east axis", - statut="o", - typ="TXM", - min=i + 2, - max=i + 2, - defaut=def_xaxis[i]), - yaxis=SIMP( - fr="Nom des repères radiaux du cœur suivant l'axe nord-sud", - ang="Name of core radial marks following the north-south axis", - statut="o", - typ="TXM", - min=i + 2, - max=i + 2, - defaut=def_yaxis[i]), - assembly_map=SIMP( - fr=("Répartition radiale des assemblages combustibles et des " - "réflecteurs dans le cœur"), - ang=("Radial repartition of the fuel assemblies and the " - "reflectors in the core"), - statut="o", - typ=Matrice( - nbLigs=i + 2, - nbCols=i + 2, - typElt=_Assembly, - listeHeaders=( - ("RW","S","R","P","N","L","K","J","H","G","F","E","D","C","B","A","RE",), - ("RS","15","14","13","12","11","10","09","08","07","06","05","04","03","02","01","RN",)), - defaut=(i + 2) * [(i + 2) * ["."]], - coloree=True)), - rod_map=SIMP( - fr="Répartition radiale des groupes de grappes dans le cœur", - ang="Rod banks radial repartition in the core", - statut="o", - typ=Matrice( - nbLigs=i + 2, - nbCols=i + 2, - valSup=1, - valMin=-1, - typElt="TXM", - listeHeaders=None, - coloree=True), - defaut=(i + 2) * [(i + 2) * ["."]]), - BU_map=SIMP( - fr="Taux de combustion moyen des assemblages combustibles en GW.j/t", - ang="Average burnup of the fuel assemblies in GW.d/t", - statut="o", - typ=Matrice( - nbLigs=i + 2, - nbCols=i + 2, - valSup=90000., - valMin=0., - typElt="R", - listeHeaders=None, - coloree=True), - defaut=(i + 2) * [(i + 2) * ["."]])) - return dico - - -Techno_data = OPER( - nom="Techno_data", - sd_prod=_TechnoData, - fr="Description technologique du cœur", - ang="Core technological description", - assembly_list=SIMP( - fr="Sélection des assemblages combustible", - ang="Fuel assemblies selection", - statut="o", - typ=_Assembly, - min=1, - max="**"), - rodbank_list=SIMP( - fr="Sélection des groupes de grappes", - ang="Rod banks selection", - statut="o", - typ=_RodBank, - min=0, - max="**"), - radial_description=FACT( - fr="Description radiale du cœur", - ang="Radial description of the core", - statut="o", - nb_assembly=SIMP( - fr="Nombre d'éléments combustible sur la tranche du cœur", - ang="Number of fuel elements on one side of the core", - statut="o", - typ="I", - into=list(range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS))), - **(gen_assembly_maps())), - axial_description=FACT( - fr="Description axiale du cœur", - ang="Axial description of the core", - statut="o", - lower_refl_size=SIMP( - fr="Hauteur du réflecteur axial bas", - ang="Height of bottom axial reflector", - unite="m", - statut="o", - typ="R"), - upper_refl_size=SIMP( - fr="Hauteur du réflecteur axial haut", - ang="Height of top axial reflector", - unite="m", - statut="o", - typ="R")), - nominal_power=SIMP( - fr="Puissance thermique nominale du cœur", - ang="Nominal thermal power of the core", - unite="W", - statut="o", - typ="R"), - Fuel_power_fraction=SIMP( - fr="Fraction de la puissance dissipée dans le combustible", - ang="Power fraction dissipated in the fuel", - statut="o", - typ="R", - defaut=0.974), - by_pass=SIMP( - fr="Fraction du débit de bypass cœur", - ang="Bypass core flow fraction", - statut="o", - typ="R", - defaut=0.07), - core_volumic_flowrate=SIMP( - fr="Débit volumique cœur", - ang="Core volume flowrate", - unite="m3/h", - statut="o", - typ="R")) - - -# TODO: Split this class in two: neutronic and thermalhydraulic) -# TODO: Or split this class in N classes (one for each code) -Model_data = OPER( - nom="Model_data", - sd_prod=_ModelData, - fr="Description de la modélisation physique", - ang="Physical modeling description", - physics=SIMP( - fr="Sélection de la physique du modèle", - ang="Physic model selection", - statut="o", - typ="TXM", - into=("Neutronics", "Thermalhydraulics")), - scale=SIMP( - fr="Sélection de l'échelle du modèle", - ang="Scale model selection", - statut="o", - typ="TXM", - into=("system", "component", "local")), - b_neutro_compo=BLOC( - condition="physics == 'Neutronics' and scale == 'component'", - fr="Description de la modélisation neutronique à l'échelle du composant", - ang="Neutronic modeling description at the component scale", - - # TODO: Split this in two: fuel assemblies libraries and reflector libraries) - # TODO: Use a triplet (assembly, filename, pattern) instead of a doublet for the fuel assemblies libraries - # TODO: Use a doublet (reflector, filename) for the reflector libraries - library_map=SIMP( - fr=("Association des éléments du cœur aux bibliothèques neutroniques " - "sous la forme (assemblage combustible, nom du fichier@pattern) " - "pour les bibliothèques assemblages et sous la forme " - "(réflecteur, nom du fichier) pour les bibliothèques réflecteur"), - ang=("Association between the core elements and the neutronic libraries " - "in the form (fuel assembly, filename@pattern) for the fuel assembly " - "libraries and in the form of (reflector, filename) for the " - "reflector libraries"), - statut="f", - typ=Tuple(2), - validators=VerifNeutLib(), - max="**"), - code=SIMP( - fr="Sélection du code de neutronique cœur", - ang="Core neutronic code selection", - statut="o", - typ="TXM", - into=("COCAGNE", "APOLLO3")), - # TODO: Implement the *4x4* mesh - radial_meshing=FACT( - fr="Maillage radial du cœur", - ang="Core radial meshing", - statut="o", - flux_solver=SIMP( - fr="Type de maillage radial du solveur de flux", - ang="Radial mesh type for the flux solver", - statut="o", - typ="TXM", - into=("subdivision", "pin-by-pin")), - b_flux_subdivision=BLOC( - condition="flux_solver == 'subdivision'", - fr=("Paramètres pour les maillages radiaux de type subdivisé " - "pour le solveur de flux"), - ang=("Parameters for the subdivided radial meshes types for the " - "flux solver"), - flux_subdivision=SIMP( - fr=("Nombre de sous-divisions à appliquer à chaque maille " - "radiale pour le solveur de flux"), - ang=("Subdivision number to apply to all radial meshes for " - "the flux solver"), - statut="o", - typ="I")), - feedback_solver=SIMP( - fr="Type de maillage radial du solveur de contre-réaction", - ang="Radial mesh type for the feedback solver", - statut="o", - typ="TXM", - into=("subdivision", "pin-by-pin")), - b_feedback_subdivision=BLOC( - condition="feedback_solver == 'subdivision'", - fr=("Paramètres pour les maillages radiaux de type subdivisé " - "pour le solveur de contre-réaction"), - ang=("Parameters for the subdivided radial meshes types for the " - "feedback solver"), - feedback_subdivision=SIMP( - fr=("Nombre de sous-divisions à appliquer à chaque maille " - "radiale pour le solveur de contre-réaction"), - ang=("Subdivision number to apply to all radial meshes for " - "the feedback solver"), - statut="o", - typ="I")))), - b_thermo_compo=BLOC( - condition="physics == 'Thermalhydraulics' and scale == 'component'", - fr="Description de la modélisation thermohydraulique à l'échelle du composant", - ang="Thermalhydraulic modeling description at the component scale", - code=SIMP( - fr="Sélection du code de thermohydraulique cœur", - ang="Core thermalhydraulic code selection", - statut="o", - typ="TXM", - into=("THYC", "CATHARE3", "FLICA4")), - radial_meshing=FACT( - fr="Description du maillage radial thermohydraulique à l'échelle du composant", - ang="Thermalhydraulic radial meshing description at the component scale", - statut="o", - fluid=SIMP( - fr="Méthode de maillage radial", - ang="Radial meshing method", - statut="o", - typ="TXM", - into=("subdivision", "subchannel")), - b_fluid_subdivision=BLOC( - condition="fluid == 'subdivision'", - fr="Données spécifiques au maillage radial par subdivision", - ang="Specific data for the radial meshing by subdivision", - fluid_subdivision=SIMP( - fr="Nombre de mailles radiales dans les assemblages combustibles", - ang="Radial mesh number in the fuel assemblies", - statut="o", - typ="I")), - pellet=SIMP( - fr="Nombre de mailles radiales dans la pastille combustible", - ang="Radial mesh number in the fuel pellet", - statut="o", - typ="I"), - clad=SIMP( - fr="Nombre de mailles radiales dans la gaine des crayons combustibles", - ang="Radial mesh number in the clad of the fuel pins", - statut="o", - typ="I"))), - b_scale_compo=BLOC( - condition="scale == 'component'", - fr="Description de la modélisation à l'échelle du composant", - ang="Modeling description at the component scale", - axial_meshing=FACT( - fr="Maillage axial du cœur", - ang="Core axial meshing", - statut="o", - lower_refl=SIMP( - fr="Nombre de mailles axiales dans le réflecteur bas", - ang="Axial mesh number in the lower reflector", - statut="o", - typ="I"), - fuel=SIMP( - fr="Nombre de mailles axiales dans la partie active de l'assemblage combustible", - ang="Axial mesh number in the active part of the fuel assembly", - statut="o", - typ="I"), - upper_refl=SIMP( - fr="Nombre de mailles axiales dans le réflecteur haut", - ang="Axial mesh number in the upper reflector", - statut="o", - typ="I"))), - b_scale_local=BLOC( - condition="scale == 'local'", - fr="Description de la modélisation à l'échelle du locale", - ang="Modeling description at the local scale", - mesh_file=SIMP( - fr="Nom du fichier décrivant le maillage", - ang="Name of the file describing the mesh", - statut="o", - typ="Fichier"))) - - -Scenario_data = OPER( - nom="Scenario_data", - sd_prod=_ScenarioData, - fr="Description du transitoire", - ang="Transient description", - initial_power=SIMP( - fr="Puissance thermique initiale du cœur", - ang="Initial thermal power of the core", - statut="o", - typ="R", - val_min=0., - defaut=100.), - initial_power_unit=SIMP( - fr="Unité de la puissance thermique initiale du cœur", - ang="Unit of the initial thermal power of the core", - statut="o", - typ="TXM", - into=("% Nominal power", "W"), - defaut="% Nominal power"), - initial_core_inlet_temperature=SIMP( - fr="Température initiale de l'eau à l'entrée du cœur", - ang="Initial water temperature at the inlet of the core", - unite="°C", - statut="o", - typ="R", - val_min=0., - defaut=280.), - initial_boron_concentration=SIMP( - fr="Concentration en bore initiale", - ang="Initial boron concentration", - unite="ppm", - statut="o", - typ="R", - val_min=0., - defaut=1300.), - initial_inlet_pressure=SIMP( - fr="Pression initiale de l'eau à l'entrée du cœur", - ang="Initial water pressure at the inlet of the core", - unite="bar", - statut="o", - typ="R", - val_min=0., - defaut=160.2), - initial_outlet_pressure=SIMP( - fr="Pression initiale de l'eau à la sortie du cœur", - ang="Initial water pressure at the outlet of the core", - unite="bar", - statut="o", - typ="R", - val_min=0., - defaut=157.2), - initial_rod_positions=SIMP( - fr=("Position initiale des groupes de grappes et des grappes dans le " - "cœur sous la forme (type@nom, position) " - "(ex. (Rodbank@RB, 62) pour le groupe de grappe RB positionné à 62 " - "pas extraits et (Rodcluster@H08, 0) pour la grappe H08 " - "complètement insérée)"), - ang=("Initial position of the rod banks and the rod clusters in the " - "core in the form (type@name, position) " - "(e.g. (Rodbank@RB, 62) for the RB rod bank placed at 62 " - "extracted steps and (Rodcluster@H08, 0) for the rod cluster H08 " - "completely inserted)"), - unite="extracted steps", - statut="o", - typ=Tuple(2), # TODO: Use a triplet (type, name, position) instead of a doublet - validators=VerifTypeTuple(("TXM", "I")), - max="**"), - scenario_type=SIMP( - fr="Type de transitoire à modéliser", - ang="Type of transient to model", - statut="o", - typ="TXM", - into=("RIA", )), - b_ria=BLOC( - condition="scenario_type == 'RIA'", - fr="Données du transitoire 'accident de réactivité'", - ang="Data of the 'Reactivity-initiated Accident' transient", - ejected_rod=SIMP( - fr="Nom de la grappe éjectée", - ang="Name of the ejected rod cluster", - statut="o", - typ="TXM"), - rod_position_program=SIMP( - fr="Loi d'éjection à appliquer à la grappe sous la forme (temps, position)", - ang="Ejection law to apply to the ejected rod cluster in the form (time, position)", - unite="s, extracted steps", - statut="o", - typ=Tuple(2), - validators=VerifTypeTuple(("R", "I")), - max="**"), - SCRAM=SIMP( - fr="Activation/désactivation de l'arrêt automatique du réacteur", - ang="Activation/deactivation of automatic reactor shutdown", - statut="o", - typ="TXM", - into=("YES", "NO")), - SCRAM_option=BLOC( - condition="SCRAM == 'YES'", - fr="Options relatives à l'arrêt automatique du réacteur", - ang="Options relative to the automatic reactor shutdown", - SCRAM_power=SIMP( - fr=("Puissance thermique du cœur déclenchant un arrêt " - "automatique du réacteur"), - ang="Core thermal power triggering an automatic reactor shutdown", - unite="MW", - statut="o", - typ="R"), - complete_SCRAM_time=SIMP( - fr="Temps de chute des grappes", - ang="Rod cluster fall time", - unite="s", - statut="o", - typ="R"))), - post_processing=SIMP( - # TODO: Give all the possible parameters depending of the physics - fr=("Données de sortie du calcul sous la forme (paramètre@physique, format). " - "'physique' peut valoir {physics!r} et 'format' peut valoir {formats!r}".format( - physics=VerifPostTreatment.PHYSICS, - formats=VerifPostTreatment.FORMATS)), - ang=("Output computed data in function of time in the form (parameter@physic, format). " - "'physic' can be {physics!r} and 'format' can be {formats!r})".format( - physics=VerifPostTreatment.PHYSICS, - formats=VerifPostTreatment.FORMATS)), - statut="f", - typ=Tuple(2), # TODO: Use a triplet (parameter, physic, format) instead of a doublet - validators=VerifPostTreatment(), - max="**")) diff --git a/ReacteurNumerique/edg_REP1300_FULL_PN.comm b/ReacteurNumerique/edg_REP1300_FULL_PN.comm deleted file mode 100644 index 38b5d3da..00000000 --- a/ReacteurNumerique/edg_REP1300_FULL_PN.comm +++ /dev/null @@ -1,177 +0,0 @@ - -REF=Assembly(assembly_type='REF',); - -U1=Assembly(assembly_type='UOX', - assembly_width=0.21504, - fuel_density=0.95, - radial_description=_F(clad_outer_radius=0.00475, - guide_tube_outer_radius=0.006025, - fuel_rod_pitch=0.0126, - nfuel_rods=264,), - axial_description=_F(active_length_start=0.21, - active_length_end=4.4772,), - grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), - size=0.033,), - non_mixing=_F(positions=(0.026,4.2412,), - size=0.033,),),); - -UGD=Assembly(assembly_type='UOX', - assembly_width=0.21504, - fuel_density=0.95, - radial_description=_F(clad_outer_radius=0.00475, - guide_tube_outer_radius=0.006025, - fuel_rod_pitch=0.0126, - nfuel_rods=264,), - axial_description=_F(active_length_start=0.21, - active_length_end=4.4772,), - grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), - size=0.033,), - non_mixing=_F(positions=(0.026,), - size=0.033,),),); - -RB=RodBank(rod_type='heterogeneous', - bottom_composition='AIC', - splitting_heigh=1.4224, - upper_composition='B4C', - step_height=0.016, - nsteps=260,); - -N1=RodBank(rod_type='heterogeneous', - bottom_composition='AIC', - splitting_heigh=1.4224, - upper_composition='B4C', - step_height=0.016, - nsteps=260,); - -N2=RodBank(rod_type='heterogeneous', - bottom_composition='AIC', - splitting_heigh=1.4226, - upper_composition='B4C', - step_height=0.016, - nsteps=260,); - -G1=RodBank(rod_type='homogeneous', - rod_composition='Grey', - step_height=0.016, - nsteps=260,); - -G2=RodBank(rod_type='homogeneous', - rod_composition='Grey', - step_height=0.016, - nsteps=260,); - -techno_data=Techno_data(assembly_list=(REF,U1,UGD,), - rodbank_list=(RB,G1,G2,N1,N2,), - radial_description=_F(nb_assembly=15, - xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), - yaxis= - ('RS','15','14','13','12','11', - '10','09','08','07','06','05','04','03','02','01','RN',), - assembly_map= - ([REF,REF,REF,REF,REF,REF, - REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,],[REF,REF, - REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,], - [REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF, - REF,REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1, - UGD,REF,REF,],[REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD, - U1,U1,U1,REF,REF,],[REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1, - U1,UGD,U1,UGD,U1,REF,],[REF,U1,UGD,U1,U1,U1,UGD,UGD,U1, - UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1,U1,UGD,UGD,UGD,UGD, - U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,U1,U1,U1,U1, - U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,],[REF,U1,U1,UGD,UGD, - UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,UGD, - U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1, - UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,], - [REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF, - REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD, - REF,REF,],[REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1, - UGD,REF,REF,REF,],[REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1, - U1,REF,REF,REF,REF,REF,],[REF,REF,REF,REF,REF,REF,REF,REF, - REF,REF,REF,REF,REF,REF,REF,REF,REF,],), - rod_map= - (['#','#','#','#','#','#','#', - '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', - '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', - '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', - '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', - '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], - ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', - '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', - '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', - 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', - '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', - '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', - 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', - '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', - 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', - '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], - ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', - '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', - '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', - '#','#','#'],), - BU_map= - ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, - 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, - 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, - 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, - 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, - 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, - 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, - 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, - 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, - 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, - 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, - 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, - 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, - 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, - 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, - 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, - 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), - axial_description=_F(lower_refl_size=0.21, - upper_refl_size=0.21,), - nominal_power=4000000000.0, - Fuel_power_fraction=0.974, - by_pass=0.07, - core_volumic_flowrate=90940.0,); - -neutro_model=Model_data(physics='Neutronics', - scale='component', - code='APOLLO3', - radial_meshing=_F(flux_solver='subdivision', - flux_subdivision=2, - feedback_solver='subdivision', - feedback_subdivision=1,), - axial_meshing=_F(lower_refl=2, - fuel=42, - upper_refl=2,),); - -thermo_model=Model_data(physics='Thermalhydraulics', - scale='component', - code='FLICA4', - radial_meshing=_F(fluid='subdivision', - fluid_subdivision=1, - pellet=8, - clad=2,), - axial_meshing=_F(lower_refl=1, - fuel=40, - upper_refl=1,),); - -scenario_data=Scenario_data(initial_power=0.1, - initial_power_unit='% Nominal power', - initial_core_inlet_temperature=290.0, - initial_boron_concentration=1300.0, - initial_inlet_pressure=160.2, - initial_outlet_pressure=157.2, - initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), - scenario_type='RIA', - ejected_rod='H02', - rod_position_program=((0.0,0),(0.1,260)), - SCRAM='YES', - SCRAM_power=1130.0, - complete_SCRAM_time=1.0, - post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); -#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE -#CHECKSUM:25881dd6462363b8aeb1384fa470b79e:FIN CHECKSUM \ No newline at end of file diff --git a/ReacteurNumerique/exempleGetDicoPython.py b/ReacteurNumerique/exempleGetDicoPython.py new file mode 100755 index 00000000..de05deda --- /dev/null +++ b/ReacteurNumerique/exempleGetDicoPython.py @@ -0,0 +1,16 @@ +# fichier exemple pour modifier initial_power +# Modules Python +# Modules Eficas +# la on peut mettre le EFICAS_DIR +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +from InterfaceQT4.eficas_go import getDicoPython + +#monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG.py","edg_REP1300_FULL.comm") +monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG.py","/tmp/toto.comm") +from pprint import pprint +pprint (monDico) + + + + diff --git a/ReacteurNumerique/exempleLectureObjetPython.py b/ReacteurNumerique/exempleLectureObjetPython.py new file mode 100755 index 00000000..30e289c1 --- /dev/null +++ b/ReacteurNumerique/exempleLectureObjetPython.py @@ -0,0 +1,24 @@ +# fichier exemple pour modifier initial_power +# Modules Python +# Modules Eficas +# la on peut mettre le EFICAS_DIR +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +from InterfaceQT4.eficas_go import getObjectPython + +from InterfaceQT4.eficas_go import getObjectPython +monJdC=getObjectPython("ReacteurNumerique","cata_RN_EDG.py","edg_REP1300_FULL.comm") + +monScenarioData=monJdC.Scenario_data[0] # Au 1er niveau, on a toujours des listes en eficas +print ('monScenarioData.initial_power', monScenarioData.initial_power) # ici on a la valeur directement (comme en pyxb et pas l objet +monObjetInital_Power=monScenarioData.getChildOrChildInBloc('initial_power') # la on a l objet python +OkPourChangement= monObjetInital_Power.validValeur('tototo') # on verifie que la valeur que l onj veut mettre est valide +print ('toto est elle une valeur valide pour monScenarioData.initial_power ? ', OkPourChangement) +OkPourChangement= monObjetInital_Power.validValeur(0.11) # on verifie que la valeur que l onj veut mettre est valide +if OkPourChangement : + changementFait = monObjetInital_Power.setValeur(0.11) + print ('changementFait :' , changementFait) + print ('monScenarioData.initial_power' , monScenarioData.initial_power) +monJdC.editor.saveFile('/tmp/monNouveau.comm') + + diff --git a/ReacteurNumerique/exempleLectureObjetPyxb.py b/ReacteurNumerique/exempleLectureObjetPyxb.py new file mode 100755 index 00000000..e47649b0 --- /dev/null +++ b/ReacteurNumerique/exempleLectureObjetPyxb.py @@ -0,0 +1,230 @@ +#! /usr/bin/env python3 +# -*- coding:utf-8 -*- +import sys + +#print(sys.argv[:]) + +import cata_RN_EDG_driver as mdm +import pyxb + +#THESE CONFIGURATION LINES ARE FOR ADVANCED INTERNAL TEST ONLY, YOU DON'T NEED TO CONFIGURE PYXB LIKE THIS +#mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.NEVER) +mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.ALWAYS) +mdm.pyxb.GlobalValidationConfig._setInvalidElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) +mdm.pyxb.GlobalValidationConfig._setOrphanElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) + +jdd = mdm.CreateFromDocument(open('cata_RN_EDG_test_driver_1.xml').read()) +print(jdd.toDOM().toprettyxml()) + +txt="" +assembly_type = jdd.Assembly[0].assembly_type +txt += "assembly_type" + " = " +str( assembly_type)+"\n" +assembly_type_1 = jdd.Assembly[1].assembly_type +txt += "assembly_type_1" + " = " +str( assembly_type_1)+"\n" +assembly_width = jdd.Assembly[1].assembly_width +txt += "assembly_width" + " = " +str( assembly_width)+"\n" +fuel_density = jdd.Assembly[1].fuel_density +txt += "fuel_density" + " = " +str( fuel_density)+"\n" +clad_outer_radius = jdd.Assembly[1].radial_description.clad_outer_radius +txt += "clad_outer_radius" + " = " +str( clad_outer_radius)+"\n" +guide_tube_outer_radius = jdd.Assembly[1].radial_description.guide_tube_outer_radius +txt += "guide_tube_outer_radius" + " = " +str( guide_tube_outer_radius)+"\n" +fuel_rod_pitch = jdd.Assembly[1].radial_description.fuel_rod_pitch +txt += "fuel_rod_pitch" + " = " +str( fuel_rod_pitch)+"\n" +nfuel_rods = jdd.Assembly[1].radial_description.nfuel_rods +txt += "nfuel_rods" + " = " +str( nfuel_rods)+"\n" +active_length_start = jdd.Assembly[1].axial_description.active_length_start +txt += "active_length_start" + " = " +str( active_length_start)+"\n" +active_length_end = jdd.Assembly[1].axial_description.active_length_end +txt += "active_length_end" + " = " +str( active_length_end)+"\n" +positions = jdd.Assembly[1].grids.mixing.positions +txt += "positions" + " = " +str( positions)+"\n" +size = jdd.Assembly[1].grids.mixing.size +txt += "size" + " = " +str( size)+"\n" +positions_1 = jdd.Assembly[1].grids.non_mixing.positions +txt += "positions_1" + " = " +str( positions_1)+"\n" +size_1 = jdd.Assembly[1].grids.non_mixing.size +txt += "size_1" + " = " +str( size_1)+"\n" +assembly_type_2 = jdd.Assembly[2].assembly_type +txt += "assembly_type_2" + " = " +str( assembly_type_2)+"\n" +assembly_width_1 = jdd.Assembly[2].assembly_width +txt += "assembly_width_1" + " = " +str( assembly_width_1)+"\n" +fuel_density_1 = jdd.Assembly[2].fuel_density +txt += "fuel_density_1" + " = " +str( fuel_density_1)+"\n" +clad_outer_radius_1 = jdd.Assembly[2].radial_description.clad_outer_radius +txt += "clad_outer_radius_1" + " = " +str( clad_outer_radius_1)+"\n" +guide_tube_outer_radius_1 = jdd.Assembly[2].radial_description.guide_tube_outer_radius +txt += "guide_tube_outer_radius_1" + " = " +str( guide_tube_outer_radius_1)+"\n" +fuel_rod_pitch_1 = jdd.Assembly[2].radial_description.fuel_rod_pitch +txt += "fuel_rod_pitch_1" + " = " +str( fuel_rod_pitch_1)+"\n" +nfuel_rods_1 = jdd.Assembly[2].radial_description.nfuel_rods +txt += "nfuel_rods_1" + " = " +str( nfuel_rods_1)+"\n" +active_length_start_1 = jdd.Assembly[2].axial_description.active_length_start +txt += "active_length_start_1" + " = " +str( active_length_start_1)+"\n" +active_length_end_1 = jdd.Assembly[2].axial_description.active_length_end +txt += "active_length_end_1" + " = " +str( active_length_end_1)+"\n" +positions_2 = jdd.Assembly[2].grids.mixing.positions +txt += "positions_2" + " = " +str( positions_2)+"\n" +size_2 = jdd.Assembly[2].grids.mixing.size +txt += "size_2" + " = " +str( size_2)+"\n" +positions_3 = jdd.Assembly[2].grids.non_mixing.positions +txt += "positions_3" + " = " +str( positions_3)+"\n" +size_3 = jdd.Assembly[2].grids.non_mixing.size +txt += "size_3" + " = " +str( size_3)+"\n" +rod_type = jdd.RodBank[0].rod_type +txt += "rod_type" + " = " +str( rod_type)+"\n" +bottom_composition = jdd.RodBank[0].bottom_composition +txt += "bottom_composition" + " = " +str( bottom_composition)+"\n" +splitting_heigh = jdd.RodBank[0].splitting_heigh +txt += "splitting_heigh" + " = " +str( splitting_heigh)+"\n" +upper_composition = jdd.RodBank[0].upper_composition +txt += "upper_composition" + " = " +str( upper_composition)+"\n" +step_height = jdd.RodBank[0].step_height +txt += "step_height" + " = " +str( step_height)+"\n" +nsteps = jdd.RodBank[0].nsteps +txt += "nsteps" + " = " +str( nsteps)+"\n" +rod_type_1 = jdd.RodBank[1].rod_type +txt += "rod_type_1" + " = " +str( rod_type_1)+"\n" +bottom_composition_1 = jdd.RodBank[1].bottom_composition +txt += "bottom_composition_1" + " = " +str( bottom_composition_1)+"\n" +splitting_heigh_1 = jdd.RodBank[1].splitting_heigh +txt += "splitting_heigh_1" + " = " +str( splitting_heigh_1)+"\n" +upper_composition_1 = jdd.RodBank[1].upper_composition +txt += "upper_composition_1" + " = " +str( upper_composition_1)+"\n" +step_height_1 = jdd.RodBank[1].step_height +txt += "step_height_1" + " = " +str( step_height_1)+"\n" +nsteps_1 = jdd.RodBank[1].nsteps +txt += "nsteps_1" + " = " +str( nsteps_1)+"\n" +rod_type_2 = jdd.RodBank[2].rod_type +txt += "rod_type_2" + " = " +str( rod_type_2)+"\n" +bottom_composition_2 = jdd.RodBank[2].bottom_composition +txt += "bottom_composition_2" + " = " +str( bottom_composition_2)+"\n" +splitting_heigh_2 = jdd.RodBank[2].splitting_heigh +txt += "splitting_heigh_2" + " = " +str( splitting_heigh_2)+"\n" +upper_composition_2 = jdd.RodBank[2].upper_composition +txt += "upper_composition_2" + " = " +str( upper_composition_2)+"\n" +step_height_2 = jdd.RodBank[2].step_height +txt += "step_height_2" + " = " +str( step_height_2)+"\n" +nsteps_2 = jdd.RodBank[2].nsteps +txt += "nsteps_2" + " = " +str( nsteps_2)+"\n" +rod_type_3 = jdd.RodBank[3].rod_type +txt += "rod_type_3" + " = " +str( rod_type_3)+"\n" +rod_composition = jdd.RodBank[3].rod_composition +txt += "rod_composition" + " = " +str( rod_composition)+"\n" +step_height_3 = jdd.RodBank[3].step_height +txt += "step_height_3" + " = " +str( step_height_3)+"\n" +nsteps_3 = jdd.RodBank[3].nsteps +txt += "nsteps_3" + " = " +str( nsteps_3)+"\n" +rod_type_4 = jdd.RodBank[4].rod_type +txt += "rod_type_4" + " = " +str( rod_type_4)+"\n" +rod_composition_1 = jdd.RodBank[4].rod_composition +txt += "rod_composition_1" + " = " +str( rod_composition_1)+"\n" +step_height_4 = jdd.RodBank[4].step_height +txt += "step_height_4" + " = " +str( step_height_4)+"\n" +nsteps_4 = jdd.RodBank[4].nsteps +txt += "nsteps_4" + " = " +str( nsteps_4)+"\n" +assembly_list = jdd.Techno_data[0].assembly_list +txt += "assembly_list" + " = " +str( assembly_list)+"\n" +rodbank_list = jdd.Techno_data[0].rodbank_list +txt += "rodbank_list" + " = " +str( rodbank_list)+"\n" +nb_assembly = jdd.Techno_data[0].radial_description.nb_assembly +txt += "nb_assembly" + " = " +str( nb_assembly)+"\n" +xaxis = jdd.Techno_data[0].radial_description.xaxis +txt += "xaxis" + " = " +str( xaxis)+"\n" +yaxis = jdd.Techno_data[0].radial_description.yaxis +txt += "yaxis" + " = " +str( yaxis)+"\n" +assembly_map = jdd.Techno_data[0].radial_description.assembly_map +txt += "assembly_map" + " = " +"\n" +for l in assembly_map.line : txt += str(l)+"\n" +rod_map = jdd.Techno_data[0].radial_description.rod_map +txt += "rod_map" + " = " +"\n" +for l in rod_map.line : txt += str(l)+"\n" +BU_map = jdd.Techno_data[0].radial_description.BU_map +txt += "BU_map" + " = " +"\n" +for l in BU_map.line : txt += str(l)+"\n" +lower_refl_size = jdd.Techno_data[0].axial_description.lower_refl_size +txt += "lower_refl_size" + " = " +str( lower_refl_size)+"\n" +upper_refl_size = jdd.Techno_data[0].axial_description.upper_refl_size +txt += "upper_refl_size" + " = " +str( upper_refl_size)+"\n" +nominal_power = jdd.Techno_data[0].nominal_power +txt += "nominal_power" + " = " +str( nominal_power)+"\n" +Fuel_power_fraction = jdd.Techno_data[0].Fuel_power_fraction +txt += "Fuel_power_fraction" + " = " +str( Fuel_power_fraction)+"\n" +by_pass = jdd.Techno_data[0].by_pass +txt += "by_pass" + " = " +str( by_pass)+"\n" +core_volumic_flowrate = jdd.Techno_data[0].core_volumic_flowrate +txt += "core_volumic_flowrate" + " = " +str( core_volumic_flowrate)+"\n" +physics = jdd.Model_data[0].physics +txt += "physics" + " = " +str( physics)+"\n" +scale = jdd.Model_data[0].scale +txt += "scale" + " = " +str( scale)+"\n" +code = jdd.Model_data[0].code +txt += "code" + " = " +str( code)+"\n" +flux_solver = jdd.Model_data[0].radial_meshing.flux_solver +txt += "flux_solver" + " = " +str( flux_solver)+"\n" +flux_subdivision = jdd.Model_data[0].radial_meshing.flux_subdivision +txt += "flux_subdivision" + " = " +str( flux_subdivision)+"\n" +feedback_solver = jdd.Model_data[0].radial_meshing.feedback_solver +txt += "feedback_solver" + " = " +str( feedback_solver)+"\n" +feedback_subdivision = jdd.Model_data[0].radial_meshing.feedback_subdivision +txt += "feedback_subdivision" + " = " +str( feedback_subdivision)+"\n" +lower_refl = jdd.Model_data[0].axial_meshing.lower_refl +txt += "lower_refl" + " = " +str( lower_refl)+"\n" +fuel = jdd.Model_data[0].axial_meshing.fuel +txt += "fuel" + " = " +str( fuel)+"\n" +upper_refl = jdd.Model_data[0].axial_meshing.upper_refl +txt += "upper_refl" + " = " +str( upper_refl)+"\n" +physics_1 = jdd.Model_data[1].physics +txt += "physics_1" + " = " +str( physics_1)+"\n" +scale_1 = jdd.Model_data[1].scale +txt += "scale_1" + " = " +str( scale_1)+"\n" +code_1 = jdd.Model_data[1].code +txt += "code_1" + " = " +str( code_1)+"\n" +fluid = jdd.Model_data[1].radial_meshing.fluid +txt += "fluid" + " = " +str( fluid)+"\n" +fluid_subdivision = jdd.Model_data[1].radial_meshing.fluid_subdivision +txt += "fluid_subdivision" + " = " +str( fluid_subdivision)+"\n" +pellet = jdd.Model_data[1].radial_meshing.pellet +txt += "pellet" + " = " +str( pellet)+"\n" +clad = jdd.Model_data[1].radial_meshing.clad +txt += "clad" + " = " +str( clad)+"\n" +lower_refl_1 = jdd.Model_data[1].axial_meshing.lower_refl +txt += "lower_refl_1" + " = " +str( lower_refl_1)+"\n" +fuel_1 = jdd.Model_data[1].axial_meshing.fuel +txt += "fuel_1" + " = " +str( fuel_1)+"\n" +upper_refl_1 = jdd.Model_data[1].axial_meshing.upper_refl +txt += "upper_refl_1" + " = " +str( upper_refl_1)+"\n" +initial_power = jdd.Scenario_data[0].initial_power +txt += "initial_power" + " = " +str( initial_power)+"\n" +initial_power_unit = jdd.Scenario_data[0].initial_power_unit +txt += "initial_power_unit" + " = " +str( initial_power_unit)+"\n" +initial_core_inlet_temperature = jdd.Scenario_data[0].initial_core_inlet_temperature +txt += "initial_core_inlet_temperature" + " = " +str( initial_core_inlet_temperature)+"\n" +initial_boron_concentration = jdd.Scenario_data[0].initial_boron_concentration +txt += "initial_boron_concentration" + " = " +str( initial_boron_concentration)+"\n" +initial_inlet_pressure = jdd.Scenario_data[0].initial_inlet_pressure +txt += "initial_inlet_pressure" + " = " +str( initial_inlet_pressure)+"\n" +initial_outlet_pressure = jdd.Scenario_data[0].initial_outlet_pressure +txt += "initial_outlet_pressure" + " = " +str( initial_outlet_pressure)+"\n" +initial_rod_positions = jdd.Scenario_data[0].initial_rod_positions +txt += "initial_rod_positions" + " = " + "\n" +for t in initial_rod_positions: txt+="("+str(t.n1)+","+str(t.n2)+")"+"\n" +scenario_type = jdd.Scenario_data[0].scenario_type +txt += "scenario_type" + " = " +str( scenario_type)+"\n" +ejected_rod = jdd.Scenario_data[0].ejected_rod +txt += "ejected_rod" + " = " +str( ejected_rod)+"\n" +rod_position_program = jdd.Scenario_data[0].rod_position_program +txt += "rod_position_program" + " = " +"\n" +for t in rod_position_program: txt+="("+str(t.n1)+","+str(t.n2)+")"+"\n" +SCRAM = jdd.Scenario_data[0].SCRAM +txt += "SCRAM" + " = " +str( SCRAM)+"\n" +SCRAM_power = jdd.Scenario_data[0].SCRAM_power +txt += "SCRAM_power" + " = " +str( SCRAM_power)+"\n" +complete_SCRAM_time = jdd.Scenario_data[0].complete_SCRAM_time +txt += "complete_SCRAM_time" + " = " +str( complete_SCRAM_time)+"\n" +post_processing = jdd.Scenario_data[0].post_processing +txt += "post_processing" + " = " + "\n" +for t in post_processing: txt+="("+str(t.n1)+","+str(t.n2)+")"+"\n" +print (txt) + + diff --git a/ReacteurNumerique/exempleValideUnFichier.py b/ReacteurNumerique/exempleValideUnFichier.py new file mode 100755 index 00000000..b9d93136 --- /dev/null +++ b/ReacteurNumerique/exempleValideUnFichier.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour MAP +""" +# Modules Python +# Modules Eficas +# la on peut mettre le EFICAS_DIR +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from InterfaceQT4.eficas_go import validateFile +print (validateFile("ReacteurNumerique","cata_RN_EDG.py","edg_REP1300_FULL.comm")) diff --git a/ReacteurNumerique/getDicoPython.py b/ReacteurNumerique/getDicoPython.py deleted file mode 100755 index c6f58810..00000000 --- a/ReacteurNumerique/getDicoPython.py +++ /dev/null @@ -1,16 +0,0 @@ -# fichier exemple pour modifier initial_power -# Modules Python -# Modules Eficas -# la on peut mettre le EFICAS_DIR -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) -from InterfaceQT4.eficas_go import getDicoPython - -#monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG_PN.py","edg_REP1300_FULL_PN.comm") -monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG_PN.py","/tmp/toto.comm") -from pprint import pprint -pprint (monDico) - - - - diff --git a/ReacteurNumerique/lectureObjetPython.py b/ReacteurNumerique/lectureObjetPython.py deleted file mode 100755 index 30e289c1..00000000 --- a/ReacteurNumerique/lectureObjetPython.py +++ /dev/null @@ -1,24 +0,0 @@ -# fichier exemple pour modifier initial_power -# Modules Python -# Modules Eficas -# la on peut mettre le EFICAS_DIR -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) -from InterfaceQT4.eficas_go import getObjectPython - -from InterfaceQT4.eficas_go import getObjectPython -monJdC=getObjectPython("ReacteurNumerique","cata_RN_EDG.py","edg_REP1300_FULL.comm") - -monScenarioData=monJdC.Scenario_data[0] # Au 1er niveau, on a toujours des listes en eficas -print ('monScenarioData.initial_power', monScenarioData.initial_power) # ici on a la valeur directement (comme en pyxb et pas l objet -monObjetInital_Power=monScenarioData.getChildOrChildInBloc('initial_power') # la on a l objet python -OkPourChangement= monObjetInital_Power.validValeur('tototo') # on verifie que la valeur que l onj veut mettre est valide -print ('toto est elle une valeur valide pour monScenarioData.initial_power ? ', OkPourChangement) -OkPourChangement= monObjetInital_Power.validValeur(0.11) # on verifie que la valeur que l onj veut mettre est valide -if OkPourChangement : - changementFait = monObjetInital_Power.setValeur(0.11) - print ('changementFait :' , changementFait) - print ('monScenarioData.initial_power' , monScenarioData.initial_power) -monJdC.editor.saveFile('/tmp/monNouveau.comm') - - diff --git a/ReacteurNumerique/prefs_ReacteurNumerique.py b/ReacteurNumerique/prefs_ReacteurNumerique.py index 14d878cf..9ed5a1af 100644 --- a/ReacteurNumerique/prefs_ReacteurNumerique.py +++ b/ReacteurNumerique/prefs_ReacteurNumerique.py @@ -36,7 +36,7 @@ encoding='iso-8859-1' # #typeDeCata='XML' catalogues=( - ('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_EDG_PN.py'),'python','python'), + ('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_EDG.py'),'python','python'), ) #nombreDeBoutonParLigne=4 simpleClic=True diff --git a/ReacteurNumerique/valideUnFichier.py b/ReacteurNumerique/valideUnFichier.py deleted file mode 100755 index 86593dc5..00000000 --- a/ReacteurNumerique/valideUnFichier.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour MAP -""" -# Modules Python -# Modules Eficas -# la on peut mettre le EFICAS_DIR -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -from InterfaceQT4.eficas_go import validateFile -print (validateFile("ReacteurNumerique","cata_RN_EDG_PN.py","edg_REP1300_FULL_PN.comm")) diff --git a/Tools/generateComm.py b/Tools/generateComm.py index 96a2130f..052ca6f2 100755 --- a/Tools/generateComm.py +++ b/Tools/generateComm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2007-2013 EDF R&D # diff --git a/UiQT5/desWidgetFactTableau.ui b/UiQT5/desWidgetFactTableau.ui deleted file mode 100644 index f736a471..00000000 --- a/UiQT5/desWidgetFactTableau.ui +++ /dev/null @@ -1,428 +0,0 @@ - - - WidgetFactTableau - - - - 0 - 0 - 949 - 225 - - - - Qt::StrongFocus - - - Form - - - QGroupBox { - border: 1px solid gray; - border-radius: 5px; - margin-top: 1ex; /* leave space at the top for the title */ - } - - QGroupBox::title { - padding: 0 3px; - } - - - - 0 - - - 0 - - - 2 - - - 0 - - - 0 - - - - - 0 - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 5 - - - - - - - - - 21 - 15 - - - - - 21 - 21 - - - - border : 0px - - - ... - - - - ../Editeur/icons/minusnode.png../Editeur/icons/minusnode.png - - - - 21 - 21 - - - - - - - - - - Qt::Vertical - - - - - - - - - - - 0 - - - - - - 17 - 25 - - - - - 21 - 25 - - - - border : 0px - - - ... - - - - ../Editeur/icons/ast-green-ball.png../Editeur/icons/ast-green-ball.png - - - - 21 - 25 - - - - - - - - 0 - - - - - - 0 - 0 - - - - - 0 - 25 - - - - - 12121213 - 25 - - - - <html><head/><body><p><span style=" font-style:italic;">TextLabel</span></p></body></html> - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 13 - 20 - - - - - - - - - 0 - 0 - - - - - 200 - 0 - - - - - 1500 - 16 - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 13 - 20 - - - - - - - - 0 - - - QLayout::SetFixedSize - - - - - - 21 - 31 - - - - - 21 - 31 - - - - Qt::ClickFocus - - - Lance un script associé à la commande - - - border : 0px - - - ... - - - - ../Editeur/icons/roue.png../Editeur/icons/roue.png - - - - 21 - 31 - - - - - - - - - 21 - 25 - - - - - 21 - 25 - - - - border : 0px - - - ... - - - - ../Editeur/icons/point-interrogation30.png../Editeur/icons/point-interrogation30.png - - - - 21 - 25 - - - - - - - - - 21 - 25 - - - - - 21 - 25 - - - - border : 0px - - - ... - - - - ../Editeur/icons/lettreRblanc30.png../Editeur/icons/lettreRblanc30.png - - - - 21 - 25 - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 13 - 20 - - - - - - - - - 21 - 25 - - - - - 21 - 25 - - - - border : 0px - - - ... - - - - ../Editeur/icons/deleteRond.png../Editeur/icons/deleteRond.png - - - - 21 - 25 - - - - - - - - - - 0 - - - 2 - - - - - - - - - - - - MonBoutonValide - QToolButton -
monBoutonValide.h
-
- - MonLabelClic - QLabel -
monLabelClic.h
-
-
- - -
diff --git a/UiQT5/desWidgetSimpTxt.ui b/UiQT5/desWidgetSimpTxt.ui index 43a90938..ff7c959e 100644 --- a/UiQT5/desWidgetSimpTxt.ui +++ b/UiQT5/desWidgetSimpTxt.ui @@ -6,8 +6,8 @@ 0 0 - 743 - 31 + 563 + 58 @@ -170,8 +170,17 @@ 0 + + 1 + + + 1 + + + 0 + @@ -208,12 +217,28 @@ border:0px; - 3 + 13 20 + + + + + 0 + 0 + + + + Active le parametre comme variable UQ + + + + + + @@ -224,7 +249,7 @@ border:0px; - 5 + 13 20 @@ -278,7 +303,7 @@ border:0px; 20 - 1 + 13 diff --git a/config/test_driver_subst.py b/config/test_driver_subst.py index bd7d9edc..37ec63eb 100755 --- a/config/test_driver_subst.py +++ b/config/test_driver_subst.py @@ -7,12 +7,6 @@ import sys import @module@ as mdm import pyxb -#THESE CONFIGURATION LINES ARE FOR ADVANCED INTERNAL TEST ONLY, YOU DON'T NEED TO CONFIGURE PYXB LIKE THIS -#mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.NEVER) -mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.ALWAYS) -mdm.pyxb.GlobalValidationConfig._setInvalidElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) -mdm.pyxb.GlobalValidationConfig._setOrphanElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) - o1 = mdm.CreateFromDocument(open('@file@').read()) print(o1.toDOM().toprettyxml()) diff --git a/config/test_driver_subst_with_pyxb_settings.py b/config/test_driver_subst_with_pyxb_settings.py new file mode 100755 index 00000000..bd7d9edc --- /dev/null +++ b/config/test_driver_subst_with_pyxb_settings.py @@ -0,0 +1,18 @@ +#! /usr/bin/env python3 +# -*- coding:utf-8 -*- +import sys + +#print(sys.argv[:]) + +import @module@ as mdm +import pyxb + +#THESE CONFIGURATION LINES ARE FOR ADVANCED INTERNAL TEST ONLY, YOU DON'T NEED TO CONFIGURE PYXB LIKE THIS +#mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.NEVER) +mdm.pyxb.GlobalValidationConfig._setContentInfluencesGeneration(mdm.pyxb.GlobalValidationConfig.ALWAYS) +mdm.pyxb.GlobalValidationConfig._setInvalidElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) +mdm.pyxb.GlobalValidationConfig._setOrphanElementInContent(mdm.pyxb.GlobalValidationConfig.RAISE_EXCEPTION) + +o1 = mdm.CreateFromDocument(open('@file@').read()) +print(o1.toDOM().toprettyxml()) +