]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
*** empty log message ***
authorilct <>
Thu, 24 Nov 2011 10:08:58 +0000 (10:08 +0000)
committerilct <>
Thu, 24 Nov 2011 10:08:58 +0000 (10:08 +0000)
Carmel3D/Carmel3D_cata_etendu.py
Carmel3D/Carmel3D_cata_fact.py

index 717d86f70d64baef08d5d2860ce1af1098516761..2b1d6c961055c4ac597e35722bf3b7c2abc0f121 100644 (file)
@@ -152,6 +152,8 @@ CONDUCTOR = OPER (nom = "CONDUCTOR",
   PERMEABILITY = FACT ( statut="o", 
                         ang ="Permeability properties",
                         fr  ="proprietes du bloc PERMEABILITY",
+                        regles = ( UN_PARMI ('VALUE_REAL','VALUE_COMPLEX'),
+                                ),                     
                 
                 LAW             = SIMP (statut="o",
                                         typ="TXM",
@@ -159,24 +161,30 @@ CONDUCTOR = OPER (nom = "CONDUCTOR",
                                         into = ("LINEAR","NONLINEAR"),
                                          ang = "type of law",
                                        ),
-                HOMOGENEOUS     = SIMP (statut="o",
+                 HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is homogeneous",
+                                         fr  = "le materiau est homogene",
                                        ),
-                ISOTROPIC       = SIMP (statut="o",
+                ISOTROPIC       = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is isotropic",
+                                         fr  = "le materiau est isotrope",
                                        ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_REAL     = SIMP (statut="f",
+                                       typ="R", 
+                                        ang = "enter a real value",
+                                        fr  = "entrer un reel",
+                                      ),
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
-                                       defaut=1,
                                         ang = "enter a complex value",
+                                        fr  = "entrer un complexe",
                                       ),
-
                 ), # fin FACT PERMEABILITY
 
 
@@ -194,17 +202,14 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                     sd_prod= materiau,
 
 
-  NAME          = SIMP (statut="o",
-                       typ="TXM",
-                        ang = "name of the linked mesh group",
-                        fr = "nom du groupe de mailles associe",
-                       ),
 #------------------------------------------------
 # sous bloc niveau 2 : PERMITTTIVITY
 #------------------------------------------------
   PERMITTIVITY = FACT ( statut="o", 
                         ang ="Permittivity properties",
                         fr  ="proprietes du bloc PERMITTIVITY",
+                        regles = ( UN_PARMI ('VALUE_REAL','VALUE_COMPLEX'),
+                                ),                     
                 
                 LAW             = SIMP (statut="o",
                                         typ="TXM",
@@ -212,22 +217,29 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                         into = ("LINEAR","NONLINEAR"),
                                          ang = "type of law",
                                        ),
-                HOMOGENEOUS     = SIMP (statut="o",
+                 HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is homogeneous",
+                                         fr  = "le materiau est homogene",
                                        ),
-                ISOTROPIC       = SIMP (statut="o",
+                ISOTROPIC       = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is isotropic",
+                                         fr  = "le materiau est isotrope",
                                        ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_REAL     = SIMP (statut="f",
+                                       typ="R", 
+                                        ang = "enter a real value",
+                                        fr  = "entrer un reel",
+                                      ),
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
-                                       defaut=1,
                                         ang = "enter a complex value",
+                                        fr  = "entrer un complexe",
                                       ),
 
                 ), # fin FACT PERMITTIVITY
@@ -238,6 +250,8 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
   PERMEABILITY = FACT ( statut="o", 
                         ang ="Permeability properties",
                         fr  ="proprietes du bloc PERMEABILITY",
+                        regles = ( UN_PARMI ('VALUE_REAL','VALUE_COMPLEX'),
+                                ),                     
                 
                 LAW             = SIMP (statut="o",
                                         typ="TXM",
@@ -245,22 +259,29 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                         into = ("LINEAR","NONLINEAR"),
                                          ang = "type of law",
                                        ),
-                HOMOGENEOUS     = SIMP (statut="o",
+                 HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is homogeneous",
+                                         fr  = "le materiau est homogene",
                                        ),
-                ISOTROPIC       = SIMP (statut="o",
+                ISOTROPIC       = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is isotropic",
+                                         fr  = "le materiau est isotrope",
                                        ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_REAL     = SIMP (statut="f",
+                                       typ="R", 
+                                        ang = "enter a real value",
+                                        fr  = "entrer un reel",
+                                      ),
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
-                                       defaut=1,
                                         ang = "enter a complex value",
+                                        fr  = "entrer un complexe",
                                       ),
 
 #------------------------------------------------
@@ -407,17 +428,15 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                    fr= "definition du bloc ZSURFACIC", 
                     sd_prod= materiau,
              
-  NAME          = SIMP (statut="o",
-                       typ="TXM",
-                        ang = "name of the linked mesh group",
-                        fr = "nom du groupe de mailles associe",
-                       ),
+  
 #------------------------------------------------
 # sous bloc niveau 2 : CONDUCTIVITY
 #------------------------------------------------
   CONDUCTIVITY = FACT ( statut="o", 
                         ang ="Conductivity properties",
                         fr  ="proprietes du bloc CONDUCTIVITY",
+                        regles = ( UN_PARMI ('VALUE_REAL','VALUE_COMPLEX'),
+                                ),                     
                 
                 LAW             = SIMP (statut="o",
                                         typ="TXM",
@@ -426,23 +445,27 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                          ang = "type of law",
                                          fr = "type de loi",
                                        ),
-                HOMOGENEOUS     = SIMP (statut="o",
+                 HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is homogeneous",
                                          fr  = "le materiau est homogene",
                                        ),
-                ISOTROPIC       = SIMP (statut="o",
+                ISOTROPIC       = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is isotropic",
                                          fr  = "le materiau est isotrope",
                                        ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_REAL     = SIMP (statut="f",
+                                       typ="R", 
+                                        ang = "enter a real value",
+                                        fr  = "entrer un reel",
+                                      ),
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
-                                       defaut=1,
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
                                       ),
@@ -456,6 +479,8 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
   PERMEABILITY = FACT ( statut="o", 
                         ang ="Permeability properties",
                         fr  ="proprietes du bloc PERMEABILITY",
+                        regles = ( UN_PARMI ('VALUE_REAL','VALUE_COMPLEX'),
+                                ),                     
                 
                 LAW             = SIMP (statut="o",
                                         typ="TXM",
@@ -463,22 +488,29 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                         into = ("LINEAR","NONLINEAR"),
                                          ang = "type of law",
                                        ),
-                HOMOGENEOUS     = SIMP (statut="o",
+                 HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is homogeneous",
+                                         fr  = "le materiau est homogene",
                                        ),
-                ISOTROPIC       = SIMP (statut="o",
+                ISOTROPIC       = SIMP (statut="f",
                                         typ="TXM",
                                         defaut="TRUE",
                                         into = ("TRUE","FALSE"),
                                          ang = "the material is isotropic",
+                                         fr  = "le materiau est isotrope",
                                        ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_REAL     = SIMP (statut="f",
+                                       typ="R", 
+                                        ang = "enter a real value",
+                                        fr  = "entrer un reel",
+                                      ),
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
-                                       defaut=1,
                                         ang = "enter a complex value",
+                                        fr  = "entrer un complexe",
                                       ),
 
                 ), # fin FACT PERMEABILITY
@@ -499,11 +531,7 @@ NILMAT     = OPER (nom = "NILMAT",
                    fr= "definition du bloc NILMAT", 
                     sd_prod= materiau,
              
-  NAME          = SIMP (statut="o",
-                       typ="TXM",
-                        ang = "name of the linked mesh group",
-                        fr = "nom du groupe de mailles associe",
-                       ),
             ) # fin OPER NILMAT
 
 
index cdcb1dc4fb2fdaadc0a4e8be5f26f5d4caac43a4..f766b8fbde2b87f0f8444f582104152937f1708a 100644 (file)
@@ -15,7 +15,7 @@ import types
 # --------------------------------------------------
 class materiau ( ASSD ) : pass
 class grmaille ( ASSD ) : pass
-class loiNL    ( ASSD ) : pass
+class loi      ( ASSD ) : pass
 
 #CONTEXT.debug = 1
 # --------------------------------------------------
@@ -112,11 +112,9 @@ CONDUCTOR = OPER (nom = "CONDUCTOR",
                                  ),
 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                          ang = "type of law",
-                                          fr = "type de loi",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                 
                  HOMOGENEOUS     = SIMP (statut="f",
@@ -157,10 +155,9 @@ CONDUCTOR = OPER (nom = "CONDUCTOR",
                                  ),
                 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                         ang = "type of law",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                  HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
@@ -181,7 +178,7 @@ CONDUCTOR = OPER (nom = "CONDUCTOR",
                                         ang = "enter a real value",
                                         fr  = "entrer un reel",
                                       ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
@@ -214,10 +211,9 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                  ),
                 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                         ang = "type of law",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                  HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
@@ -238,7 +234,7 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                         ang = "enter a real value",
                                         fr  = "entrer un reel",
                                       ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
@@ -256,10 +252,9 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                  ),
                 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                         ang = "type of law",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                  HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
@@ -280,19 +275,12 @@ DIELECTRIC = OPER (nom = "DIELECTRIC",
                                         ang = "enter a real value",
                                         fr  = "entrer un reel",
                                       ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
                                       ),
 
-                 NonLinearCond  = BLOC (condition="LAW=='NONLINEAR'",
-                                  NONLINEAR   = SIMP (statut="o",
-                                                     typ= (loiNL,),
-                                                      ang = "enter a complex value",
-                                                      fr  = "parametres de la loi non lineaire",
-                                                    ),
-                                       ), 
 
                 ), # fin FACT PERMEABILITY
 
@@ -321,11 +309,9 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                  ),
                 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                         ang = "type of law",
-                                         fr = "type de loi",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                  HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
@@ -346,7 +332,7 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                         ang = "enter a real value",
                                         fr  = "entrer un reel",
                                       ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
@@ -365,11 +351,9 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                  ),
                 
                 LAW             = SIMP (statut="o",
-                                        typ="TXM",
-                                        defaut="LINEAR",
-                                        into = ("LINEAR","NONLINEAR"),
-                                         ang = "type of law",
-                                         fr = "type de loi",
+                                        typ= (loi,),
+                                         ang = "Choice of law",
+                                         fr  = "Choix d une loi",
                                        ),
                  HOMOGENEOUS     = SIMP (statut="f",
                                         typ="TXM",
@@ -390,7 +374,7 @@ ZSURFACIC  = OPER (nom = "ZSURFACIC",
                                         ang = "enter a real value",
                                         fr  = "entrer un reel",
                                       ),
-                VALUE_COMPLEX  = SIMP (statut="o",
+                VALUE_COMPLEX  = SIMP (statut="f",
                                        typ="C", 
                                         ang = "enter a complex value",
                                         fr  = "entrer un complexe",
@@ -467,20 +451,29 @@ EM_ANISOTROPIC = PROC (nom = "EM_ANISOTROPIC",
              ) # fin PROC EM_ANISOTROPIC
 
 #=========================================================
-# definition des parametres d une loi 
+# definition des parametres d une loi avec si besoin la constitution du sous bloc NONLINEAR
 #
-# Constitution de sous bloc NONLINEAR
-# produit un objet "bloc NONLINEAR" de type (classe) loiNL 
+# produit un objet de la class  loi 
 #------------------------------------------------
-DEF_NONLINEAR_BL = OPER (nom = "DEF_NONLINEAR_BL",
+LAW = OPER (nom = "LAW",
                     op = None,
                    repetable = 'n',
                     UIinfo= {"groupes":("Definition",)},
                    ang= "NONLINEAR block definition", 
-                   fr= "definition de bloc NONLINEAR", 
-                    sd_prod= loiNL,
+                    fr  = "definition des parametres de la loi",
+                    sd_prod= loi,
+                  
+                LINEAR         = SIMP (statut="o",
+                                        typ="TXM",
+                                        defaut="YES",
+                                        into = ("YES","NO"),
+                                         ang = "linear law or not",
+                                         fr = "loi lineaire ou non",
+                                       ),
+                 
+                 NonLinearLaw  = BLOC (condition="LINEAR=='NO'",
 
-                                  NATURE       =  SIMP (statut="o",
+                                  NATURE       =  SIMP (statut="o",
                                                         typ="TXM",
                                                         defaut="SPLINE",
                                                         into=("SPLINE","MARROCCO","MARROCCO+SATURATION"),
@@ -602,6 +595,7 @@ DEF_NONLINEAR_BL = OPER (nom = "DEF_NONLINEAR_BL",
                                                                     fr ="jointure appliquee a ",
                                                                    ),
                                                        ), # fin BLOC MarroSatuParam
+                                       ),# fin BLOC NonLinearLaw 
  ) # fin OPER 
 #================================
 # 3eme bloc : bloc SOURCES