Salome HOME
sauve0206
[tools/eficas.git] / Telemac / enumDicoTelemac.py
index 50b3ab80258e75f2229c98d1fe80dc6308ebeb5f..509ac1b857c0fd6fa89c7d4950da8cc2b0ceba0e 100644 (file)
@@ -1,10 +1,11 @@
 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", 
@@ -65,7 +67,7 @@
     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", 
@@ -76,7 +78,7 @@
     8 : "Direct" 
   },
 
-'SOLVER' : {
+'Solver' : {
     3 : "Conjugate gradient on a normal equation", 
     1 : "Conjugate gradient", 
     2 : "Conjugate residual", 
@@ -86,7 +88,7 @@
     8 : "Direct" 
   },
  
-'PRECONDITIONING FOR DIFFUSION OF TRACERS' : {
+'Preconditioning_For_Diffusion_Of_Tracers' : {
     2 : "Diagonal",
     0 : "No preconditioning", 
     3 : "Diagonal condensed",
@@ -95,7 +97,7 @@
     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