if self.jdc.isvalid() != 0 and hasattr(self.generator, "writeDefault"):
self.generator.writeDefault(fn)
+ if self.code=="TELEMAC" and hasattr(self.generator, "writeDefault"):
+ self.generator.writeDefault(fn)
if self.salome :
self.appliEficas.addJdcInSalome( self.fichier)
# ------------------------------------
Initial_Conditions = SIMP(statut = 'o',typ = 'TXM',
# ------------------------------------
- into = ['Zero elevation','Constant elevation','Zero depth','Constant depth','Special','TPXO satellite altimetry'],
+ into = ['Zero elevation','Constant elevation','Zero depth','Constant depth','Special','Tpxo satellite altimetry'],
defaut = 'Zero elevation',
fr = "Permet de definir les conditions initiales sur les hauteurs d'eau. Les valeurs possibles sont :\n\
- COTE NULLE. Initialise la cote de surface libre a 0. \nLes hauteurs d'eau initiales sont alors retrouvees en faisant la difference entre les cotes de surface libre et du fond. \n\
# ------------------------------------
- Computation_Continued = SIMP( statut = 'o',typ = bool,defaut = False,position = "global_jdc"),
+ #Computation_Continued = SIMP( statut = 'o',typ = bool,defaut = False,position = "global_jdc"),
+ Computation_Continued = SIMP( statut = 'o',typ = bool,defaut = False),
# ------------------------------------
# ------------------------------------
# ------------------------------------
# ------------------------------------
- Options = SIMP(statut = 'f',typ = 'I',
+ Option_For_Liquid_Boundaries = SIMP(statut = 'f',typ = 'I',
# ------------------------------------
into = ['Classical boundary conditions','Thompson method based on characteristics'],
fr = 'On donne 1 entier par frontiere liquide',
# soizic. choix 3 et 4 et 13 et 14
# Attention recalcul de Type_Of_Advection
# ------------------------------------
- Advection_Of_U_And_V = SIMP(statut = 'o',typ = bool, defaut = True,
+ Advection_Of_U_And_V = SIMP(statut = 'f',typ = bool, defaut = True,
# ------------------------------------
fr = 'Prise en compte ou non de la convection de U et V.',
ang = 'The advection of U and V is taken into account or ignored.'),
Type_Of_Advection_U_And_V = SIMP(statut = 'o',typ = 'TXM',position = "global",
# ------------------------------------
into = ["Characteristics", "SUPG", "Conservative N-scheme", 'Conservative N-scheme',\
- 'Conservative PSI-scheme', 'Non conservative PSI scheme', 'Implicit non conservative N scheme',\
- 'Edge-based N-scheme'],
- defaut = "Characteristics", ),
+ 'Conservative PSI-scheme', 'Non conservative PSI-scheme', 'Implicit non conservative N-scheme',\
+ 'Edge-based N-scheme'],
+ defaut = "Characteristics", ),
# ------------------------------------
b_upwind = BLOC(condition = "Type_Of_Advection_U_And_V == 'SUPG'",
# ------------------------------------
Type_Of_Advection_H = SIMP(statut = 'o',typ = 'TXM',position = "global",
# ------------------------------------
- into = ["characteristics", "SUPG", "conservative N-scheme", 'conservative N-scheme',\
- 'conservative PSI-scheme', 'non conservative PSI scheme', 'implicit non conservative N scheme',\
- 'edge-based N-scheme'],
- defaut = "conservative PSI-scheme",),
+ into = ["Characteristics", "SUPG", "Conservative N-scheme", 'Conservative N-scheme',\
+ 'Conservative PSI-scheme', 'Non conservative PSI-scheme', 'Implicit non conservative N-scheme',\
+ 'Edge-based N-scheme'],
+ defaut = "Conservative PSI-scheme",),
# ------------------------------------
b_upwind_H = BLOC(condition = "Type_Of_Advection_H == 'SUPG'",
# ------------------------------------
Type_Of_Advection_K_And_Epsilon = SIMP(statut = 'o',typ = 'TXM',position = "global",
# ------------------------------------
into = ["Characteristics", "SUPG", "Conservative N-scheme", 'Conservative N-scheme',\
- 'Conservative PSI-scheme', 'Non conservative PSI scheme', 'Implicit non conservative N scheme',\
+ 'Conservative PSI-scheme', 'Non conservative PSI-scheme', 'Implicit non conservative N-scheme',\
'Edge-based N-scheme'],
defaut = "Characteristics",),
# ------------------------------------
b_upwind_k = BLOC(condition = "Type_Of_Advection_K_And_Epsilon == 'SUPG'",
# ------------------------------------
# ------------------------------------
- Supg_Option_Tracers = SIMP(statut = 'o', defaut = 'Modified SUPG', typ = 'TXM',
+ Supg_Option_K_And_Epsilon = SIMP(statut = 'o', defaut = 'Modified SUPG', typ = 'TXM',
# ------------------------------------
into = ['No upwinding', 'Classical SUPG','Modified SUPG']),
Type_Of_Advection_Tracers = SIMP(statut = 'o',typ = 'TXM',position = "global",
# ------------------------------------
into = ["Characteristics", "SUPG", "Conservative N-scheme", 'Conservative N-scheme',\
- 'Conservative PSI-scheme', 'Non conservative PSI scheme', 'Implicit non conservative N scheme',\
- 'Edge-based N-scheme'],),
+ 'Conservative PSI-scheme', 'Non conservative PSI-scheme', 'Implicit non conservative N-scheme',\
+ 'Edge-based N-scheme'],
+ ),
# ------------------------------------
b_upwind_Tracers = BLOC(condition = "Type_Of_Advection_Tracers == 'SUPG'",
# ------------------------------------
# ------------------------------------
- Supg_Option_K_And_Epsilon = SIMP(statut = 'o', defaut = 'Modified SUPG', typ = 'TXM',
+ Supg_Option_Tracers = SIMP(statut = 'o', defaut = 'Modified SUPG', typ = 'TXM',
# ------------------------------------
into = ['No upwinding', 'Classical SUPG','Modified SUPG']),
# ------------------------------------
Option_For_The_Diffusion_Of_Velocities = SIMP( statut='o',typ='TXM',
# ------------------------------------
- defaut=1 ,
- into=['Diffusion in the form div( nu grad(U))','Diffusion in the form 1/h div ( h nu grad(U) )'],
+ defaut='Diffusion in the form div( nu grad(U))' ,
+ into=['Diffusion in the form div( nu grad(U))','Diffusion in the form 1/h div ( h nu grad(U))'],
fr = '1: Diffusion de la forme div( nu grad(U) ) 2: Diffusion de la forme 1/h div ( h nu grad(U) )',
ang= '1: Diffusion in the form div( nu grad(U) ) 2: Diffusion in the form 1/h div ( h nu grad(U) )',),
Discretization_Implicitation = FACT(statut = 'f',
# ------------------------------------
-# ------------------------------------
- Discretizations_In_Space = SIMP(statut = 'o',typ = 'TXM',
-# ------------------------------------
+# ------------------------------------------------------------------
+ Discretizations_In_Space_U_And_V = SIMP(statut = 'o',typ = 'TXM',
+# ------------------------------------------------------------------
+ into = ["Linear", "Quasi-bubble", "Quadratic"],
+ defaut = "Linear",),
+# ------------------------------------------------------------------
+ Discretizations_In_Space_H = SIMP(statut = 'o',typ = 'TXM',
+# ------------------------------------------------------------------
+ into = ["Linear", "Quasi-bubble", "Quadratic"],
+ defaut = "Linear",),
+# ------------------------------------------------------------------
+ Discretizations_In_Space_K_And_Epsilon = SIMP(statut = 'f',typ = 'TXM',
+# ------------------------------------------------------------------
+ into = ["Linear", "Quasi-bubble", "Quadratic"],
+ defaut = "Linear",),
+# ------------------------------------------------------------------
+ Discretizations_In_Space_Tracers = SIMP(statut = 'f',typ = 'TXM',
+# ------------------------------------------------------------------
into = ["Linear", "Quasi-bubble", "Quadratic"],
defaut = "Linear",),
# ------------------------------------
Variables_For_Graphic_Printouts = SIMP(statut = 'o',max = "**", typ = 'TXM',
# ------------------------------------
- into=[ "Velocity along X axis (m/s)", "Velocity along Y axis (m/s)", "Wave celerity (m/s)", "Water depth (m)",
- "Free surface elevation (m)", "Bottom elevation (m)", "Froude number ", "Scalar flowrate of fluid (m2/s)",
- "Tracer 1 etc. ", "Turbulent kinetic energy in K-Epsilon model (J/kg)", "Dissipation of turbulent energy (W/kg)",
- "Turbulent viscosity of K-Epsilon model (m2/s)", "Flowrate along X axis (m2/s)", "Flowrate along Y axis (m2/s)",
- "Scalar velocity (m/s)", "Wind along X axis (m/s)", "Wind along Y axis (m/s)", "Air pressure (Pa)",
- "Friction coefficient", "Drift along X (m)", "Drift along Y (m)", "Courant number ", "Supplementary variable N ",
- "Supplementary variable O ", "Supplementary variable R ", "Supplementary variable Z ", "Maximum elevation",
- "Time of maximum elevation ", "Maximum velocity", "Time of maximum velocity", "Friction velocity "],
+ into=[ "Velocity along X axis (m/s)", "Velocity along Y axis (m/s)", "Wave celerity (m/s)", "Water depth (m)",
+ "Free surface elevation (m)", "Bottom elevation (m)", "Froude number", "Scalar flowrate of fluid (m2/s)",
+ "Tracer 1 etc. ", "Turbulent kinetic energy in K-Epsilon model (J/kg)", "Dissipation of turbulent energy (W/kg)",
+ "Turbulent viscosity of K-Epsilon model (m2/s)", "Flowrate along X axis (m2/s)", "Flowrate along Y axis (m2/s)",
+ "Scalar velocity (m/s)", "Wind along X axis (m/s)", "Wind along Y axis (m/s)", "Air pressure (Pa)",
+ "Friction coefficient", "Drift along X (m)", "Drift along Y (m)", "Courant number", "Supplementary variable N",
+ "Supplementary variable O", "Supplementary variable R", "Supplementary variable Z", "Maximum elevation",
+ "Time of maximum elevation", "Maximum velocity", "Time of maximum velocity", "Friction velocity"],
),
#homo="SansOrdreNiDoublon"),
"Tracer", "Turbulent kinetic energy in K-Epsilon model (J/kg)", "Dissipation of turbulent energy (W/kg)",
"Turbulent viscosity of K-Epsilon model (m2/s)", "Flowrate along x axis (m2/s)", "Flowrate along y axis (m2/s)",
"Scalar velocity (m/s)", "Wind along x axis (m/s)", "Wind along y axis (m/s)", "Air pressure (Pa)",
- "Friction coefficient", "Drift along x (m)", "Drift along y (m)", "Courant number",
+ "Friction coefficient", "Drift along x (m)", "Drift along y (m)", "Courant number",
"Supplementary variable N", "Supplementary variable O", "Supplementary variable R", "Supplementary variable Z"]
,homo="SansOrdreNiDoublon"),
# ------------------------------------
Spatial_Projection_Type = SIMP(statut = 'o',typ = 'TXM',
# ------------------------------------
- into = ["Mercator","Latitude longitude"]),
+ defaut="Cartesian, not georeferenced",
+ into = ["Cartesian, not georeferenced","Mercator","Latitude longitude"]),
), # fin b_Spher
# ------------------------------------
into = ("Diagonal", "No preconditioning", "Diagonal condensed", "Crout", "Diagonal and crout", "Diagonal condensed and crout"),
fr = 'Permet de preconditionner le systeme relatif au modele k-epsilon',
ang = 'Preconditioning of the linear system in the diffusion step of the k-epsilon model.',
+ homo="SansOrdreNiDoublon",
),
# -----------------------------------------------------------------------
Information_About_K_Epsilon_Model = SIMP(statut = 'o',typ = bool,defaut = True,
# -----------------------------------------------------------------------
into = ["Sphere", "Iridaea flaccida (close to ulva)", "Pelvetiopsis limitata", "Gigartina leptorhynchos"],
defaut = "Sphere",
+ homo="SansOrdreNiDoublon",
fr = 'Type des algues. Pour sphere les algues seront modelisees comme des spheres, pour les autres choix voir Gaylord et al.(1994)',
ang = 'Algae type. For sphere, the algae particles will be modeled as spheres, for the other choices see Gaylord et al.(1994)',),
# -----------------------------------------------------------------------
Solver_For_Diffusion_Of_Tracers = SIMP( statut='o',typ='TXM',
# -----------------------------------------------------------------------
- defaut='1="conjugate gradient"' ,
- into =('1="conjugate gradient"', '2="conjugate residual"', '3="conjugate gradient on a normal equation"',
- '4="minimum error"', '5="squared conjugate gradient"', '6="cgstab"', '7="gmres "', '8="direct"'),),
+ defaut='Conjugate gradient' ,
+ into =('Conjugate gradient', 'Conjugate residual', 'Conjugate gradient on a normal equation',
+ 'Minimum error"', 'Squared conjugate gradient', 'CGSTAB', 'GMRES', 'Direct'),
+ ),
+# Ne faut-il pas un bloc?
# -----------------------------------------------------------------------
Solver_Option_For_Tracers_Diffusion = SIMP( statut='o',typ='I',
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
Preconditioning_For_Diffusion_Of_Tracers = SIMP( statut='o',typ='TXM',
# -----------------------------------------------------------------------
- defaut='2="diagonal"' ,
- into =('2="diagonal"', '0="no preconditioning "', '3="diagonal condensed"', '7="crout"', '14="diagonal and crout"', '21="diagonal condensed and crout"'),
+ defaut='diagonal' ,
+ into =('diagonal', 'no preconditioning', 'diagonal condensed', 'crout', 'diagonal and crout', 'diagonal condensed and crout'),
fr = 'Permet de preconditionner le systeme relatif au traceur. Memes definition et possibilites que pour le mot-cle PRECONDITIONNEMENT.',
ang= 'Preconditioning of the linear system in the tracer diffusion step. Same definition and possibilities as for the keyword PRECONDITIONING',
),
# ------------------------------------
Scheme_For_Advection_Of_Tracers = SIMP( statut='o',typ='TXM',
# ------------------------------------
- defaut="CHARACTERISTICS" ,
- into =("NO ADVECTION", "CHARACTERISTICS", "EXPLICIT + SUPG", "EXPLICIT LEO POSTMA", "EXPLICIT + MURD SCHEME N",
- "EXPLICIT + MURD SCHEME PSI", "LEO POSTMA FOR TIDAL FLATS", "N-SCHEME FOR TIDAL FLATS"),
+ defaut="Characteristics" ,
+ into =("No advection", "Characteristics", "Explicit + SUPG", "Explicit leo postma", "explicit + murd scheme-N",
+ "explicit + murd scheme-PSI", "Leo postma for tidal flats", "N-scheme for tidal flats"),
fr = 'Choix du schema de convection pour les traceurs, remplace FORME DE LA CONVECTION',
ang= 'Choice of the advection scheme for the tracers, replaces TYPE OF ADVECTION',),
# ------------------------------------
Scheme_Option_For_Advection_Of_Tracers = SIMP( statut='o',typ='TXM',
# ------------------------------------
- defaut='explicit' ,
- into=['explicit','predictor-corrector for tracers'],
+ defaut='Explicit' ,
+ into=['Explicit','Predictor-corrector for tracers'],
fr = 'Si present remplace et a priorite sur : OPTION POUR LES CARACTERISTIQUES OPTION DE SUPG Si schema PSI : 1=explicite 2=predicteur-correcteur pour les traceurs',
ang= 'If present replaces and has priority over: OPTION FOR CHARACTERISTICS SUPG OPTION IF PSI SCHEME: 1=explicit 2=predictor-corrector for tracers',),
# -----------------------------------------------------------------------
Law1_Of_Tracers_Degradation = SIMP( statut='o',typ='TXM',
# -----------------------------------------------------------------------
- into=["NO DEGRADATION","F(T90) LAW"],
- defaut="NO DEGRADATION",
+ into=["No degradation","F(T90) law"],
+ defaut="No degradation",
fr = 'Prise en compte dune loi de decroissance des traceurs',
ang= 'Take in account a law for tracers decrease',),
# -----------------------------------------------------------------------
- b_Law1 = BLOC(condition = 'Law1_Of_Tracers_Degradation == "F(T90) LAW"',
+ b_Law1 = BLOC(condition = 'Law1_Of_Tracers_Degradation == "F(T90) law"',
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
Coefficient_1_For_Law_Of_Tracers_Degradation = SIMP( statut='o',typ='R',
# -----------------------------------------------------------------------
Law2_Of_Tracers_Degradation = SIMP( statut='o',typ='TXM',
# -----------------------------------------------------------------------
- into=["NO DEGRADATION","F(T90) LAW"],
- defaut="NO DEGRADATION",
+ into=["No degradation","F(T90) law"],
+ defaut="No degradation",
fr = 'Prise en compte dune loi de decroissance des traceurs',
ang= 'Take in account a law for tracers decrease',),
# -----------------------------------------------------------------------
- b_Law2 = BLOC(condition = 'Law2_Of_Tracers_Degradation == "F(T90) LAW"',
+ b_Law2 = BLOC(condition = 'Law2_Of_Tracers_Degradation == "F(T90) law"',
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
Coefficient_2_For_Law_Of_Tracers_Degradation = SIMP( statut='o',typ='R',
"""Ce module contient le plugin generateur de fichier au format Code_Carmel3D pour EFICAS.
"""
-listeSupprime = ( 'DAY', 'MONTH', 'YEAR', 'HOUR', 'MINUTE', 'SECOND', 'CONSIGNE'
- 'LIMIT VALUES H', 'LIMIT VALUES U', 'LIMIT VALUES V', 'LIMIT VALUES T',
- 'SISYPHE', 'TOMAWAC', 'DELWAQ',
- 'ADVECTION U AND V', 'ADVECTION H',
- 'ADVECTION TRACERS', 'ADVECTION K AND EPSILON',
- 'TOLERANCE FOR H', 'TOLERANCE FOR U', 'TOLERANCE FOR V', 'TOLERANCE FOR COUT',
- 'SUPG OPTION U AND V', 'SUPG OPTION H', 'SUPG OPTION TRACERS', 'SUPG OPTION K AND EPSILON',
- 'UPWIND COEFFICIENTS Of U AND V', 'UPWIND COEFFICIENTS OF H',
-)
-
+listeSupprime = (
+ 'CONSIGNE', 'TYPE CONDITION',
+ 'PRESCRIBED ELEVATIONS', 'PRESCRIBED FLOWRATES', 'PRESCRIBED VELOCITY',
+ 'ADVECTION U AND V', 'ADVECTION H', 'ADVECTION TRACERS', 'ADVECTION K AND EPSILON',
+ 'TYPE OF ADVECTION U AND V', 'TYPE OF ADVECTION H',
+ 'TYPE OF ADVECTION TRACERS', 'TYPE OF ADVECTION K AND EPSILON',
+ 'SUPG OPTION U AND V', 'SUPG OPTION H', 'SUPG OPTION TRACERS', 'SUPG OPTION K AND EPSILON',
+ 'UPWIND COEFFICIENTS Of U AND V', 'UPWIND COEFFICIENTS OF H',
+ 'UPWIND COEFFICIENTS TRACERS', 'UPWIND COEFFICIENTS K AND EPSILON',
+ 'DAY', 'MONTH', 'YEAR', 'HOUR', 'MINUTE', 'SECOND',
+)
+
+# 'LIMIT VALUES H', 'LIMIT VALUES U', 'LIMIT VALUES V', 'LIMIT VALUES T',
+# 'SISYPHE', 'TOMAWAC', 'DELWAQ',
+# 'TOLERANCE FOR H', 'TOLERANCE FOR U', 'TOLERANCE FOR V', 'TOLERANCE FOR COUT',
+#
DicoAglomere= {
'LIMIT VALUES' : ( 'Limit_Values_H', 'Limit_Values_U', 'Limit_Values_V', 'Limit_Values_T'),
'COUPLING WITH' : ( 'Sisyphe', 'Tomawac', 'Delwaq'),
-'TYPE OF ADVECTION' : ( 'Advection_U_And_V', 'Advection_H', 'Advection_Tracers','Advection_K_And_Epsilon'),
'TOLERANCE' : ( 'Tolerance_For_H', 'Tolerance_For_U', 'Tolerance_For_V', 'Tolerance_For_cout',),
-'SUPG OPTION' : ( 'Supg_Option_U_And_V', 'Supg_Option_H', 'Supg_Option_Tracers', 'Supg_Option_K_And_Epsilon',),
-'UPWIND COEFFICIENTS' : ( 'Upwind_Coefficients_Of_U_And_V', 'Upwind_Coefficients_Of_H', ),
}
DicoEficasToCas= {
DicoEnumCasEn={
-'PSI SCHEME OPTION' : {
+'Psi_Scheme_Option' : {
1 : "Explicit",
2 : "Predictor-corrector"
},
-'TYPE OF ADVECTION' : {
+# on regroupe les enum quand on separe
+'Type_Of_Advection' : {
1 : "Characteristics",
2 : "SUPG",
3 : "Conservative N-scheme",
13 : "Edge-based N-scheme",
14 : "Edge-based N-scheme"
},
+
-'GEOMETRY FILE FORMAT' : {
+'Geometry_File_Format' : {
'SERAFIN': 'Serafin',
'MED': 'MED',
'SERAFIND': 'SerafinD',
},
-'PREVIOUS COMPUTATION FILE FORMAT' : {
+'Previous_Computation_File_Format' : {
'SERAFIN': 'Serafin',
'MED': 'MED',
'SERAFIND': 'SerafinD',
},
-'REFERENCE FILE FORMAT' : {
+'Reference_File_Format' : {
'SERAFIN': 'Serafin',
'MED': 'MED',
'SERAFIND': 'SerafinD',
},
-'RESULTS FILE FORMAT' : {
+'Results_File_Format' : {
'SERAFIN': 'Serafin',
'MED': 'MED',
'SERAFIND': 'SerafinD',
},
-'PRECONDITIONING' : {
+'Preconditioning' : {
0 : "No preconditioning",
2 : "Diagonal",
3 : "Diagonal condensee",
21 : "Diagonal condensed and Crout"
},
-'INITIAL GUESS FOR H' : {
+'Initial_Guess_For_H' : {
1 : "Previous",
0 : "Zero",
2 : "Extrapolation"
},
-'LAW OF BOTTOM FRICTION' : {
+'Law_Of_Bottom_Friction' : {
0 : "No friction",
1 : "Haaland",
2 : "Chezy",
5 : "Nikuradse"
},
-'SOLVER FOR DIFFUSION OF TRACERS' : {
+'Solver_For_Diffusion_Of_Tracers' : {
1 : "Conjugate gradient",
2 : "Conjugate residual",
3 : "Conjugate gradient on a normal equation",
8 : "Direct"
},
-'SOLVER' : {
+'Solver' : {
3 : "Conjugate gradient on a normal equation",
1 : "Conjugate gradient",
2 : "Conjugate residual",
8 : "Direct"
},
-'PRECONDITIONING FOR DIFFUSION OF TRACERS' : {
+'Preconditioning_For_Diffusion_Of_Tracers' : {
2 : "Diagonal",
0 : "No preconditioning",
3 : "Diagonal condensed",
21 : "Diagonal condensed and Crout"
},
-'SOLVER FOR K-EPSILON MODEL' : {
+'Solver_For_K_Epsilon_Model' : {
1 : "Conjugate gradient",
2 : "Conjugate residuals",
3 : "Conjugate gradient on normal equation",
8 : "Direct"
},
-'PRECONDITIONING FOR K-EPSILON MODEL' : {
+'Preconditioning_For_K_Epsilon_Model' : {
2 : "Diagonal",
0 : "No preconditioning",
3 : "Diagonal condensed",
21 : "Diagonal condensed and Crout"
},
-'TURBULENCE MODEL FOR SOLID BOUNDARIES' : {
+'Turbulence_Model_For_Solid_Boundaries' : {
1 : "Smooth",
2 : "Rough"
},
-'FRICTION COEFFICIENT' : {
+'PNPN_Friction_Coefficient' : {
1 : "Linear coefficient",
2 : "Chezy coefficient",
3 : "Strickler coefficient",
},
-'TURBULENCE MODEL' : {
- 1 : "Constant viscosity",
+'Turbulence_Model' : {
+ 1 : "Constant Viscosity",
2 : "Elder",
3 : "K-Epsilon Model",
4 : "Smagorinski",
-'ROUGHNESS COEFFICIENT OF BOUNDARIES' : {
+'Roughness_Coefficient_Of_Boundaries' : {
1 : "Non programme",
2 : "Coefficient de Chezy",
3 : "Coefficient de Strickler",
},
-'VARIABLES FOR GRAPHIC PRINTOUTS' : {
- "U" : "Velocity along X axis (m/s)",
- "V" : "Velocity along Y axis (m/s)",
- "C" : "Wave celerity (m/s)",
- "H" : "Water depth (m)",
- "S" : "Free surface elevation (m)",
- "B" : "Bottom elevation (m)",
- "F" : "Froude number ",
- "Q" : "Scalar flowrate of fluid (m2/s)",
+'Variables_For_Graphic_Printouts' : {
+ "U" : "Velocity along X axis (m/s)",
+ "V" : "Velocity along Y axis (m/s)",
+ "C" : "Wave celerity (m/s)",
+ "H" : "Water depth (m)",
+ "S" : "Free surface elevation (m)",
+ "B" : "Bottom elevation (m)",
+ "F" : "Froude number",
+ "Q" : "Scalar flowrate of fluid (m2/s)",
"T1" : "Tracer 1 etc. ",
- "K" : "Turbulent kinetic energy in k-epsilon model (J/kg)",
- "E" : "Dissipation of turbulent energy (W/kg)",
- "D" : "Turbulent viscosity of k-epsilon model (m2/s)",
- "I" : "Flowrate along X axis (m2/s)",
- "J" : "Flowrate along Y axis (m2/s)",
- "M" : "Scalar velocity (m/s)",
- "X" : "Wind along X axis (m/s)",
- "Y" : "Wind along Y axis (m/s)",
- "P" : "Air pressure (Pa)",
+ "K" : "Turbulent kinetic energy in K-Epsilon model (J/kg)",
+ "E" : "Dissipation of turbulent energy (W/kg)",
+ "D" : "Turbulent viscosity of K-Epsilon model (m2/s)",
+ "I" : "Flowrate along X axis (m2/s)",
+ "J" : "Flowrate along Y axis (m2/s)",
+ "M" : "Scalar velocity (m/s)",
+ "X" : "Wind along X axis (m/s)",
+ "Y" : "Wind along Y axis (m/s)",
+ "P" : "Air pressure (Pa)",
"W" : "Friction coefficient",
- "A" : "Drift along X (m)",
- "G" : "Drift along Y (m)",
+ "A" : "Drift along X (m)",
+ "G" : "Drift along Y (m)",
"L" : "Courant number",
- "N" : "Supplementary variable N ",
- "O" : "Supplementary variable O ",
- "R" : "Supplementary variable R ",
- "Z" : "Supplementary variable Z ",
+ "N" : "Supplementary variable N",
+ "O" : "Supplementary variable O",
+ "R" : "Supplementary variable R",
+ "Z" : "Supplementary variable Z",
"MAXZ" : "Maximum elevation",
- "TMXZ" : "Time of maximum elevation ",
+ "TMXZ" : "Time of maximum elevation",
"MAXV" : "Maximum velocity",
"TMXV" : "Time of maximum velocity",
- "US" : "Friction velocity "
+ "US" : "Friction velocity"
},
-'VARIABLES TO BE PRINTED' : {
+'Variables_TO_Be_Printed' : {
"U" : "Velocity along X axis (m/s)",
"V" : "Velocity along Y axis (m/s)",
"C" : "Wave celerity (m/s)",
"F" : "Froude number",
"Q" : "Scalar flowrate of fluid (m2/s)",
"T" : "Tracer",
- "K" : "Turbulent kinetic energy in k-epsilon model (J/kg)",
+ "K" : "Turbulent kinetic energy in K-Epsilon model (J/kg)",
"E" : "Dissipation of turbulent energy (W/kg)",
- "D" : "Turbulent viscosity of k-epsilon model (m2/s)",
+ "D" : "Turbulent viscosity of K-Epsilon model (m2/s)",
"I" : "Flowrate along X axis (m2/s)",
"J" : "Flowrate along Y axis (m2/s)",
"M" : "Scalar velocity (m/s)",
},
-'INITIAL CONDITIONS' : {
+'Initial_Conditions' : {
"ZERO ELEVATION" : "Zero elevation",
"CONSTANT ELEVATION" : "Constant elevation",
"ZERO DEPTH" : "Zero depth",
"TPXO SATELLITE ALTIMETRY" : "TPXO satellite altimetry",
},
-'SUPG_OPTION_U_AND_V' : {
+# on regroupe pour Supg
+'Supg_Option' : {
0 : "No upwinding",
1 : "Classical SUPG",
2 : "Modified SUPG"
},
+
-'OPTION FOR THE TREATMENT OF TIDAL FLATS' : {
+'Option_For_The_Treatment_Of_Tidal_Flats' : {
1 : "Equations solved everywhere with correction on tidal flats",
2 : "Dry elements frozen",
3 : "1 but with porosity (defina method)",
},
-'INITIAL GUESS FOR U' : {
+'Initial_Guess_For_U' : {
0 : "Zero",
1 : "Previous",
2 : "Extrapolation",
},
-'DISCRETIZATIONS IN SPACE' : {
+'Discretizations_In_Space' : {
11 : "Linear",
12 : "Quasi-bubble",
13 : "Quadratic",
},
-'MATRIX VECTOR PRODUCT' : {
+'Matrix_Vector_Product' : {
1 : "Classic",
2 : "Frontal"
},
-'MATRIX STORAGE' : {
+'Matrix_Storage' : {
1 : "Classical EBE" ,
3 : "Edge-based storage"
},
-'OPTION FOR LIQUID BOUNDARIES' : {
+'Option_For_Liquid_Boundaries' : {
1 : "Classical boundary conditions",
2 : "Thompson method based on characteristics",
},
-'TREATMENT OF THE LINEAR SYSTEM' : {
+'Treatment_Of_The_Linear_System' : {
1 : "Coupled",
2 : "Wave equation"
},
-'EQUATIONS' : {
+'Equations' : {
"SAINT-VENANT EF" : "Saint-Venant EF",
"SAINT-VENANT VF" : "Saint-Venant VF",
"BOUSSINESQ" : "Boussinesq"
},
-'VELOCITY PROFILES' : {
+'Velocity_ProFiles' : {
1 : "Constant normal profile",
2 : "U and V given in the conlim file",
3 : "Normal velocity given in ubor in the conlim file",
5 : "QRT(depth) profile, variant",
},
-'OPTION FOR THE DIFFUSION OF TRACERS' : {
+'Option_For_The_Diffusion_Of_Tracers' : {
1 : "Div( nu grad(T) )",
2 : "1/h Div ( h nu grad(T)" ,
},
-'OPTION FOR THE DIFFUSION OF VELOCITIES' : {
+'Option_For_The_Diffusion_Of_Velocities' : {
1 : "Normal",
2 : "Dirac"
},
-'PARAMETER ESTIMATION' : {
- "FRICTION" : "Friction",
+'Parameter_Estimation' : {
+ "Friction" : "Friction",
"FROTTEMENT" : "Frottement",
"STEADY" : "Steady"
},
-'IDENTIFICATION METHOD' : {
+'Identification_Method' : {
0 : "List of tests",
1 : "Gradient simple",
2 : "Conj gradient",
},
-'FINITE VOLUME SCHEME' : {
+'Finite_Volume_Scheme' : {
0 : "Roe scheme",
- 1 : "kinetic order 1",
- 2 : "kinetic order 2",
+ 1 : "Kinetic order 1",
+ 2 : "Kinetic order 2",
3 : "Zokagoa scheme order 1",
4 : "Tchamen scheme order 1",
5 : "HLLC scheme order 1",
6 : "WAF scheme order 2"
},
-'STAGE-DISCHARGE CURVES' : {
+'Stage-Discharge_Curves' : {
0 : "No one",
1 : "Z(Q)",
2 : "Q(Z)"
},
-'TREATMENT OF NEGATIVE DEPTHS' : {
+'Treatment_Of_Negative_Depths' : {
0 : "No treatment",
1 : "Smoothing",
2 : "Flux control",
},
-'DEPTH IN FRICTION TERMS' : {
+'Depth_In_Friction_Terms' : {
1 : "Nodal",
2 : "Average",
},
-'LAW OF FRICTION ON LATERAL BOUNDARIES' : {
+'Law_Of_Friction_On_Lateral_Boundaries' : {
0 : "No friction",
1 : "Haaland",
2 : "Chezy",
},
-'TREATMENT OF FLUXES AT THE BOUNDARIES': {
+'Treatment_Of_Fluxes_AT_The_Boundaries': {
1 : "Priority to prescribed values",
2 : "Priority to fluxes",
},
-'OPTION FOR TIDAL BOUNDARY CONDITIONS': {
+'Option_For_Tidal_Boundary_Conditions': {
0 : "No tide",
1 : "Real tide (recommended methodology)",
2 : "Astronomical tide",
7 : "Real tide (methodology before 2010)"
},
-'OPTION FOR TSUNAMI GENERATION': {
+'Option_For_Tsunami_Generation': {
0 : "No Tsunami",
1 : "Tsunami generated on the basis of the Okada model 1992"
},
-#'PHYSICAL CHARACTERISTICS OF THE TSUNAMI': {
+#'PHYSICAL Characteristics Of The TSUNAMI': {
#AIDE1 : '
# Physical characteristics of the chosen Tsunami model:
# - the focal depth (HH),
# - the ellipse ( WxL ) area of influence
# },
-'TIDAL DATA BASE': {
+'Tidal_Data_Base': {
1 : "JMJ",
2 : "TPXO",
3 : "Miscellaneous (LEGOS-NEA, FES20XX, PREVIMER...)"
},
-'GEOGRAPHIC SYSTEM': {
+'Geographic_System': {
0 : "Defined by user",
1 : "WGS84 longitude/latitude in real degrees",
2 : "WGS84 northern UTM",
},
-'ZONE NUMBER IN GEOGRAPHIC SYSTEM': {
+'Zone_Number_In_Geographic_System': {
1 : "Lambert 1 north",
2 : "Lambert 2 center",
3 : "Lambert 3 south",
},
-'LAW OF TRACERS DEGRADATION': {
+'Law_Of_Tracers_Degradation': {
0 : "No degradation",
1 : "F(T90) law"
},
-'SPATIAL PROJECTION TYPE': {
+'Spatial_Projection_Type': {
1 : "Cartesian, not georeferenced",
2 : "Mercator",
3 : "Latitude longitude"
},
-'ALGAE TYPE': {
+'Algae_Type': {
1 : "Sphere",
2 : "Iridaea flaccida (close to ulva)",
3 : "Pelvetiopsis limitata",
4 : "Gigartina leptorhynchos"
},
-'OPTION FOR CHARACTERISTICS': {
+'Option_For_Characteristics': {
1 : "Strong",
2 : "Weak"
},
-'STOCHASTIC DIFFUSION MODEL' : {
+'Stochastic_Diffusion_Model' : {
0 : "No model",
2 : "??"
},
-'NUMBER OF GAUSS POINTS FOR WEAK CHARACTERISTICS' : {
+'Number_Of_Gauss_Points_For_Weak_Characteristics' : {
1 : "1 point",
3 : "3 points",
6 : "6 points"
},
-'TYPE OF WEIRS': {
+'Type_Of_Weirs': {
1 : "Horizontal with same number of nodes upstream/downstream (Historical solution with bord)",
2 : "General (New solution with sources points)"
},
-'SCHEME FOR ADVECTION OF VELOCITIES': {
+'Scheme_For_Advection_Of_Velocities': {
1 : "Characteristics",
2 : "Explicit + SUPG",
3 : "Explicit leo postma",
14 : "N-scheme for tidal flats"
},
-'SCHEME FOR ADVECTION OF TRACERS': {
+'Scheme_For_Advection_Of_Tracers': {
0 : "No advection",
1 : "Characteristics",
2 : "Explicit + SUPG",
},
-'SCHEME FOR ADVECTION OF K-EPSILON': {
+'Scheme_For_Advection_Of_K_Epsilon': {
0 : "No advection",
1 : "Characteristics",
2 : "Explicit + SUPG",
3 : "Explicit leo postma",
- 4 : "Explicit + murd scheme N",
- 5 : "Explicit + murd scheme PSI",
+ 4 : "Explicit + murd scheme-N",
+ 5 : "Explicit + murd scheme-PSI",
13 : "Leo postma for tidal flats",
14 : "N-scheme for tidal flats"
},
-'SCHEME OPTION FOR ADVECTION OF TRACERS': {
+'Scheme_Option_For_Advection_Of_Tracers': {
1 : "explicit",
2 : "predictor-corrector",
},
-'SCHEME OPTION FOR ADVECTION OF VELOCITIES': {
+'Scheme_Option_For_Advection_Of_Velocities': {
1 : "Explicit",
2 : "Predictor-corrector",
},
-'SCHEME OPTION FOR ADVECTION OF K-EPSILON': {
+'Scheme_Option_For_Advection_Of_K_Epsilon': {
1 : "Explicit",
2 : "Predictor-corrector",
},
-'OPTION FOR WIND': {
+'Option_For_Wind': {
0 : "No wind",
1 : "Constant in time and space",
2 : "Variable in time and (constant in space)",
3 : "Variable in time and space"
},
-'NEWMARK TIME INTEGRATION COEFFICIENT' :{
+'Newmark_Time_Integration_Coefficient' :{
1. : "Euler explicit",
- 0.5 : "order 2 in time",
+ 0.5 : "Order 2 in time",
},
+
+ 'Option_For_The_Diffusion_Of_Velocities' : {
+ 1: 'Diffusion in the form div( nu grad(U))',
+ 2: 'Diffusion in the form 1/h div ( h nu grad(U))',
+ },
+
}
+DicoEnumCasEnInverse={}
+
+for motClef in DicoEnumCasEn.keys():
+ d={}
+ for valTelemac in DicoEnumCasEn[motClef].keys():
+ valEficas= DicoEnumCasEn[motClef][valTelemac]
+ d[valEficas]=valTelemac
+ DicoEnumCasEnInverse[motClef]=d
+
+#print DicoEnumCasEnInverse
<!DOCTYPE TS><TS version="1.1" language="en">
<context>
<name>@default</name>
+ <message>
+ <source>Discretisations_En_Espace</source>
+ <translation>Discretizations_In_Space</translation>
+ </message>
+ <message>
+ <source>Option_De_Supg</source>
+ <translation>Supg_Option</translation>
+ </message>
+ <message>
+ <source>Forme_De_La_Convection</source>
+ <translation>Type_Of_Advection</translation>
+ </message>
+ <message>
+ <source>Cote constante</source>
+ <translation>Constant elevation</translation>
+ </message>
+ <message>
+ <source>Cote Nulle</source>
+ <translation>Zero elevation</translation>
+ </message>
+ <message>
+ <source>Hauteur Nulle</source>
+ <translation>Zero depth</translation>
+ </message>
<message>
<source>Hauteur constante</source>
<translation>Constant depth</translation>
</message>
+ <message>
+ <source>Particulieres</source>
+ <translation>Special</translation>
+ </message>
+ <message>
+ <source>Altimetrie satellite tpxo</source>
+ <translation>Tpxo satellite altimetry</translation>
+ </message>
+ <message>
+ <source>Sequentiel</source>
+ <translation>Sequential</translation>
+ </message>
+ <message>
+ <source>Parallele</source>
+ <translation>Parallel</translation>
+ </message>
<message>
<location filename="../../convert/convert_ini.py" line="81"/>
<source>lecture du fichier impossible :</source>
<!DOCTYPE TS><TS version="1.1">
<context>
<name>@default</name>
+ <message>
+ <source>Year</source>
+ <translation>Annee</translation>
+ </message>
+ <message>
+ <source>Month</source>
+ <translation>Mois</translation>
+ </message>
+ <message>
+ <source>Day</source>
+ <translation>Jour</translation>
+ </message>
+ <message>
+ <source>Hour</source>
+ <translation>Heure</translation>
+ </message>
+ <message>
+ <source>Minute</source>
+ <translation>Minute</translation>
+ </message>
+ <message>
+ <source>Second</source>
+ <translation>Seconde</translation>
+ </message>
+ <message>
+ <source>Discretizations_In_Space</source>
+ <translation>Discretisations_En_Espace</translation>
+ </message>
+ <message>
+ <source>Discretizations_In_Space_Tracers</source>
+ <translation>Discretisations_En_Espace_Tracers</translation>
+ </message>
+ <message>
+ <source>Discretizations_In_Space_U_And_V</source>
+ <translation>Discretisations_En_Espace_U_And_V</translation>
+ </message>
+ <message>
+ <source>Discretizations_In_Space_K_And_Epsilon</source>
+ <translation>Discretisations_En_Espace_K_And_Epsilon</translation>
+ </message>
+ <message>
+ <source>Discretizations_In_Space_H</source>
+ <translation>Discretisations_En_Espace_H</translation>
+ </message>
+ <message>
+ <source>Supg_Option</source>
+ <translation>Option_De_Supg</translation>
+ </message>
+ <message>
+ <source>Supg_Option_Tracers</source>
+ <translation>Option_De_Supg_Tracers</translation>
+ </message>
+ <message>
+ <source>Supg_Option_U_And_V</source>
+ <translation>Option_De_Supg_U_And_V</translation>
+ </message>
+ <message>
+ <source>Supg_Option_K_And_Epsilon</source>
+ <translation>Option_De_Supg_K_And_Epsilon</translation>
+ </message>
+ <message>
+ <source>Supg_Option_H</source>
+ <translation>Option_De_Supg_H</translation>
+ </message>
+ <message>
+ <source>Type_Of_Advection</source>
+ <translation>Forme_De_La_Convection</translation>
+ </message>
+ <message>
+ <source>Forme_De_La_Convection</source>
+ <translation>Type_Of_Advection</translation>
+ </message>
+ <message>
+ <source>Type_Of_Advection_Tracers</source>
+ <translation>Forme_De_La_Convection_Tracers</translation>
+ </message>
+ <message>
+ <source>Type_Of_Advection_U_And_V</source>
+ <translation>Forme_De_La_Convection_U_And_V</translation>
+ </message>
+ <message>
+ <source>Type_Of_Advection_K_And_Epsilon</source>
+ <translation>Forme_De_La_Convection_K_And_Epsilon</translation>
+ </message>
+ <message>
+ <source>Type_Of_Advection_H</source>
+ <translation>Forme_De_La_Convection_H</translation>
+ </message>
<message>
<source>Hauteur constante</source>
<translation>Constant depth</translation>
<source>Option_For_Tidal_Boundary_Conditions</source>
<translation>Option_Pour_Les_Conditions_Aux_Limites_De_Maree</translation>
</message>
+ <message>
+ <source>Option_For_Liquid_Boundaries</source>
+ <translation>Option_Pour_Les_Frontieres_Liquides</translation>
+ </message>
<message>
<source>Coefficient_To_Calibrate_Tidal_Velocities</source>
<translation>Coefficient_De_Calage_Des_Vitesses_De_Courant</translation>
<source>Solver_For_Diffusion_Of_Tracers</source>
<translation>Solveur_Pour_La_Diffusion_Des_Traceurs</translation>
</message>
- <message>
- <source>Discretizations_In_Space</source>
- <translation>Discretisations_En_Espace</translation>
- </message>
<message>
<source>Solver_Option</source>
<translation>Option_Du_Solveur</translation>
<source>Matrix_Storage</source>
<translation>Stockage_Des_Matrices</translation>
</message>
+ <message>
+ <source>Matrix_Vector_Product</source>
+ <translation>Produit_Matrice_Vecteur</translation>
+ </message>
<message>
<source>Algae_Type</source>
<translation>Type_Des_Algues</translation>
<source>Diffusion_Of_Velocity</source>
<translation>Diffusion_Des_Vitesses</translation>
</message>
- <message>
- <source>Type_Of_Advection</source>
- <translation>Forme_De_La_Convection</translation>
- </message>
<message>
<source>Solver_Option_For_Tracers_Diffusion</source>
<translation>Option_Du_Solveur_Pour_La_Diffusion_Des_Traceurs</translation>
from Extensions.i18n import tr
from Accas.A_BLOC import BLOC
from Accas import *
+from Telemac_Cata import Tuple
from convert_python import PythonParser
try :
from aideAuxConvertisseurs import DicoEficasToCas, ListeSupprimeCasToEficas
from aideAuxConvertisseurs import ListeCalculCasToEficas, DicoAvecMajuscules
- from enumDicoTelemac2 import DicoEnumCasEn
+ from enumDicoTelemac import DicoEnumCasEn
except :
pass
finLigne=ligne
while finLigne != "" :
- print finLigne
+ #print finLigne
+ if pattern_comment_slash.match(finLigne) : finLigne=""; continue
valeur=""
m=pattern_ligne.match(finLigne)
if m == None :
ind=simp.find('-')
if ind==len(simp)-1 : break
simp=simp[0:ind]+'_'+simp[ind+1].upper()+simp[ind+2:]
+ return simp
#----------------------------------------
def traiteIdent(self,listeIdent):
simp=simp[0:-1]
while simp[-1] == " " : simp=simp[0:-1]
if simp.find('-') > 0 : simp=self.redecoupeSimp(simp)
+
return simp
def generSIMP(self,obj,nom,valeur):
if nom in ("Prescribed_Flowrates", "Prescribed_Velocities", "Prescribed_Elevations" ): return
- #print "___________________________"
- #print nom
- #print valeur
- if valeur == None : print nom
+ print "___________________________"
+ print nom
+ print valeur
if obj.max==1 :
+ if hasattr(obj.type[0],'ntuple') :
+ lval=[]
+ for v in valeur :
+ try : v=eval(v,{})
+ except : pass
+ lval.append(v)
+ self.textePy += nom + "=" + str(lval) +","
+ return
if 'TXM' in obj.type :
- if pattern_ContientDouble.match(valeur):
- valeur=re.sub("''","\'\'",valeur)
- print str(valeur)
- print valeur
- print tr(valeur)
- print poum
+ if pattern_ContientDouble.match(str(valeur)):
+ valeur=re.sub("''","\'\'",str(valeur))
+ self.textePy += nom + "=" + str(valeur) +","
+ return
valeur=str(valeur)
# ceinture et bretelle si les re sont correctes -)
while valeur[-1] == " " or valeur[-1] == '\t' : valeur=valeur[0:-1]
while valeur[0] == " " or valeur[0] == '\t' : valeur=valeur[1:]
- if pattern_ContientDouble.match(valeur):
- valeur=re.sub("''","\'\'",valeur)
- print valeur
- print tr(valeur)
- print poum
# Pour les enum
except : pass
if nom in DicoEnumCasEn.keys():
#print "est dans le dico des enum, valeur simple"
- try : valeur=DicoEnumCasEn[nom][valeur]
+ try :
+ valeur=DicoEnumCasEn[nom][valeur]
+ self.textePy += nom + "= '" + str(valeur) +"',"
+ return
except : pass
- if obj.into != [] and obj.into != None :
+ if obj.into != [] and obj.into != None and not('R' in obj.type) and not('I' in obj.type):
for possible in obj.into :
if possible.upper() == valeur.upper():
valeur=possible
else : self.dictSimp["Parallel_Computation"]="Parallel"
def decoupeListe(self,valeurs,label):
- print "decoupeSUPG"
- print valeurs
+ #print "decoupeListe"
+ #print valeurs
i=0
for prefixe in ('_U_And_V','_H'):
labelComplet=label+prefixe
self.dictSimp['Convection_De_U_Et_V']=True
self.dictSimp['Convection_De_H']=True
if len(valeurs)==2 : return
- self.dictSimp['Advection_Of_K_And_Epsilon']=True
- self.dictSimp['Advection_Of_Tracers']=True
+ self.dictSimp['Convection_De_K_Et_Epsilon']=True
+ self.dictSimp['Convection_Des_Traceurs']=True
def Discretisations_En_Espace(self):
self.decoupeListe( self.dictSimp["Discretisations_En_Espace"],"Discretisations_En_Espace")
del self.dictSimp["Discretisations_En_Espace"]
+ def Date_De_L_Origine_Des_Temps (self):
+ valeurs=self.dictSimp["Date_De_L_Origine_Des_Temps"]
+ self.dictSimp['Annee']=valeurs[0]
+ self.dictSimp['Mois']=valeurs[1]
+ self.dictSimp['Jour']=valeurs[2]
+ del self.dictSimp["Date_De_L_Origine_Des_Temps"]
+
+
+ def Heure_De_L_Origine_Des_Temps (self):
+ valeurs=self.dictSimp["Heure_De_L_Origine_Des_Temps"]
+ self.dictSimp['Heure']=valeurs[0]
+ self.dictSimp['Minute']=valeurs[1]
+ self.dictSimp['Seconde']=valeurs[2]
+ del self.dictSimp["Heure_De_L_Origine_Des_Temps"]
def Liquid_Boundaries(self):
#print 'Liquid Boundaries'
from generator_python import PythonGenerator
extensions=('.comm',)
-#listeSupprime=()
-#DicoAglomere=()
-#DicoEficasToCas=()
from aideAuxConvertisseurs import listeSupprime, DicoAglomere, DicoEficasToCas
-from enumDicoTelemac2 import DicoEnumCasEnInverse
+from enumDicoTelemac import DicoEnumCasEnInverse
def entryPoint():
def gener(self,obj,format='brut',config=None):
self.initDico()
- print self.texteDico
+ #print self.texteDico
# Cette instruction genere le contenu du fichier de commandes (persistance)
self.text=PythonGenerator.gener(self,obj,format)
self.textFE = 'PRESCRIBED FLOWRATES :'
self.textVE = 'PRESCRIBED VELOCITY :'
self.texteDico = ""
+
self.texteDico += '/\t\t\t'+obj.nom +'\n'
self.texteDico += '/------------------------------------------------------/\n'
s=PythonGenerator.generPROC_ETAPE(self,obj)
+ #print obj
+ #print obj.nom
if obj.nom in TELEMACGenerator.__dict__.keys() : apply(TELEMACGenerator.__dict__[obj.nom],(self,obj))
return s
if 'Type_Condition' in obj.liste_mc_presents() :
objForme=obj.get_child('Type_Condition')
valForme=objForme.valeur
+ if valForme == None : return
nomBloc='b_'+valForme.split(" ")[1]
if nomBloc in obj.liste_mc_presents() :
self.VE=True
self.textVE += str(valeur) +"; "
else : self.textVE += "0.; "
- print self.textPE, self.textFE,self.textVE
+ #print self.textPE, self.textFE,self.textVE
def BOUNDARY_CONDITIONS(self,obj):
if self.FE : self.texteDico += self.textFE[0:-1]+'\n'
if self.PE : self.texteDico += self.textPE[0:-1]+'\n'
def Validation(self,obj):
- self.textDico += "Validation = OUI \n"
-
+ self.texteDico += "VALIDATION : True \n"
+
+ def Date_De_L_Origine_Des_Temps (self,obj):
+ an=obj.get_child('Year').valeur
+ mois=obj.get_child('Month').valeur
+ jour=obj.get_child('Day').valeur
+ #print an, mois, jour
+ self.texteDico += "ORIGINAL DATE OF TIME :"+ str(an)+ " ,"+str(mois)+ "," +str(jour)+ "\n"
+
+ def Original_Hour_Of_Time (self,obj):
+ hh=obj.get_child('Hour').valeur
+ mm=obj.get_child('Minute').valeur
+ ss=obj.get_child('Second').valeur
+ #print hh, mm, ss
+ self.texteDico += "ORIGINAL HOUR OF TIME :"+str(hh)+" ,"+str(mm)+ ","+str(ss)+"\n"
+
+ def Type_Of_Advection(self,obj):
+ listeAdvection=[1,5,1,1]
+ listeSupg=[2,2,2,2]
+ listeUpwind=[1.,1.,1.,1.]
+ self.listeMCAdvection=[]
+ self.chercheChildren(obj)
+ dicoSuf={ 'U_And_V' : 0, 'H' : 1, 'K_And_Epsilon' : 2, 'Tracers' : 3}
+ for c in self.listeMCAdvection:
+ #print c.nom
+ if c.nom[0:18] == 'Type_Of_Advection_' and c.valeur!=None:
+ suf=c.nom[18:]
+ index=dicoSuf[suf]
+ #print c.valeur
+ #print DicoEnumCasEnInverse['Type_Of_Advection']
+ listeAdvection[index]=DicoEnumCasEnInverse['Type_Of_Advection'][c.valeur]
+ if c.nom[0:13] == 'Supg_Option_' and c.valeur!=None:
+ suf=c.nom[13:]
+ index=dicoSuf[suf]
+ listeAdvection[index]=DicoEnumCasEnInverse['Supg_Option'][c.valeur]
+ if c.nom[0:23] == 'Upwind_Coefficients_Of_' and c.valeur!=None:
+ suf=c.nom[23:]
+ index=dicoSuf[suf]
+ listeUpwind[index]=c.valeur
+ self.texteDico += "TYPE OF ADVECTION = "+ str(listeAdvection) + "\n"
+ self.texteDico += "SUPG OPTION = "+ str(listeSupg) + "\n"
+ self.texteDico += "UPWIND COEFFICIENTS = "+ str(listeUpwind) + "\n"
+
+ def chercheChildren(self,obj):
+ for c in obj.liste_mc_presents():
+ objc=obj.get_child(c)
+ if hasattr(objc,'liste_mc_presents') and objc.liste_mc_presents() != [] : self.chercheChildren(objc)
+ else : self.listeMCAdvection.append(objc)
+
+
+