+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2008-2018 EDF R&D
-#
-# This file is part of SALOME ADAO module
-#
-# 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
-import os
-from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice
-from Extensions.i18n import tr
-import types
-monFichier = os.path.abspath(__file__)
-
-JdC = JDC_CATA(
- code='RN_EDG'
-)
-VERSION_CATALOGUE = 'V_0'
-
-
-NMIN_ASSEMBLY = 1
-NMAX_ASSEMBLY = 18
-
-
-class Tuple:
- def __init__(self, ntuple):
- self.ntuple = ntuple
-
- def __convert__(self, valeur):
- if len(valeur) != self.ntuple:
- return None
- return valeur
-
- def info(self):
- return "Tuple de %s elements" % self.ntuple
-
-
-class VerifPostTreatment(VerifTypeTuple):
-
- def __init__(self):
- super(VerifPostTreatment, self).__init__(('TXM', 'TXM'))
- self.cata_info = ""
- self.physValeurs = ('Neutronics', 'Thermalhydraulics')
- self.typeValeurs = ('MED', 'SUM', 'MIN', 'MAX', 'MEAN')
-
- def info(self):
- return tr(": verifie 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 etre de type %s ") % (valeur, self.typeDesTuples))
- ok = self.verifType(valeur)
- if ok == 0:
- raise ValueError(
- tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok))
- if ok < 0:
- raise ValueError(
- tr("%s devrait etre dans %s ") % (valeur[1], self.typeValeurs))
- 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:
- return 0
- return 1
-
- def verifType(self, valeur):
- ok = 0
- for v in valeur:
- if type(v) == bytes or type(v) == str:
- ok += 1
- if ok == len(self.typeDesTuples):
- if valeur[1] in self.typeValeurs: # and valeur[1] in self.physValeurs:
- 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):
-
- def __init__(self):
- super(VerifNeutLib, self).__init__((myAssembly, 'TXM'))
- self.cata_info = ""
-
- def info(self):
- return tr(": verifie 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 etre de type %s ") % (valeur, self.typeDesTuples))
- ok = self.verifType(valeur)
- if ok == 0:
- raise ValueError(
- tr("%s devrait etre 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:
- return 0
- return 1
-
- def verifType(self, valeur):
- ok = 0
- a, v = valeur
- if isinstance(a, myAssembly):
- ok += 1
- if type(v) == bytes or type(v) == 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 myAssembly(ASSD):
- pass
-
-
-class myTechnoData(ASSD):
- pass
-
-
-class myRodBank(ASSD):
- pass
-
-
-class myModelData(ASSD):
- pass
-
-
-class myScenarioData(ASSD):
- pass
-
-
-Assembly = OPER(nom='Assembly', sd_prod=myAssembly,
- #assembly_name=SIMP(statut='o', typ='TXM'),
- assembly_type=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")),
- description=BLOC(condition='assembly_type != "REF"',
- assembly_width=SIMP(statut='o', typ='R'),
- fuel_density=SIMP(statut='o', typ='R', defaut=0.95),
- radial_description=FACT(statut='o',
- clad_outer_radius=SIMP(statut='o', typ='R'),
- guide_tube_outer_radius=SIMP(statut='o', typ='R'),
- fuel_rod_pitch=SIMP(statut='o', typ='R'),
- nfuel_rods=SIMP(statut='o', typ='I')),
- axial_description=FACT(statut='o',
- active_length_start=SIMP(statut='o', typ='R'),
- active_length_end=SIMP(statut='o', typ='R')),
- grids=FACT(statut='o',
- mixing=FACT(statut='o',
- positions=SIMP(
- statut='f', typ='R', max="**"),
- size=SIMP(statut='o', typ='R')),
- non_mixing=FACT(statut='o',
- positions=SIMP(
- statut='f', typ='R', max='**'),
- size=SIMP(statut='o', typ='R')),
- )
- )
- )
-
-
-RodBank = OPER(nom="RodBank", sd_prod=myRodBank,
- #rodbank_name=SIMP(statut='o', typ='TXM'),
- rod_type=SIMP(statut='o', typ='TXM', into=("homogeneous", "heterogeneous")),
- description_HOM=BLOC(condition='rod_type == "homogeneous"',
- rod_composition=SIMP(statut='o', typ='TXM')),
- description_HET=BLOC(condition='rod_type == "heterogeneous"',
- bottom_composition=SIMP(statut='o', typ='TXM'),
- splitting_heigh=SIMP(statut='o', typ='R'),
- upper_composition=SIMP(statut='o', typ='TXM')),
- step_height=SIMP(statut='o', typ='R'),
- nsteps=SIMP(statut='o', typ='I'))
-
-
-def add_lr_refl(ass_list):
- return ["RW"] + ass_list + ["RE"]
-
-
-def add_tb_refl(ass_list):
- return ["RS"] + ass_list + ["RN"]
-
-
-def generate_ass_map(nass_list):
- xsym_list = [a for a in 'ABCDEFGHJKLNPRSTUVWXYZ']
- xsym_list.reverse()
- ysym_list = ["%02d" % i for i in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1)]
- ysym_list.reverse()
- def_xaxis = {}
- def_yaxis = {}
- for n in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1):
- def_xaxis[n] = add_lr_refl(xsym_list[-n:])
- def_yaxis[n] = add_tb_refl(ysym_list[-n:])
-
- dico = {}
- for n in nass_list:
- dico['assembly_map_%d' % n] = BLOC(condition="nb_assembly==%d" % n,
- xaxis=SIMP(statut='o',
- typ='TXM',
- min=n+2, max=n+2,
- defaut=def_xaxis[n]),
- yaxis=SIMP(statut='o',
- typ='TXM',
- min=n+2, max=n+2,
- defaut=def_yaxis[n]),
- assembly_map=SIMP(statut="o",
- typ=Matrice(nbLigs=n+2,
- nbCols=n+2,
- typElt=myAssembly, # ici c'est le nom de l'assemblage
- 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=(n+2)*[(n+2)*['.']], coloree=True),
- ),
- rod_map=SIMP(statut="o",
- typ=Matrice(nbLigs=n+2,
- nbCols=n+2,
- valSup=1,
- valMin=-1,
- #typElt=myAssembly, # ici c'est le nom de l'assemblage
- typElt='TXM', # ici c'est le nom de l'assemblage
- listeHeaders=None),
- defaut=(n+2)*[(n+2)*['.']]),
- BU_map=SIMP(statut="o",
- typ=Matrice(nbLigs=n+2,
- nbCols=n+2,
- valSup=90000.,
- valMin=0.,
- typElt='R', # ici c'est le BU
- listeHeaders=None,
- coloree=True),
- defaut=(n+2)*[(n+2)*['.']]))
-
- return dico
-
-
-Techno_data = OPER(nom='Techno_data', sd_prod=myTechnoData,
- assembly_list=SIMP(statut='o', typ=myAssembly, min=1, max="**"), # à resorber quand on mettra dans la Matrice
- rodbank_list=SIMP(statut='o', typ=myRodBank, min=0, max="**"), # idem
- radial_description=FACT(statut='o',
- nb_assembly=SIMP(statut='o', typ='I', into=list(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))),
- **(generate_ass_map(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY)))
- ), # Radial_Description
- axial_description=FACT(statut='o',
- lower_refl_size=SIMP(statut='o', typ='R'),
- upper_refl_size=SIMP(statut='o', typ='R'),
- ),
- nominal_power=SIMP(statut='o', typ='R'),
- Fuel_power_fraction=SIMP(statut='o', typ='R', defaut=0.974),
- by_pass=SIMP(statut='o', typ='R', defaut=0.07),
- core_volumic_flowrate=SIMP(statut='o', typ='R'),
- ) # Techno data
-
-Model_data = OPER(nom='Model_data', sd_prod=myModelData,
- physics=SIMP(statut='o', typ='TXM', into=(
- 'Neutronics', 'Thermalhydraulics')),
- scale=SIMP(statut='o', typ='TXM', into=(
- 'system', 'component', 'local')),
- b_neutro_compo=BLOC(condition='physics=="Neutronics" and scale=="component"',
- library_map=SIMP(statut='f', typ=Tuple(2),
- validators=VerifNeutLib(),
- max='**'),
- code=SIMP(statut='o', typ='TXM', into=('COCAGNE', 'APOLLO3')),
- radial_meshing=FACT(statut='o',
- flux_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')),
- b_flux_subdivision=BLOC(condition='flux_solver=="subdivision"',
- flux_subdivision=SIMP(statut='o', typ='I')),
- feedback_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')),
- b_feedback_subdivision=BLOC(condition='feedback_solver=="subdivision"',
- feedback_subdivision=SIMP(statut='o', typ='I')))),
- b_thermo_compo=BLOC(condition='physics=="Thermalhydraulics" and scale=="component"',
- code=SIMP(statut='o', typ='TXM', into=('THYC', 'CATHARE3', 'FLICA4')),
- radial_meshing=FACT(statut='o',
- fluid=SIMP(statut='o', typ='TXM', into=('subdivision', 'subchannel')),
- b_fluid_subdivision=BLOC(condition='fluid=="subdivision"',
- fluid_subdivision=SIMP(statut='o', typ='I')),
- pellet=SIMP(statut='o', typ='I'),
- clad=SIMP(statut='o', typ='I')),
- ),
- b_scale_compo=BLOC(condition='scale=="component"',
- axial_meshing=FACT(statut='o',
- lower_refl=SIMP(statut='o', typ='I'),
- fuel=SIMP(statut='o', typ='I'),
- upper_refl=SIMP(statut='o', typ='I'))),
- b_scale_local=BLOC(condition='scale=="local"',
- mesh_file=SIMP(statut='o', typ='Fichier')),
- )
-
-
-Scenario_data = OPER(nom='Scenario_data', sd_prod=myScenarioData,
- initial_power=SIMP(statut='o', typ='R', val_min=0.,
- defaut=100.),
- initial_power_unit=SIMP(statut='o', typ='TXM',
- into=('% Nominal power', 'W'),
- defaut='% Nominal power'),
- initial_core_inlet_temperature=SIMP(statut='o', typ='R', val_min=0.,
- defaut=280.),
- initial_boron_concentration=SIMP(statut='o', typ='R', val_min=0.,
- defaut=1300.),
- initial_inlet_pressure=SIMP(statut='o', typ='R', defaut=160.2),
- initial_outlet_pressure=SIMP(statut='o', typ='R', defaut=157.2),
- initial_rod_positions=SIMP(statut='o',
- typ=Tuple(2),
- validators=VerifTypeTuple(['TXM', 'I']),
- ang="Type@label, position (e.g. RodBank@RB, 0)",
- max='**'),
- scenario_type=SIMP(statut='o',
- typ='TXM',
- into=['RIA']),
- b_ria=BLOC(condition='scenario_type=="RIA"',
- ejected_rod=SIMP(statut='o',
- typ='TXM'),
- rod_position_program=SIMP(statut='o',
- typ=Tuple(2),
- validators=VerifTypeTuple(['R', 'I']),
- max='**'),
- SCRAM=SIMP(statut='o', typ='TXM', into=("YES", "NO")),
- SCRAM_option=BLOC(condition='SCRAM == "YES"',
- SCRAM_power=SIMP(statut='o', typ='R'),
- complete_SCRAM_time=SIMP(statut='o', typ='R'),
- ),
- ),
- post_processing=SIMP(statut='f',
- typ=Tuple(2),
- validators=VerifPostTreatment(),
- max='**'),
- )
+++ /dev/null
-# -*- 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,
- assembly_type=SIMP(
- statut="o",
- typ="TXM",
- into=("UOX", "MOX", "REF"),
- fr="Type d'élément cœur (assemblage combustible ou réflecteur",
- ang="Type of the core element (fuel assembly or reflector"),
- description=BLOC(
- condition="assembly_type != 'REF'",
- assembly_width=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Pas inter-assemblage dans le cœur",
- ang="Fuel assembly pitch in the core"),
- fuel_density=SIMP(
- statut="o",
- typ="R",
- defaut=0.95,
- unite="g/cm3",
- 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")),
- radial_description=FACT(
- statut="o",
- clad_outer_radius=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Rayon externe de la gaine des crayons combustible",
- ang="Clad external radius of the fuel pins"),
- guide_tube_outer_radius=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Rayon externe des tubes guides",
- ang="Clad external radius of the guide tubes"),
- fuel_rod_pitch=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Pas inter-crayon dans l'assemblage",
- ang="Fuel pin pitch in the assembly"),
- nfuel_rods=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de crayons combustibles dans l'assemblage",
- ang="Number of fuel pins in the assembly"),
- fr="Description radiale de l'assemblage combustible",
- ang="Fuel assembly radial description"),
- axial_description=FACT(
- statut="o",
- active_length_start=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Altitude basse de la partie active",
- ang="Lower altitude of the active part"),
- active_length_end=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Altitude haute de la partie active",
- ang="Upper altitude of the active part"),
- fr="Description axiale de l'assemblage combustible",
- ang="Fuel assembly axial description"),
- grids=FACT(
- statut="o",
- mixing=FACT(
- statut="o",
- positions=SIMP(
- statut="f",
- typ="R",
- max="**",
- unite="m",
- fr="Altitude basse de la grille",
- ang="Grid lower altitude"),
- size=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Hauteur de la grille",
- ang="Grid height"),
- fr="Description des grilles de mélange",
- ang="Mixing grids description"),
- non_mixing=FACT(
- statut="o",
- positions=SIMP(
- statut="f",
- typ="R",
- max="**",
- unite="m",
- fr="Altitude basse de la grille",
- ang="Grid lower altitude"),
- size=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Hauteur de la grille",
- ang="Grid height"),
- fr="Description des grilles de maintien",
- ang="Holding grids description"),
- fr="Description des grilles",
- ang="Grids description"),
- fr="Description d'un assemblage combustible",
- ang="Fuel assembly description"),
- fr="Description d'un élément du cœur",
- ang="Core element description")
-
-
-# TODO: Define the names of the possible compositions (Black, Grey, B4C, Hafnium and Pyrex)
-RodBank = OPER(
- nom="RodBank",
- sd_prod=_RodBank,
- rod_type=SIMP(
- statut="o",
- typ="TXM",
- into=("homogeneous", "heterogeneous"),
- fr="Type de grappes absorbantes",
- ang="Type of rod clusters"),
- description_HOM=BLOC(
- condition="rod_type == 'homogeneous'",
- rod_composition=SIMP(
- statut="o",
- typ="TXM",
- fr="Type de matériau absorbant des grappes absorbantes",
- ang="Absorbing material type of the rod clusters"),
- fr="Description d'un groupe de grappes absorbantes homogènes axialement",
- ang="Axially homogeneous rod bank description"),
- description_HET=BLOC(
- condition="rod_type == 'heterogeneous'",
- bottom_composition=SIMP(
- statut="o",
- typ="TXM",
- 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"),
- splitting_heigh=SIMP(
- statut="o",
- typ="R",
- unite="m",
- 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")),
- upper_composition=SIMP(
- statut="o",
- typ="TXM",
- 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"),
- fr="Description d'un groupe de grappes absorbantes hétérogène axialement",
- ang="Axially heterogeneous rod bank description"),
- step_height=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Hauteur d'un pas",
- ang="Step height"),
- nsteps=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de pas du groupe de grappes",
- ang="Rod bank steps number"),
- fr="Description d'un groupe de grappes absorbantes",
- ang="Rod bank description")
-
-
-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,
- xaxis=SIMP(
- statut="o",
- typ="TXM",
- min=i + 2,
- max=i + 2,
- defaut=def_xaxis[i],
- 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"),
- yaxis=SIMP(
- statut="o",
- typ="TXM",
- min=i + 2,
- max=i + 2,
- defaut=def_yaxis[i],
- 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"),
- assembly_map=SIMP(
- 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),
- 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")),
- rod_map=SIMP(
- 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) * ["."]],
- fr="Répartition radiale des groupes de grappes dans le cœur",
- ang="Rod banks radial repartition in the core"),
- BU_map=SIMP(
- 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) * ["."]],
- fr="Taux de combustion moyen des assemblages combustibles en GW.j/t",
- ang="Average burnup of the fuel assemblies in GW.d/t"),
- fr="Description radiale du cœur",
- ang="Core radial description")
- return dico
-
-
-Techno_data = OPER(
- nom="Techno_data",
- sd_prod=_TechnoData,
- assembly_list=SIMP(
- statut="o",
- typ=_Assembly,
- min=1,
- max="**",
- fr="Sélection des assemblages combustible",
- ang="Fuel assemblies selection"),
- rodbank_list=SIMP(
- statut="o",
- typ=_RodBank,
- min=0,
- max="**",
- fr="Sélection des groupes de grappes",
- ang="Rod banks selection"),
- radial_description=FACT(
- statut="o",
- nb_assembly=SIMP(
- statut="o",
- typ="I",
- into=list(range(NMIN_CORE_FUEL_ELTS, NMAX_CORE_FUEL_ELTS)),
- fr="Nombre d'éléments combustible sur la tranche du cœur",
- ang="Number of fuel elements on one side of the core"),
- **(gen_assembly_maps())),
- axial_description=FACT(
- statut="o",
- lower_refl_size=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Hauteur du réflecteur axial bas",
- ang="Height of bottom axial reflector"),
- upper_refl_size=SIMP(
- statut="o",
- typ="R",
- unite="m",
- fr="Hauteur du réflecteur axial haut",
- ang="Height of top axial reflector")),
- nominal_power=SIMP(
- statut="o",
- typ="R",
- unite="W",
- fr="Puissance thermique nominale du cœur",
- ang="Nominal thermal power of the core"),
- Fuel_power_fraction=SIMP(
- statut="o",
- typ="R",
- defaut=0.974,
- fr="Fraction de la puissance dissipée dans le combustible",
- ang="Power fraction dissipated in the fuel"),
- by_pass=SIMP(
- statut="o",
- typ="R",
- defaut=0.07,
- fr="Fraction du débit de bypass cœur",
- ang="Bypass core flow fraction"),
- core_volumic_flowrate=SIMP(
- statut="o",
- typ="R",
- unite="m3/h",
- fr="Débit volumique cœur",
- ang="Core volume flowrate"),
- fr="Description technologique du cœur",
- ang="Core technological description")
-
-
-# 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,
- physics=SIMP(
- statut="o",
- typ="TXM",
- into=("Neutronics", "Thermalhydraulics"),
- fr="Sélection de la physique du modèle",
- ang="Physic model selection"),
- scale=SIMP(
- statut="o",
- typ="TXM",
- into=("system", "component", "local"),
- fr="Sélection de l'échelle du modèle",
- ang="Scale model selection"),
- b_neutro_compo=BLOC(
- condition="physics == 'Neutronics' and scale == 'component'",
- # 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(
- statut="f",
- typ=Tuple(2),
- validators=VerifNeutLib(),
- max="**",
- 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")),
- code=SIMP(
- statut="o",
- typ="TXM",
- into=("COCAGNE", "APOLLO3"),
- fr="Sélection du code de neutronique cœur",
- ang="Core neutronic code selection"),
- # TODO: Implement the *4x4* mesh
- radial_meshing=FACT(
- statut="o",
- flux_solver=SIMP(
- statut="o",
- typ="TXM",
- into=("subdivision", "pin-by-pin"),
- fr="Type de maillage radial du solveur de flux",
- ang="Radial mesh type for the flux solver"),
- b_flux_subdivision=BLOC(
- condition="flux_solver == 'subdivision'",
- flux_subdivision=SIMP(
- statut="o",
- typ="I",
- 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")),
- 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")),
- feedback_solver=SIMP(
- statut="o",
- typ="TXM",
- into=("subdivision", "pin-by-pin"),
- fr="Type de maillage radial du solveur de contre-réaction",
- ang="Radial mesh type for the feedback solver"),
- b_feedback_subdivision=BLOC(
- condition="feedback_solver == 'subdivision'",
- feedback_subdivision=SIMP(
- statut="o",
- typ="I",
- 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")),
- 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")),
- fr="Maillage radial du cœur",
- ang="Core radial meshing"),
- fr="Description de la modélisation neutronique à l'échelle du composant",
- ang="Neutronic modeling description at the component scale"),
- b_thermo_compo=BLOC(
- condition="physics == 'Thermalhydraulics' and scale == 'component'",
- code=SIMP(
- statut="o",
- typ="TXM",
- into=("THYC", "CATHARE3", "FLICA4"),
- fr="Sélection du code de thermohydraulique cœur",
- ang="Core thermalhydraulic code selection"),
- radial_meshing=FACT(
- statut="o",
- fluid=SIMP(
- statut="o",
- typ="TXM",
- into=("subdivision", "subchannel"),
- fr="Méthode de maillage radial",
- ang="Radial meshing method"),
- b_fluid_subdivision=BLOC(
- condition="fluid == 'subdivision'",
- fluid_subdivision=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de mailles radiales dans les assemblages combustibles",
- ang="Radial mesh number in the fuel assemblies"),
- fr="Données spécifiques au maillage radial par subdivision",
- ang="Specific data for the radial meshing by subdivision"),
- pellet=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de mailles radiales dans la pastille combustible",
- ang="Radial mesh number in the fuel pellet"),
- clad=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de mailles radiales dans la gaine des crayons combustibles",
- ang="Radial mesh number in the clad of the fuel pins"),
- fr="Description du maillage radial thermohydraulique à l'échelle du composant",
- ang="Thermalhydraulic radial meshing description at the component scale"),
- fr="Description de la modélisation thermohydraulique à l'échelle du composant",
- ang="Thermalhydraulic modeling description at the component scale"),
- b_scale_compo=BLOC(
- condition="scale == 'component'",
- axial_meshing=FACT(
- statut="o",
- lower_refl=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de mailles axiales dans le réflecteur bas",
- ang="Axial mesh number in the lower reflector"),
- fuel=SIMP(
- statut="o",
- typ="I",
- 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"),
- upper_refl=SIMP(
- statut="o",
- typ="I",
- fr="Nombre de mailles axiales dans le réflecteur haut",
- ang="Axial mesh number in the upper reflector"),
- fr="Maillage axial du cœur",
- ang="Core axial meshing"),
- fr="Description de la modélisation à l'échelle du composant",
- ang="Modeling description at the component scale"),
- b_scale_local=BLOC(
- condition="scale == 'local'",
- mesh_file=SIMP(
- statut="o",
- typ="Fichier",
- fr="Nom du fichier décrivant le maillage",
- ang="Name of the file describing the mesh")),
- fr="Description de la modélisation physique",
- ang="Physical modeling description")
-
-
-Scenario_data = OPER(
- nom="Scenario_data",
- sd_prod=_ScenarioData,
- initial_power=SIMP(
- statut="o",
- typ="R",
- val_min=0.,
- defaut=100.,
- fr="Puissance thermique initiale du cœur",
- ang="Initial thermal power of the core"),
- initial_power_unit=SIMP(
- statut="o",
- typ="TXM",
- into=("% Nominal power", "W"),
- defaut="% Nominal power",
- fr="Unité de la puissance thermique initiale du cœur",
- ang="Unit of the initial thermal power of the core"),
- initial_core_inlet_temperature=SIMP(
- statut="o",
- typ="R",
- val_min=0.,
- defaut=280.,
- unite="°C",
- fr="Température initiale de l'eau à l'entrée du cœur",
- ang="Initial water temperature at the inlet of the core"),
- initial_boron_concentration=SIMP(
- statut="o",
- typ="R",
- val_min=0.,
- defaut=1300.,
- unite="ppm",
- fr="Concentration en bore initiale",
- ang="Initial boron concentration"),
- initial_inlet_pressure=SIMP(
- statut="o",
- typ="R",
- val_min=0.,
- defaut=160.2,
- unite="bar",
- fr="Pression initiale de l'eau à l'entrée du cœur",
- ang="Initial water pressure at the inlet of the core"),
- initial_outlet_pressure=SIMP(
- statut="o",
- typ="R",
- val_min=0.,
- defaut=157.2,
- unite="bar",
- fr="Pression initiale de l'eau à la sortie du cœur",
- ang="Initial water pressure at the outlet of the core"),
- initial_rod_positions=SIMP(
- statut="o",
- typ=Tuple(2), # TODO: Use a triplet (type, name, position) instead of a doublet
- validators=VerifTypeTuple(("TXM", "I")),
- max="**",
- unite="extracted steps",
- 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)")),
- scenario_type=SIMP(
- statut="o",
- typ="TXM",
- into=("RIA", ),
- fr="Type de transitoire à modéliser",
- ang="Type of transient to model"),
- b_ria=BLOC(
- condition="scenario_type == 'RIA'",
- ejected_rod=SIMP(
- statut="o",
- typ="TXM",
- fr="Nom de la grappe éjectée",
- ang="Name of the ejected rod cluster"),
- rod_position_program=SIMP(
- statut="o",
- typ=Tuple(2),
- validators=VerifTypeTuple(("R", "I")),
- max="**",
- unite="s, extracted steps",
- 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)"),
- SCRAM=SIMP(
- statut="o",
- typ="TXM",
- into=("YES", "NO"),
- fr="Activation/désactivation de l'arrêt automatique du réacteur",
- ang="Activation/deactivation of automatic reactor shutdown"),
- SCRAM_option=BLOC(
- condition="SCRAM == 'YES'",
- SCRAM_power=SIMP(
- statut="o",
- typ="R",
- unite="MW",
- fr=("Puissance thermique du cœur déclenchant un arrêt "
- "automatique du réacteur"),
- ang="Core thermal power triggering an automatic reactor shutdown"),
- complete_SCRAM_time=SIMP(
- statut="o",
- typ="R",
- unite="s",
- fr="Temps de chute des grappes",
- ang="Rod cluster fall time")),
- fr="Données du transitoire 'accident de réactivité'",
- ang="Data of the 'Reactivity-initiated Accident' transient"),
- post_processing=SIMP(
- statut="f",
- typ=Tuple(2), # TODO: Use a triplet (parameter, physic, format) instead of a doublet
- validators=VerifPostTreatment(),
- max="**",
- # 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))),
- fr="Description du transitoire",
- ang="Transient description")