From: Charles Toulemonde Date: Tue, 23 Nov 2010 10:48:54 +0000 (+0000) Subject: volume_fraction_ouput for pygmvee_v2 X-Git-Tag: V2_1_1_beta~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1644252d91b712b984bb52e5e4b1db97741a7449;p=modules%2Feficas.git volume_fraction_ouput for pygmvee_v2 --- diff --git a/MAP/Templates/s_polymers_st_1/cata_s_polymers_st_1.xml b/MAP/Templates/s_polymers_st_1/cata_s_polymers_st_1.xml index 3df24892..f02b4072 100644 --- a/MAP/Templates/s_polymers_st_1/cata_s_polymers_st_1.xml +++ b/MAP/Templates/s_polymers_st_1/cata_s_polymers_st_1.xml @@ -27,7 +27,7 @@ sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'),'../EficasV1/MAP/Templat print sys.path from s_polymers_st_1_YACS_nodes import * -component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out, repulsion_distance, study_name, study_path, file_result_inclusions, file_result_rve) +volume_fraction=component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out, repulsion_distance, study_name, study_path, file_result_inclusions, file_result_rve) result_inclusions = file_result_inclusions result_rve = file_result_rve @@ -106,18 +106,18 @@ print "benhur for YACS - END" - pygmee_v2 benhur pygmee_v2 fdvgrid - init benhur - init fdvgrid + pygmee_v2 benhur init pygmee_v2 + init fdvgrid + init benhur pygmee_v2 result_inclusions - benhur file_inclusions + fdvgrid file_inclusions pygmee_v2 result_inclusions - fdvgrid file_inclusions + benhur file_inclusions init phase_number @@ -173,11 +173,11 @@ print "benhur for YACS - END" init study_name - fdvgrid study_name + pygmee_v2 study_name init study_name - pygmee_v2 study_name + fdvgrid study_name init study_name @@ -185,7 +185,7 @@ print "benhur for YACS - END" init study_path - fdvgrid study_path + benhur study_path init study_path @@ -193,7 +193,7 @@ print "benhur for YACS - END" init study_path - benhur study_path + fdvgrid study_path init benhur_template @@ -203,9 +203,9 @@ print "benhur for YACS - END" benhurfile_inclusions + + - - diff --git a/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py b/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py index e8409277..0158c55b 100644 --- a/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py +++ b/MAP/Templates/s_polymers_st_1/s_polymers_st_1_YACS_nodes.py @@ -30,8 +30,15 @@ def component_pygmee_v2(rve_size, phase_number, sieve_curve_in, sieve_curve_out, commande+= "python pygmee_v2.py -i "+pygmee_v2_input+";\n" os.system(commande) + fd = open(file_result_rve, 'r') + line=fd.readline() + line=fd.readline() + volume_fraction=float(line) + print "volume_fraction =", volume_fraction + fd.close() + print "pygmee_v2 for YACS - END" - return + return volume_fraction def component_fdvgrid(lambda_I, lambda_M, rve_size, file_inclusions, finesse): print "fdvgrid for YACS - BEGIN" diff --git a/generator/generator_s_polymers_st_1.py b/generator/generator_s_polymers_st_1.py index a6eb0fb4..39de0bf1 100644 --- a/generator/generator_s_polymers_st_1.py +++ b/generator/generator_s_polymers_st_1.py @@ -166,7 +166,7 @@ class s_poly_st_1Generator(MapGenerator): commande_python="import os,sys;\n" commande_python+="sys.path.append(os.path.join(os.getenv('MAP_DIRECTORY'), '../EficasV1/MAP/Templates/s_polymers_st_1'));\n" commande_python+="from s_polymers_st_1_YACS_nodes import *;\n" - commande_python+="component_pygmee_v2("+str(self.rve_size)+",1,"+str(self.sieve_curve_in)+","+str(self.sieve_curve_out)+","+str(self.repulsion_distance)+","+str(self.study_name)+","+str(self.study_path)+","+str(self.inclusion_name)+","+str(self.rve_name)+");\n" + commande_python+="volume_fraction=component_pygmee_v2("+str(self.rve_size)+",1,"+str(self.sieve_curve_in)+","+str(self.sieve_curve_out)+","+str(self.repulsion_distance)+","+str(self.study_name)+","+str(self.study_path)+","+str(self.inclusion_name)+","+str(self.rve_name)+");\n" return 'python -c "'+commande_python+'"\n' def FDVGRID(self):