parameter.add_parameter(composant, 'study_name', study_name)
parameter.add_parameter(composant, 'file_result_inclusions', file_result_inclusions)
parameter.add_parameter(composant, 'file_result_rve', file_result_rve)
-#print parameter
pygmee_v2_input = "/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/pygmee_v2_for_YACS_20101116.input"
commande+= "python pygmee_v2.py -i "+pygmee_v2_input+";\n"
os.system(commande)
+result_inclusions = file_result_inclusions
+result_rve = file_result_rve
+
print "pygmee_v2 for YACS - END"
]]></code></script>
<inport name="phase_number" type="int"/>
<inport name="study_name" type="string"/>
<inport name="file_result_inclusions" type="string"/>
<inport name="file_result_rve" type="string"/>
+ <outport name="result_inclusions" type="string"/>
+ <outport name="result_rve" type="string"/>
</inline>
<inline name="init">
<script><code><![CDATA[phase_number=1
<outport name="phase_number" type="int"/>
<outport name="rve_size" type="double"/>
<outport name="sieve_curve_in" type="string"/>
+ <outport name="sieve_curve_out" type="string"/>
<outport name="repulsion_distance" type="double"/>
<outport name="study_name" type="string"/>
- <outport name="sieve_curve_out" type="string"/>
<outport name="file_result_inclusions" type="string"/>
<outport name="file_result_rve" type="string"/>
</inline>
<fromnode>init</fromnode> <fromport>sieve_curve_in</fromport>
<tonode>pygmee_v2</tonode> <toport>sieve_curve_in</toport>
</datalink>
+ <datalink control="false">
+ <fromnode>init</fromnode> <fromport>sieve_curve_out</fromport>
+ <tonode>pygmee_v2</tonode> <toport>sieve_curve_out</toport>
+ </datalink>
<datalink control="false">
<fromnode>init</fromnode> <fromport>repulsion_distance</fromport>
<tonode>pygmee_v2</tonode> <toport>repulsion_distance</toport>
<fromnode>init</fromnode> <fromport>study_name</fromport>
<tonode>pygmee_v2</tonode> <toport>study_name</toport>
</datalink>
- <datalink control="false">
- <fromnode>init</fromnode> <fromport>sieve_curve_out</fromport>
- <tonode>pygmee_v2</tonode> <toport>sieve_curve_out</toport>
- </datalink>
<datalink control="false">
<fromnode>init</fromnode> <fromport>file_result_inclusions</fromport>
<tonode>pygmee_v2</tonode> <toport>file_result_inclusions</toport>
<fromnode>init</fromnode> <fromport>file_result_rve</fromport>
<tonode>pygmee_v2</tonode> <toport>file_result_rve</toport>
</datalink>
- <presentation name="init" x="89.4918" y="103" width="273.5" height="313"/>
- <presentation name="pygmee_v2" x="558" y="219.5" width="223" height="313"/>
- <presentation name="__ROOT__" x="0" y="0" width="790" height="541.5"/>
+ <presentation name="init" x="25.4918" y="100" width="273.5" height="313"/>
+ <presentation name="pygmee_v2" x="354" y="108.5" width="249" height="313"/>
+ <presentation name="__ROOT__" x="0" y="0" width="612" height="430.5"/>
</proc>
MATERIAUX= PROC(nom="MATERIAUX",op=None,
fr='definition des proprietes du materiau : fuseau, taille du VER, proprietes des phases',
- TAILLE=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.,equiv="size"),
- FUSEAU = SIMP ( statut = "o", fr="Fichier représentant le fuseau granulaire",typ = "Fichier", defaut=PATH_STUDY+"/inclusion_size_distribution.txt"),
- distance=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1),
- CONDUCTIVITE_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.),
- CONDUCTIVITE_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=10.0, val_min =0.),
+ rve_size=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.),
+ sieve_curve_in = SIMP ( statut = "o", fr="Fichier représentant le fuseau granulaire",typ = "Fichier", defaut=PATH_STUDY+"/inclusion_size_distribution.txt"),
+ repulsion_distance=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1),
+ lambda_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.),
+ lambda_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=10.0, val_min =0.),
inclusion_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.inclusions",cache=1),
- rve_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.rvz",cache=1),
- sieve_in=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_PYGMEE+"/tests/pygmee_v2_test_1.sieve_in",cache=1),
- sieve_out=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"pygmee_v2.sieve_out",cache=1),
+ rve_name=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"/pygmee_v2_test_1.rve",cache=1),
+# sieve_curve_in=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_PYGMEE+"/tests/pygmee_v2_test_1.sieve_in",cache=1),
+ sieve_curve_out=SIMP(statut = "f",fr="", typ='TXM',defaut=PATH_STUDY+"pygmee_v2.sieve_out",cache=1),
)
DISCRETISATION= PROC(nom="DISCRETISATION",op=None,
"""
import traceback
import types,string,re,os
+import time
+from datetime import date
from generator_python import PythonGenerator
try :
if hasattr(self.monSchema, codeYACS):
fct=getattr(self.monSchema, codeYACS)
fct(self.proc,dico)
- nomFichier="/local00/bin/MAP/studies/demonstrateur_s_polymers_st_1/test_20101116.xml"
+
+ today = str(date.today())
+ today = today.replace('-', '')
+ today+="-"+time.strftime("%H%M%S", time.localtime())
+
+ nomFichier=self.config.PATH_STUDY+"/"+self.config.NAME_SCHEME+"_"+today+".xml"
self.monSchema.write_yacs_proc(self.proc,str(nomFichier))
print "le fichier xml est : ",nomFichier
pygmee_v2_input=self.config.PATH_STUDY+"/pygmee_v2.input"
parameter=MAP_parameters()
parameter.add_component(composant)
- parameter.add_parameter(composant, 'rve_size', self.size)
+ parameter.add_parameter(composant, 'rve_size', self.rve_size)
parameter.add_parameter(composant, 'phase_number', 1)
- parameter.add_parameter(composant, 'sieve_curve_in', self.sieve_in)
- parameter.add_parameter(composant, 'sieve_curve_out', self.sieve_out)
- parameter.add_parameter(composant, 'repulsion_distance', self.distance)
+ parameter.add_parameter(composant, 'sieve_curve_in', self.sieve_curve_in)
+ parameter.add_parameter(composant, 'sieve_curve_out', self.sieve_curve_out)
+ parameter.add_parameter(composant, 'repulsion_distance', self.repulsion_distance)
parameter.add_parameter(composant, 'study_name', "study")
parameter.add_parameter(composant, 'file_result_inclusions', self.inclusion_name)
parameter.add_parameter(composant, 'file_result_rve', self.rve_name)
def FDVGRID(self):
if ( self.FINESSE < 32): self.FINESSE=32
- self.contrast=float(self.CONDUCTIVITE_I/self.CONDUCTIVITE_M)
+ self.contrast=float(self.lambda_I/self.lambda_M)
commande= "echo 'execution de FDVGRID';\n"
commande+= "cd "+self.config.PATH_FDVGRID+";\n"
- commande+= "echo "+ str(self.size)+" > "+"rve.input"+";\n"
+ commande+= "echo "+ str(self.rve_size)+" > "+"rve.input"+";\n"
commande+= "cp " +str(self.config.PATH_STUDY+"/pygmee_v2_test_1.inclusions")+" "+"inclusions.input"+";\n"
commande+= "echo "+str(self.contrast)+" > "+"contrast.input"+";\n"
commande+= "./fdvgrid 3D 1.0 0.0 0.0 v t "+str(self.FINESSE)+" cross 1e-6 "+";\n"
monFichierInput=self.config.PATH_STUDY+"/"+self.config.NAME_SCHEME+"/pygmee_input.txt"
factoryNode = self.monCata._nodeMap["pygmee_v2"]
self.pygmeeNode = factoryNode.cloneNode("pygmee_v2")
- self.pygmeeNode.getInputPort("rve_size").edInitPy(self.generator.size)
+ self.pygmeeNode.getInputPort("rve_size").edInitPy(self.generator.rve_size)
self.pygmeeNode.getInputPort("phase_number").edInitPy(1)
- self.pygmeeNode.getInputPort("sieve_curve_in").edInitPy(self.generator.sieve_in)
- self.pygmeeNode.getInputPort("sieve_curve_out").edInitPy(self.generator.sieve_out)
- self.pygmeeNode.getInputPort("repulsion_distance").edInitPy(self.generator.distance)
- self.pygmeeNode.getInputPort("study_name").edInitPy("s_polymers_st_1_20101116")
+ self.pygmeeNode.getInputPort("sieve_curve_in").edInitPy(self.generator.sieve_curve_in)
+ self.pygmeeNode.getInputPort("sieve_curve_out").edInitPy(self.generator.sieve_curve_out)
+ self.pygmeeNode.getInputPort("repulsion_distance").edInitPy(self.generator.repulsion_distance)
+ self.pygmeeNode.getInputPort("study_name").edInitPy("s_polymers_st_1_20101117")
self.pygmeeNode.getInputPort("file_result_inclusions").edInitPy(self.generator.inclusion_name)
self.pygmeeNode.getInputPort("file_result_rve").edInitPy(self.generator.rve_name)
proc.edAddChild(self.pygmeeNode)