From 03047f74282bb77ba0e796fb4bd9cd79ceb23119 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 28 Jan 2015 11:16:27 +0100 Subject: [PATCH] ZS --- generator/generator_CARMELCND.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/generator/generator_CARMELCND.py b/generator/generator_CARMELCND.py index f7d5e9ce..3110e81a 100755 --- a/generator/generator_CARMELCND.py +++ b/generator/generator_CARMELCND.py @@ -45,6 +45,16 @@ debutTexteParam ="[VERSION\n NUM 1\n FILETYPE PARAM\n]\n" debutTexteParam+="[PROBLEM\n NAME HARMONIC\n]\n" debutTexteParam+="[CAR_FILES\n NAME " +debutTexteBav ="[ZSURFACIC\n NAME BAV\n [CONDUCTIVITY\n" +debutTexteBav+=" LAW LINEAR\n" +debutTexteBav+=" HOMOGENEOUS TRUE\n" +debutTexteBav+=" ISOTROPIC TRUE\n" +debutTexteBav+=" VALUE COMPLEX " +texteBav2 =" 0.0000000000000000E+00\n ]\n" +texteBav2 +=" [PERMEABILITY\n LAW LINEAR\n" +texteBav2 +=" HOMOGENEOUS TRUE\n" +texteBav2 +=" ISOTROPIC TRUE\n VALUE COMPLEX " +finTexteBav =" 0.0000000000000000E+00\n ]\n]\n" def entryPoint(): """ @@ -98,10 +108,15 @@ class CARMELCNDGenerator(PythonGenerator): self.texteParam=debutTexteParam self.chercheFichier() self.traiteSourceVCut() + self.traiteZs_Bav() + fileIngendof = fn[:fn.rfind(".")] + '.ingendof' f = open( str(fileIngendof), 'wb') f.write( self.texteIngendof ) f.close() + f = open( str("/tmp/toto"), 'wb') + f.write( self.texteIngendof ) + f.close() self.textePhys=debutTextePhys self.traiteMateriaux() @@ -201,6 +216,16 @@ class CARMELCNDGenerator(PythonGenerator): if self.dictMCVal["__PARAMETRES__TypedeFormule"]=="APHI" :self.texteIngendof+="1\n" else : self.texteIngendof+="2\n" +#---------------------------------------------------------------------------------------- + def traiteZs_Bav(self): +#---------------------------------------------------------------------------------------- + if "__ZS_BAV__Permeabilite" in self.dictMCVal.keys(): + self.texteSourcePhys+=debutTexteBav + self.texteSourcePhys+=str(self.dictMCVal["__ZS_BAV__Conductivite"]) + self.texteSourcePhys+=texteBav2 + self.texteSourcePhys+=str(self.dictMCVal["__ZS_BAV__Permeabilite"]) + self.texteSourcePhys+=finTexteBav + #---------------------------------------------------------------------------------------- def traiteMateriaux(self) : -- 2.39.2