From: pascale.noyret Date: Mon, 29 Apr 2019 12:42:15 +0000 (+0200) Subject: 1ere version du Vimmp Formation X-Git-Tag: avantMenage~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=89331a6804b4ef374102d53220d291eee2bf5e11;p=tools%2Feficas.git 1ere version du Vimmp Formation --- diff --git a/Vimmp/LBM/LBM2MED.py b/Vimmp/LBM/LBM2MED.py deleted file mode 100644 index eba16966..00000000 --- a/Vimmp/LBM/LBM2MED.py +++ /dev/null @@ -1,80 +0,0 @@ -from numpy import * -from numpy.linalg import * -import MEDCoupling as mc -import MEDLoader as ml -from MEDCouplingRemapper import MEDCouplingRemapper - -def run_LBM(maxIter,nx,ny): -###### Flow definition ######################################################### - Re = 220.0 # Reynolds number. - ly=ny-1.0; q = 9 # Lattice dimensions and populations. - cx = nx/4; cy=ny/2; r=ny/9; # Coordinates of the cylinder. - uLB = 0.04 # Velocity in lattice units. - nulb = uLB*r/Re; omega = 1.0 / (3.*nulb+0.5); # Relaxation parameter. - -###### Lattice Constants ####################################################### - c = array([(x,y) for x in [0,-1,1] for y in [0,-1,1]]) # Lattice velocities. - t = 1./36. * ones(q) # Lattice weights. - t[asarray([norm(ci)<1.1 for ci in c])] = 1./9.; t[0] = 4./9. - noslip = [c.tolist().index((-c[i]).tolist()) for i in range(q)] - i1 = arange(q)[asarray([ci[0]<0 for ci in c])] # Unknown on right wall. - i2 = arange(q)[asarray([ci[0]==0 for ci in c])] # Vertical middle. - i3 = arange(q)[asarray([ci[0]>0 for ci in c])] # Unknown on left wall. - -###### Function Definitions #################################################### - sumpop = lambda fin: sum(fin,axis=0) # Helper function for density computation. - def equilibrium(rho,u): # Equilibrium distribution function. - cu = 3.0 * dot(c,u.transpose(1,0,2)) - usqr = 3./2.*(u[0]**2+u[1]**2) - feq = zeros((q,nx,ny)) - for i in range(q): feq[i,:,:] = rho*t[i]*(1.+cu[i]+0.5*cu[i]**2-usqr) - return feq - -###### Setup: cylindrical obstacle and velocity inlet with perturbation ######## - obstacle = fromfunction(lambda x,y: (x-cx)**2+(y-cy)**2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 100000 - - - 260 - - - 90 - - - DataIn1 PyScript0 - - DataIn1 maxIter - PyScript0 maxIter - - - DataIn1 nx - PyScript0 nx - - - DataIn1 ny - PyScript0 ny - - - - - diff --git a/Vimmp/Models/CFD.py b/Vimmp/Models/CFD.py deleted file mode 100644 index 8c4ea096..00000000 --- a/Vimmp/Models/CFD.py +++ /dev/null @@ -1,48 +0,0 @@ -from Accas import * - -def Physical_Parameters_LBM(): - return FACT( statut='o', - rho = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - - Rheo_Type = SIMP(statut='o',typ='TXM', into=('Newtonian', 'Carreau-Yasuda',), defaut='Newtonian'), - - Rheo_Newt = BLOC(condition = 'Rheo_Type == "Newtonian"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=1.0,val_min=0.0), - ), - - Rheo_Visco = BLOC(condition = 'Rheo_Type == "Carreau-Yasuda"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - ViscInf = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - Tau = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - n = SIMP(statut = "o", typ = 'R', defaut=0.3, val_min=0.0), - a = SIMP(statut = "o", typ = 'R', defaut=0.5, val_min=0.0), - ), - ) - -def Param_Num_LBM(): - return FACT( statut='o', - dt = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - nb_iter = SIMP(statut = "o", typ = 'I', defaut=1, val_min=1), - ) - -def Output_Files_LBM() : - return FACT( statut='o', - - File_Format = SIMP(statut='o',typ='TXM', into=('Med', 'Other',), defaut='Med'), - - Mesh_Med = BLOC(condition = 'File_Format == "Med"', - File_Name = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="Name of the mesh file in Med format", - ), - ), - - Mesh_Other = BLOC(condition = 'File_Format == "Other"', - File_Name = SIMP (statut="o", - typ=("FichierNoAbs",), - ang="Name of the mesh file in other format", - ), - ), - - ) - diff --git a/Vimmp/Models/DPM.py b/Vimmp/Models/DPM.py deleted file mode 100644 index 5c5c0ae0..00000000 --- a/Vimmp/Models/DPM.py +++ /dev/null @@ -1,8 +0,0 @@ -from Accas import * - -def Numerical_Parameters_DPM(): - return FACT( statut='o', - nb_particle = SIMP(statut = "o", typ = 'I', defaut=1000, val_min=1), - dt = SIMP(statut = "o", typ = 'R', defaut=0.1, val_min=0.0), - nb_iter = SIMP(statut = "o", typ = 'I', defaut=10, val_min=1), - ) diff --git a/Vimmp/Models/LBM.py b/Vimmp/Models/LBM.py deleted file mode 100644 index 6371f9ae..00000000 --- a/Vimmp/Models/LBM.py +++ /dev/null @@ -1,47 +0,0 @@ -from Accas import * - -def Physical_Parameters_LBM(): - return FACT( statut='o', - rho = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - - Rheo_Type = SIMP(statut='o',typ='TXM', into=('Newtonian', 'Carreau-Yasuda',), defaut='Newtonian'), - - Rheo_Newt = BLOC(condition = 'Rheo_Type == "Newtonian"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=1.0,val_min=0.0), - ), - - Rheo_Visco = BLOC(condition = 'Rheo_Type == "Carreau-Yasuda"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - ViscInf = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - Tau = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - n = SIMP(statut = "o", typ = 'R', defaut=0.3, val_min=0.0), - a = SIMP(statut = "o", typ = 'R', defaut=0.5, val_min=0.0), - ), - ) - -def Discretization_LBM(): - return FACT( statut='o', - nx = SIMP(statut = "o", typ = 'I', defaut=30, val_min=1), - ny = SIMP(statut = "o", typ = 'I', defaut=10, val_min=1), - max_iter = SIMP(statut = "o", typ = 'I', defaut=1, val_min=1), - ) - -def Output_Files_LBM() : - return FACT( statut='o', - - File_Format = SIMP(statut='o',typ='TXM', into=('Med', 'Other',), defaut='Med'), - Mesh_Med = BLOC(condition = 'File_Format == "Med"', - File_Name = SIMP (statut="o", - typ="FichierNoAbs", - ang="Name of the mesh file in Med format", - ), - ), - Mesh_Other = BLOC(condition = 'File_Format == "Other"', - File_name = SIMP (statut="o", - typ="FichierNoAbs", - ang="Name of the mesh file in other format", - ), - ), - - ) - diff --git a/Vimmp/Models/OtherCFD.py b/Vimmp/Models/OtherCFD.py deleted file mode 100644 index 6301f5a8..00000000 --- a/Vimmp/Models/OtherCFD.py +++ /dev/null @@ -1,55 +0,0 @@ -from Accas import * - -def Physical_Parameters_OtherCFD(): - return FACT( statut='o', - rho = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - - Rheo_Type = SIMP(statut='o',typ='TXM', into=('Newtonian', 'Carreau-Yasuda',), defaut='Newtonian'), - - Rheo_Newt = BLOC(condition = 'Rheo_Type == "Newtonian"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=0.5,val_min=0.0), - ), - - Rheo_Visco = BLOC(condition = 'Rheo_Type == "Carreau-Yasuda"', - Visc0 = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - ViscInf = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - Tau = SIMP(statut = "o", typ = 'R', defaut=10.0, val_min=0.0), - n = SIMP(statut = "o", typ = 'R', defaut=0.3, val_min=0.0), - a = SIMP(statut = "o", typ = 'R', defaut=0.5, val_min=0.0), - ), - ) - -def Param_Num_OtherCFD(): - return FACT( statut='o', - dt = SIMP(statut = "o", typ = 'R', defaut=1.0, val_min=0.0), - number_of_time_step = SIMP(statut = "o", typ = 'I', defaut=1, val_min=1), - ) - -def Input_Files_OtherCFD() : - return FACT( statut='o', - - File_Format = SIMP(statut='o',typ='TXM', into=('Med', 'Iges' 'Other',), defaut='Iges'), - - Mesh_Med = BLOC(condition = 'File_Format == "Med"', - File_Name = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.med)',), - ang="Name of the mesh file in Med format", - ), - ), - Mesh_Iges = BLOC(condition = 'File_Format == "Iges"', - File_Name = SIMP (statut="o", - typ=("FichierNoAbs",'MED Files (*.igs)',), - ang="Name of the mesh file in iges format", - ), - ), - - - Mesh_Other = BLOC(condition = 'File_Format == "Other"', - File_Name = SIMP (statut="o", - typ=("FichierNoAbs",), - ang="Name of the mesh file in other format", - ), - ), - - ) - diff --git a/Vimmp/Models/__init__.py b/Vimmp/Models/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/Vimmp/cata_Vimmp.py b/Vimmp/cata_Vimmp.py new file mode 100644 index 00000000..4915e967 --- /dev/null +++ b/Vimmp/cata_Vimmp.py @@ -0,0 +1,412 @@ +# coding: utf-8 -*- +# + +import os +import types +monFile=os.path.abspath(__file__) + +# ------------------------------------------------- Definition fonction utilisateur +from Accas import * +class Elementary_Surface(UserASSD): pass +class StudySD(ASSD) : pass +class Specie(UserASSD) : pass +class Bondedparticle(UserASSD) : pass + +def creeSpecie(MC) : + MC.creeObjetClasse(Specie) + return + +def creeBondedparticle(MC) : + MC.creeObjetClasse(Bondedparticle) + return + +def creeSurfaceElementaire(MC) : + MC.creeObjetClasse(Elementary_Surface) + return + +# ------------------------------------------------- Definition fonction du catalogue ou macro + +def champ(nomDelaContante, labels ,nbReels ) : +# ajouter les extensions pour le fichier et les blocs associes +# certains champs ne seront jamais uniformes + #Input_Mode = SIMP( statut='o', typ='TXM', into=('uniform value','values directly assigned','values read in file','analytical function', 'call to a service')), +#PNPN : Passer le nom du champ pour le label du vecteur + dicoBloc = {} + dicoBloc[nomDelaContante] = SIMP( statut='o', typ='R') + return FACT( statut='o', + Input_Mode = SIMP( statut='o', typ='TXM', into=('uniform value','values directly assigned','values read in file','analytical function',)), + b_uniforme = BLOC( condition = "Input_Mode == 'uniform value'", **dicoBloc), + b_vsaisies = BLOC( condition = "Input_Mode == 'values directly assigned'", + Field = SIMP( typ='R', statut='o', max ='**'), + #Vecteur = SIMP( fenetreIhm='Tableau', homo = labels, + # statut='o', min=2, max='**', + # typ=Tuple(nbReels), + # validators=VerifTypeTuple(("'R',"*nbReels),),) # end particle + ), #b_vsaisie + b_vdsfich = BLOC( condition = "Input_Mode == 'values read in file'", + Format = SIMP( statut='o', typ='TXM', into=['txt','Med',], position='global' ), + td_txt = BLOC_FICHIER(condition = 'Format == "txt"', + File = SIMP( statut='o', typ=('Fichier','Text Files(*.txt);All Files (*)'),), + ), + td_med_1 = BLOC_FICHIER( condition = 'Format == "Med"', + File = SIMP( statut='o', typ=('Fichier','Med Files(*.med);All Files (*)'),), + ), + td_med_2 = BLOC( condition = 'Format == "Med"', + FieldName = SIMP( statut='o', typ='TXM',), + ), + ), + b_vfct = BLOC( condition = "Input_Mode == 'analytical function'", + Function = SIMP( statut='o', typ='TXM',), + ), + #b_vserc = BLOC( condition = "Input_Mode == 'call to a service'", + # Service = SIMP( statut='o', typ='TXM',), + #), + ) + + +def BlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats): + SIMPFormatFichier = SIMP(statut='o', typ = 'TXM', into = tuple(ListeFormats) + ('others',), ) + dicoDesBlocs = {} + for formatFich in ListeFormats : + nomBloc = 'b_format_fichier' + str(formatFich) + typeDesFichiers = ('Fichier', formatFich + " Files (*." + formatFich + ");;All Files (*)",) + blocCondition ="FileFormat == '" + formatFich + "'" + dicoDesBlocs[nomBloc] = BLOC_FICHIER ( condition = blocCondition, FileName = SIMP(statut='o', typ = typeDesFichiers ),) + dicoDesBlocs['b_format_fichier_others'] = BLOC_FICHIER (condition="FileFormat == 'others'", FileName = SIMP(statut='o', typ = ('Fichier','All Files (*)'),),) + return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs) + + +# ____________________________________________________________________________________________ # + +JdC = JDC_CATA(code='Vimmp',fichierSource=monFile) + + +Study = OPER(nom = 'Study', sd_prod = StudySD, + Title = SIMP( statut='o', typ='TXM'), + Simulated_Time_Lapse = FACT( statut='o', + Initial_Time = SIMP( statut='o', typ='R'), + Duration = SIMP( statut='o', typ='R'), + ), +# + Geometric_Domain= FACT( statut='o', + Shape = SIMP( statut='o', typ='TXM', into=['Simplified Shape', 'CAD or Mesh']), + b_Shape = BLOC( condition = 'Shape == "Simplified Shape"', + Box = SIMP( statut='o', typ='TXM', into=['Cube', 'Sphere','Cylinder'] ), + b_Cube = BLOC( condition = 'Box == "Cube"', + #Taille_Box_Englobante = SIMP( statut='o', typ='R', max=3, min =3) + # derait etre un Tuple(3) mais a faire apres la projection + Size_Of_Bounding_Box = SIMP( statut='o', typ=Tuple(3), validators=VerifTypeTuple(('R','R','R'),),) + ), # fin b_Cube + b_Boule = BLOC( condition = 'Box == "Sphere"', + Center = SIMP( statut='o', typ='R', max=3, min =3), + # devrait etre un Tuple(3) mais a faire apres la projection + ),# fin b_Boule + b_Cylinder = BLOC( condition = 'Box == "Cylinder"', + Heigth = SIMP( statut="o", typ='R', val_min=0.0, ang='Nanotube length [m]'), + ),# fin b_Tube + b_Boule_ou_Cylinder = BLOC( condition = 'Box == "Sphere" or Box == "Cylinder"', + Radius = SIMP( statut='o', typ='R', val_min=0.0, ang='radius length [m]') , + ),# fin b_Boule_ouCylinder + ), # fin b_Shape +# + b_CAO = BlocPourLesFichiers( "Shape == 'CAD or Mesh'",'Domain_File', ['txt','med','I-deas', 'Gmsh', 'top',]), + + Surface=SIMP( statut='o', typ='TXM',max='**', siValide=creeSurfaceElementaire), + ), # fin Geometric_Domain + + +# ----------------------------------------------------------------- System_Component ---------------------------------------------------------------------------# + System_Component= FACT( statut='o', max = "**", + + General_Level_Of_Description = SIMP( statut='o', typ='TXM', into=['Microscopic','Mesoscopic', 'Macroscopic'] ), + Component = SIMP( statut='o', typ='TXM', into=['Quantum System','Classical_Particle System', 'Continuum Sytem'] ), + #Component = SIMP( statut='o', typ='TXM', into=['Particle', 'Fluid','Solid ',], position='global'), + + b_component_particle = BLOC( condition = "Component == 'Classical_Particle System'", + #-----------------------------------------------------# + Physical_Description_Particle = FACT( statut='o', + #-----------------------------------------------------# + + List_Of_Species = FACT( statut='o', + # ------------------------------# + Number_Of_Species = SIMP( statut='o', typ='I', defaut=1, position='global_jdc'), + Specie = FACT( statut='o', max ="**", + Name_Of_Specie = SIMP( statut='o', typ='TXM', siValide=creeSpecie), + Mass_Molaire = SIMP( statut='o', typ='R',), + Mass_Fraction = SIMP( statut='f', typ='R',), + Number_of_Particle = SIMP( statut='f', typ='I', val_min = 1), + b_Electrostatique = BLOC( condition = "Permittivity != None", + Charge = SIMP( statut='o', typ='R'), + ), # fin b_Electrostatic + ), # fin Specie + ), # fin List_Of_Species + + List_Of_Bonded_Particles = FACT( statut='f', + # -------------------------------------------# + Bonded_Particles = FACT( statut='o', max = "**", + Name_Of_Bonded_Particles = SIMP( statut='o', typ='TXM',siValide=creeBondedparticle ), + Species_in_Particle = SIMP( statut='o', min=2, typ=Specie , max = "**"), + ), # Bonded_Particles + ), # List_Of_Bonded_Particles + + List_Of_Interactions = FACT( statut='o', max = "**", + # --------------------------------------------------# + + Bonded_Interactions = FACT( statut='o', max = "**", + + Type_Of_Bonded_Interaction = SIMP( statut='o', typ='TXM', into=['No', 'Covalent Bond Length', 'FENE', 'Covalent Bond Angle', 'Dihedral Angles', 'Improper Dihedral', 'Frozen Motion' ], defaut='No', position='global'), + + bloc_covalent_1 = BLOC( condition = 'Type_Of_Bonded_Interaction in ("Covalent Bond Length","FENE")', + Name_of_Bonded_Particle = SIMP( statut='o', typ=Bondedparticle), + ), # fin bloc_covalent_1 + + bloc_covalent_length_and_angle = BLOC( condition = 'Type_Of_Bonded_Interaction == "Covalent Bond Length" or Type_Of_Bonded_Interaction == "Covalent Bond Angle"', + Bond_Length_Parameters = FACT( statut='o', max="**", + Species_Pair = SIMP( statut='o', max=2, typ='TXM'), + Spring_Stifness = SIMP( statut='o', typ='R', val_min=0), + bloc_covalent_lengtht = BLOC( condition = 'Type_Of_Bonded_Interaction == "Covalent Bond Length"', + Mean_Bond_Length = SIMP( statut='o', typ='R', val_min=0), + ), # fin Bond_Length_Parameters + bloc_covalent_angle = BLOC( condition = 'Type_Of_Bonded_Interaction == "Covalent Bond Angle"', + Mean_Bond_Angle = SIMP( statut='o', typ='R', val_min=0), + ), # fin Bond_Length_Parameters + ), # fin Bond_Length_Parameters + ), # fin bloc_covalent_length_and_angle + + bloc_FENE = BLOC( condition = 'Type_Of_Bonded_Interaction == "FENE"', + Applies_To_All_Particles = SIMP( statut='o', typ=bool, defaut=True), + bloc_not_on_all = BLOC( condition = 'Applies_To_All_Particles == False', + FENE_Parameters = FACT( statut='o', max="**", + Species_Pair = SIMP( statut='o', max=2, typ='TXM'), + Spring_Constant_H = SIMP( statut='o', typ='R', val_min=0), + LMax = SIMP( statut='o', typ='R', val_min=0), + ), # fin FENE_Parameters + ), # fin bloc_not_on_all + bloc_on_all = BLOC( condition = 'Applies_To_All_Particles == True', + Spring_Constant_H = SIMP( statut='o', typ='R', val_min=0), + LMax = SIMP( statut='o', typ='R', val_min=0), + ), # fin bloc_on_all + ), # fin bloc_FENE + + bloc_le_reste = BLOC( condition = 'Type_Of_Bonded_Interaction in ("Dihedral Angles", "Improper Dihedral", "Frozen Motion")', + Particle_Name = SIMP( statut="f", typ='TXM'), + #Consigne = SIMP( statut="o", homo="information", typ="TXM", defaut='Not Implemented Yet'), + + ), + ), # fin Bonded_Interaction + + # ------------------------------- # + + Unbonded_Interactions = FACT( statut='o', max= "**", + + Type_Of_Unbonded_Interaction = SIMP( statut='o', typ='TXM', into=['No', 'electro_magnetic', 'Repulsion_and_VdW', 'Soft_Potentiel', ], defaut='No', position='global',fenetreIhm='menuDeroulant'), + + bloc_elec = BLOC( condition = 'Type_Of_Unbonded_Interaction == "electro_magnetic"', + Permittivity = SIMP( statut='o', typ='R', position='global'), + Magnetic = SIMP( statut='o', typ=bool, defaut=False,), + bloc_magnetic = BLOC( condition = 'Magnetic == True', + Permability = SIMP( statut='o', typ='R'), + ), # bloc_magnetic + ),# fin bloc_elec + + bloc_VdW = BLOC( condition = 'Type_Of_Unbonded_Interaction == "Repulsion_and_VdW"', + type_Repulsion_and_VdW = SIMP( statut='o', typ='TXM', into = [ 'Lennard_Jones', 'Hard_sphere_model'], position='global' ), + ), # fin bloc_VdW + + bloc_not_elec = BLOC( condition = 'Type_Of_Unbonded_Interaction not in( "electro_magnetic", "No") ', + Species_Pair_Parameters = FACT( statut='o', max="**", + Species_Pair = SIMP( statut='o', max=2, typ='TXM'), + b_Param_Potential_Type_LJ_1 = BLOC( condition = "Type_Of_Unbonded_Interaction == 'Repulsion_and_VdW'", + VdW_Radius = SIMP( statut='o', typ='R', val_min=0), + b_PPal_LJ2 = BLOC( condition = "type_Repulsion_and_VdW == 'Lennard_Jones'", + Depth_Of_The_Potential_Well = SIMP( statut='o', typ='R', val_min=0), + ), # fin b_b_PPal_LJ2 + ), # fin b_Param_Potential_Type_LJ_1 + + b_Param_Soft_Potentiel = BLOC( condition = "Type_Of_Unbonded_Interaction == 'Soft_Potentiel'", + Groot_Warren_Repulsion = SIMP( statut='o', typ='R', defaut=25.0, val_min=0), + Groot_Warren_Cutoff = SIMP( statut='o', typ='R', defaut=1.0, val_min=0), + Drag_Coefficient = SIMP( statut='o', typ='R'), # les 2 valent 0 pour MD + Drag_Force_Cutoff = SIMP( statut='o', typ='R', val_min=0), + ), # b_Param_Soft_Potentiel + ), # Species_Pair_Parameters + ),# fin bloc_not_elec + + ), # fin UnBonded_Interactions + + # ------------------------------- # + + External_Field_Interaction = FACT( statut='o', max= "**", + Type_Of_Interaction_With_An_External_Field = SIMP( statut='o', typ='TXM', into=['No','gravitational field','electric field','magnetic field', 'Hydrodynamic_Field'], fenetreIhm='menuDeroulant', defaut ='No'), + b_gravite = BLOC( condition = 'Type_Of_Interaction_With_An_External_Field=="gravitational field"', + G = SIMP( statut='o', typ='R', defaut=9.81), + ), + b_elect = BLOC( condition = 'Type_Of_Interaction_With_An_External_Field=="electric field"', + Electric_Field = champ('E', ('E',), 1), + ), + b_magnetic = BLOC( condition = 'Type_Of_Interaction_With_An_External_Field=="magnetic field"', + Magnetic_Field = champ('B', ('B',), 1), + ), + b_hydrodynamic = BLOC( condition = 'Type_Of_Interaction_With_An_External_Field=="hydrodynamic field"', + Hydrodynamic_Field = champ('U', ('U',), 1), + ), + b_External_Field_Interaction = BLOC( condition = 'Type_Of_Interaction_With_An_External_Field != "No"', + Field_Applies_On_All_Species = SIMP( statut='o', typ=bool, defaut=True), + b_porte_espece = BLOC( condition = 'Field_Applies_On_All_Species == False ', + Species_List = SIMP( statut='o', typ='TXM', max= '**'), # faire un typ = "espece" + ), + ), # fin b_External_Field_Interaction + ), # fin Interaction_External_Field + + ), # fin List_Of_Interactions + + Statistical_Physics = FACT( statut='o', + #-----------------------------------------------------# + Type_Of_Statistical_Physics = SIMP( statut='o', typ='TXM', into=['No','Equilibrium', 'Non_Equilibrium'], defaut ='No'), + + b_Statistical_Physics_Equilibrium = BLOC( condition = "Type_Of_Statistical_Physics == 'Equilibrium'", + Distribution = SIMP( statut='o', typ='TXM', into=['nvt','nve']), + b_nvt = BLOC( condition = "Distribution == 'nvt'", + Target_Temperature = SIMP( statut='o', typ='R') + ), # fin b_nvt + + b_nve = BLOC( condition = "Distribution == 'nve'", + Target_Energie = SIMP( statut='o', typ='R') + ), # fin b_nve + ), # b_Physique_statstique_equilibre + + b_Statistical_Physics_Equilibrium_false = BLOC( condition = "Type_Of_Statistical_Physics == 'Non_Equilibrium'", + Non_Equilibrium_Driving_Force = SIMP( statut='o', typ='TXM', into=[ 'Temperature',],), + Imposed_non_isothermal = FACT ( statut = 'o', min=2, max="**", + Imposed_Temperature = SIMP( statut='o', typ='R'), + Applied_On_Surface = SIMP( statut='o', typ= Elementary_Surface), + ), + ), # b_Physique_statstique_equilibre + + ), # fin Statistical_Physics + + ), # fin Physical_Description_particle + + #-----------------------------------------------# + Particle_Representation = FACT( min=1, max=2, statut='o', + #------------------------------------------------# + #EFEFEF : La description choisie donne la liste des modèles numériques disponibles pour cette description + # attention Lattice Bolzman + + Representation_Type = SIMP( statut='o', typ='TXM', into=['Particle_Representation', 'Field_Representation'],), + Type_Of_Entity = SIMP( statut='o', typ='TXM', into=['Electron', 'Atom', 'Grain', 'CVE']), + b_repr_particle = BLOC( condition = 'Representation_Type == "Particle_Representation"', + Numerical_Particle_Model = FACT( statut='o', max ='**', + Type_Of_State_Vector = SIMP( statut='o', typ='TXM', into=['Position', 'Kinetic', 'Extended_Kinetic'], position='global'), + b_Extended_Kinetic = BLOC( condition = ' Type_Of_State_Vector == "Extended_Kinetic" ', + Angular_Velocity = SIMP( statut='o', typ= bool, defaut = True) + ), # fin b_Extended_Kinetic + ), # Particle_Model + Definition_Numerical_Model = FACT( statut='o', + b_State_Vector_Kinetic = BLOC (condition = "Type_Of_State_Vector == 'Kinetic'", + Numerical_Model = SIMP( statut='o', typ='TXM', into=['MD', 'DPD']), + ), + b_State_Vector_Extanded_Kinetic = BLOC (condition = "Type_Of_State_Vector == 'Extented_Kinetic'", + Numerical_Model_DPD = SIMP( statut='o', typ='TXM', into=['DPD']), + ), + Structure_Of_The_Evolution_Law = SIMP( statut='o', typ='TXM', into=['Newton equations'], defaut='Newton equations'), + ), # Definition_Numerical_Model + ), # b_repr_particle + + ), # Particle_Representation + ), # fin b_component_particle + + ), # System_Component + + #-----------------------------------------------------# + Boundary_Conditions = FACT( statut='f',max = '**', # max = nb de facette de bord + #-----------------------------------------------------# + Type_Of_Boundary_Condition = SIMP( statut='o', typ='TXM', into=['Inlet', 'Outlet', 'Symmetry','Periodic', 'Wall'], position='global'), + b_periodique = BLOC( condition = "Type_Of_Boundary_Condition == 'Periodic'", + Direction = SIMP( statut='o', typ='TXM', into=['X','Y','Z', 'all']), + ), # b_periodique + + b_non_periodique = BLOC( condition = "Type_Of_Boundary_Condition != 'Periodic'", + Boundary_Face = SIMP( statut='o', typ= Elementary_Surface), + Apply_to_Wich_Quantity = SIMP( statut='o', typ='TXM', into=['Mass FLux', 'Velocity', 'Temperature']), + Formulation_of_Boundary= SIMP( statut='o', typ='TXM', into=['Dirichlet','Neumann']), + b_Formulation_of_Boundary_dirichlet = BLOC( condition = 'Formulation_of_Boundary == "Dirichlet"', + Value = SIMP ( statut='o', typ='R'), + ), + ), # b_non_periodique + ), # Boundary_Conditions + + #-----------------------------------------------------# + Initials_Conditions = FACT( statut='f', max='**', # 1 possible par valeur du vecteur d etat + #-----------------------------------------------------# + Applies_To_The_Complete_State_Vector = SIMP( statut='o', typ=bool, position ='global'), + #b_Variable_CI = BLOC( condition = "Applies_To_The_Complete_State_Vector == False ", + # Initial_Condition_For_Each_Variable = FACT( max = "**", statut='o', + Initial_Condition = FACT( statut='o', + b_Variable_CI = BLOC( condition = "Applies_To_The_Complete_State_Vector == False ", + State_Vector_Variable = SIMP( statut='o', typ='TXM'), + ), # b_Variable + Type_Initials_Conditions = SIMP( statut='o', typ='TXM', into=['Initial distribution of the state vector', 'Initial values of the state vector variables'], position='global'), + b_distrib = BLOC( condition = "Type_Initials_Conditions == 'Initial distribution of the state vector'", + State_Vector_Initial_Distribution = SIMP( statut='o', typ='TXM', into=['MaxWell', 'Uniform', 'Auto']), + Injection_Subdomain = SIMP( statut='f', typ='TXM'), + ),# b_distrib + b_initials = BLOC( condition = "Type_Initials_Conditions == 'Initial values of the state vector variables'", + File_Vecteur_Etat_Initial = SIMP( statut='o', typ=('Fichier','All Files (*)'),), + Format_File_Vecteur_Etat_Initial = SIMP( statut='o', typ='TXM', into=['txt', 'a definir avec Eric']), + ),# b_initials + ),# Initial_Condition + # ), # b_Variable + #b_Globale = BLOC( condition = "Applies_To_The_Complete_State_Vector == True ", + # reflechir avec Eric + # Initial_Condition = FACT( statut='o', + # Type_Initials_Conditions = SIMP( statut='o', typ='TXM', into=['Initial distribution of the state vector', 'Initial values of the state vector variables'], position='global'), + # b_distrib = BLOC( condition = "Type_Initials_Conditions == 'Initial distribution of the state vector'", + # State_Vector_Initial_Distribution = SIMP( statut='o', typ='TXM', into=['MaxWell', 'Uniform', 'File']), + # Injection_Subdomain = SIMP( statut='f', typ='TXM'), + # ),# b_distrib + # b_initials = BLOC( condition = "Type_Initials_Conditions == 'Initial values of the state vector variables'", + # File_Vecteur_Etat_Initial= SIMP( statut='o', typ=('Fichier','All Files (*)'),), + # Format_File_Vecteur_Etat_Initial = SIMP( statut='o', typ='TXM', into=['txt', 'a definir avec Eric']), + # ),# b_initials + # ),# Initial_Condition_For_Each_Variable + # ), # b_Globale + ), # Initials_Conditions +) # Study + + + +Run_Option = PROC( nom='Run_Option', + MyStudy = SIMP( statut='o', typ=StudySD ), + Working_Dir = SIMP( statut='f', typ='TXM'), # + Number_Of_Time = SIMP( statut='o', typ='I'), + )# Run_Option + + +# a refaire en reprenant + + # # lennard_jones si MD et groot_warren DPD + # b_MD = BLOC( condition = 'Numerical_Model == "MD"', + # Potential_Type_MD = SIMP( statut='o', typ='TXM', into=['lennard_jones'], defaut='lennard_jones'), + # ), + # b_DPD = BLOC( condition = 'Numerical_Model == "DPD"', + # Potential_Type_DPD = SIMP( statut='o', typ='TXM', into=['groot_warren'], defaut='groot_warren'), + # ), + # b_DPD_and_MD_2 = BLOC( condition = 'Numerical_Model == "DPD" or Numerical_Model == "MD"' , + # Species_Pair_Parameters = FACT( statut='o', max="**", + # Pair_Interaction = SIMP( statut='o', max=2, typ='TXM'), + # b_Parameters_Potential_Type_Groot_Warren = BLOC( condition = "Numerical_Model == 'DPD'", + # Groot_Warren_Repulsion = SIMP( statut='o', typ='R', defaut=25.0, val_min=0), + # Groot_Warren_Cutoff = SIMP( statut='o', typ='R', defaut=1.0, val_min=0), + # ), # b_parameters_potential_type_groot_warren + # b_Parameters_Potential_Type_Lennard_Jones = BLOC( condition = "Numerical_Model == 'MD'", + # Radius = SIMP( statut='o', typ='R', val_min=0), + # Depth_Of_The_Potential_Well = SIMP( statut='o', typ='R', val_min=0), + # ), # b_parameters_potential_type_groot_warren + # ), # species_pair_parameters + # ),# fin b_DPD_and_MD_2 + # b_DPD_Coef = BLOC( condition = 'Numerical_Model == "DPD"' , + # Drag_Coefficient = SIMP( statut='o', typ='R'), # les 2 valent 0 pour MD + # Drag_Force_Cutoff = SIMP( statut='o', typ='R', val_min=0,), + # ), + diff --git a/Vimmp/cata_gromacs.py b/Vimmp/cata_gromacs.py new file mode 100644 index 00000000..4ce90209 --- /dev/null +++ b/Vimmp/cata_gromacs.py @@ -0,0 +1,57 @@ +from cata_Vimmp import * + +CodeSpecific=PROC(nom='CodeSpecific', + Gromacs_Physical_Description = FACT(statut='o', + Constraints = FACT(statut = 'o', + # pour Gromacs, rien = linear + Recalage_Centre_Gravite_Type = SIMP(statut='o', typ ='TXM', into =['Linear', 'Angular', 'Non Activ'], defaut = 'Non Activ'), + b_recalage_cgt = BLOC (condition = "recalage_centre_gravite_type != 'Non Activ'", + Porte_Sur_Tout_Le_Systeme = SIMP ( statut ='o', typ = bool, defaut = True), + b_porte_sur_tout_le_system = BLOC( condition = 'Porte_Sur_Tout_Le_Systeme == False ', + Liste_Des_Groupes = SIMP ( statut ='o', typ = 'TXM', max= '**'), + ), # b_porte_sur_tout_le_system + ),# b_recalage_cgt + ), # Constraints + T_Coupling = SIMP(statut='o', typ ='TXM',into =['Non Activ', 'Berendsen','Nos-Hoover','Andersen','Andersen-Massive','V-Rescale'],position='global', defaut = 'Non Activ'), + b_t_coupling = BLOC(condition = "T_Coupling != 'Non Activ'", + Groups_Separatly_Coupled = SIMP(statut='o', typ = bool, defaut = False), + b_groups_separatly_coupled = BLOC(condition = "Groups_Separatly_Coupled == True", + TC_Group_Param = FACT(statut='o', max ='**', + Name_Of_Group = SIMP(statut='o', typ ='TXM'), + Tau_T = SIMP(statut='o', typ ='R'), + b_tau_t = BLOC(condition = "tau_t != -1", + Ref_T = SIMP(statut='o', typ ='R'), + ), # b_tau_t + ), # tc_group_param + ),#b_groups_separatly_coupled + ), # b_t_coupling + Velocity_Generation = SIMP(statut='o', typ = bool, defaut = False), + b_Velocity_Generation = BLOC(condition = "Velocity_Generation == True", + gen_temp = SIMP(statut='o', typ='R', ang='temperature for Maxwell distribution'), + gen_seed = SIMP(statut='o', typ='R', ang='used to initialize random generator,when -1 a pseudo random seed is used', defaut = -1), + ), + ), # Gromacs_Physical_Description + Gromacs_Numerical_Description = FACT(statut='o', + # cf nb de step modele commun --> a decider + Nb_Of_Steps = SIMP(statut='o', typ ='I', val_min = 1), + b_t_coupling_num = BLOC(condition = "T_Coupling != 'Non Activ'", + Nsttcouple = SIMP(statut ='o', typ='I',), + ), + ), + Gromacs_Neighbor_Searching = FACT(statut = 'o', + Cutoff_Scheme = SIMP(statut='o', typ ='TXM', into = ['verlet','group']), + ), + Gromacs_Run_Options = FACT(statut='o', + Files_Energy_Minimization = FACT(statut='o', + MD_Input_File = SIMP(statut='o', typ = ('Fichier','mdp Files (*.mdp);;All Files (*)')), + Structure_File = SIMP(statut='o', typ = ('Fichier','gro Files (*.gro);;All Files (*)')), + # en entree de grompp et de mdrun option -c + Gromacs_Topology_File = SIMP(statut='o', typ = ('Fichier','Top Files (*.top);;All Files (*)')), + MD_File = SIMP(statut='o', typ = ('FichierNoAbs')), # doit finir par mdp + # le MD_Output_File (-o pour grommp devient le -s de de mdrun) + XDR_Output_File = SIMP(statut='o', typ = ('FichierNoAbs')), # doit finir par tpr + log_File = SIMP(statut='f', defaut ='/tmp/EM.log', typ=('FichierNoAbs')), + ), # Files_Energy_Minimization + ), # Gromacs_Run_Options +) + diff --git a/Vimmp/cata_lbm.py b/Vimmp/cata_lbm.py deleted file mode 100644 index 1510cb0e..00000000 --- a/Vimmp/cata_lbm.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2008-2018 EDF R&D -# -# This file is part of SALOME ADAO module -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -import os, re -import Accas -from Accas import * -from Models.LBM import Physical_Parameters_LBM, Discretization_LBM, Output_Files_LBM - -JdC = JDC_CATA ( code = 'LBM',) - -VERSION_CATALOGUE='V_0' - -LBM_Param = PROC(nom = 'LBM_Param', - Physical_Param=Physical_Parameters_LBM(), - Discretization=Discretization_LBM(), - Output_Files =Output_Files_LBM(), -) -TEXTE_NEW_JDC = 'LBM_Param()' - - diff --git a/Vimmp/cata_lbm_genere.xsd b/Vimmp/cata_lbm_genere.xsd deleted file mode 100644 index 8e171acc..00000000 --- a/Vimmp/cata_lbm_genere.xsd +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Vimmp/cata_vimmp.py b/Vimmp/cata_vimmp.py deleted file mode 100644 index 6e732fc5..00000000 --- a/Vimmp/cata_vimmp.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) 2008-2018 EDF R&D -# -# This file is part of SALOME ADAO module -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -import os, re -import Accas -from Accas import * -from Models.LBM import Physical_Parameters_LBM, Discretization_LBM, Output_Files_LBM - -JdC = JDC_CATA ( code = 'Map2',) - -VERSION_CATALOGUE='V_0' - -def getCfdInstance(): - return ('Code_Saturne - UoM','OpenFOAM - POLITO', 'LBM' ) - -def getRhInstance(): - return ('TFEM - UniNa','OpenFOAM - IBM-UK') - -def getSurfTensInstance(): - return ('GROMACS - UoM','LAMMPS - ICPF', ) - -def getDPDInstance(): - return ('DPM','DPM1', ) - -case = PROC(nom = 'case', - - usecase = SIMP(statut='o', typ='TXM', into=['Emulsion','Surfactant Mesophases','nano powder dispersion']), - - b_Emulsion = BLOC(condition="usecase == 'Emulsion'", - workflow = SIMP(statut='o', typ='TXM', into=['Dilute emulsion /suspension','Concentrated emulsions']), - b_Dilute_emulsion = BLOC(condition="workflow == 'Dilute emulsion /suspension'", - Dilute_emulsion = FACT( statut = 'o', - cfd = SIMP(statut='o', typ='TXM', into=getCfdInstance()), - # b_lbm = BLOC(condition="cfd=='LBM'", - # Physical_Param_LBM=Physical_Parameters_LBM(), - # Numerical_Param_LBM=Discretization_LBM(), - # Output_Files_LBM =Output_Files_LBM(), - # ), - rh = SIMP(statut='o', typ='TXM', into=getRhInstance()), - surfTens = SIMP(statut='o', typ='TXM', into=getSurfTensInstance()), - ), # FIn Dilute_emulsion - ), - ), -) - -TEXTE_NEW_JDC = 'case()' - - diff --git a/Vimmp/cata_vimmp_genere.xsd b/Vimmp/cata_vimmp_genere.xsd deleted file mode 100644 index 67812860..00000000 --- a/Vimmp/cata_vimmp_genere.xsd +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Vimmp/configuration_Vimmp.py b/Vimmp/configuration_Vimmp.py deleted file mode 100644 index 6a8cc458..00000000 --- a/Vimmp/configuration_Vimmp.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# maConfiguration MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== -""" - Ce module sert pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -from InterfaceQT4 import configuration -import os - - -class CONFIG(configuration.configBase): - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['catalogues','lang'] - self.labels_eficas=['lang','rep_cata','catalogues'] - self.afficheOptionnelVide=True - configuration.configBase.__init__(self,appli,repIni) - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/Vimmp/prefs_Vimmp.py b/Vimmp/prefs_Vimmp.py index 492ad1c9..c4564e08 100644 --- a/Vimmp/prefs_Vimmp.py +++ b/Vimmp/prefs_Vimmp.py @@ -28,7 +28,7 @@ sys.path[:0]=[INSTALLDIR] # lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='fr' +lang='ang' # Codage des strings qui accepte les accents (en remplacement de 'ascii') encoding='iso-8859-1' @@ -36,20 +36,25 @@ encoding='iso-8859-1' # #typeDeCata='XML' catalogues=( -# ('Map2','V2017PY',os.path.join(repIni,'cata_map.py'),'python','python'), -# ('Map2','V2017',os.path.join(repIni,'cata_map.py'),'xml','xml'), - ('Vimmp','LBM',os.path.join(repIni,'cata_lbm.py'),'python','python'), - ('Vimmp','VIMP',os.path.join(repIni,'cata_vimmp.py'),'python','python'), -# ('Map2','V2017',os.path.join(repIni,'cata_bloc.py'),'xml','xml'), -# ('Map2','V2017',os.path.join(repIni,'cata_map_reduit.py'),'python','python'), + ('Vimmp','Vimmp',os.path.join(repIni,'cata_Vimmp.py'),'xml','python'), +# ('VimmpEssai','VimmpEssai',os.path.join(repIni,'cata_Vimmp_2304.py'),'python','python'), +# ('MD','VimmpG',os.path.join(repIni,'cata_gromacs.py'),'python','python'), +# ('VimmpEN','VimmpEN',os.path.join(repIni,'cata_en.py'),'python','python'), ) -#nombreDeBoutonParLigne=4 -simpleClic=True -#closeFrameRechercheCommande=True -boutonDsMenuBar=False +nombreDeBoutonParLigne=4 +#simpleClic=True +closeFrameRechercheCommande=False +closeFrameRechercheCommandeSurPageDesCommandes=True +#boutonDsMenuBar=False #closeArbre=True -afficheListesPliees=False +#afficheListesPliees=False +#afficheCommandesPliees = False +afficheCommandesPliees=True +enleverActionStructures = True +enleverParametres = True +enleverSupprimer = True +#ajoutExecution = True +#translatorFichier = os.path.join(repIni,'Meteo') #withXSD=True -afficheCommandesPliees = False dumpXSD=True #afficheIhm=False diff --git a/Vimmp/qtEficasVimmp.py b/Vimmp/qtEficasVimmp.py index 91140d97..38a990ba 100755 --- a/Vimmp/qtEficasVimmp.py +++ b/Vimmp/qtEficasVimmp.py @@ -19,7 +19,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # """ - Ce module sert a lancer EFICAS configure pour MAP + Ce module sert a lancer EFICAS configure pour Meteo """ # Modules Python # Modules Eficas @@ -28,10 +28,8 @@ name='prefs_'+prefs.code __import__(name) import sys -reload(sys) -sys.setdefaultencoding('latin1') import os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../..')) import prefs from InterfaceQT4 import eficas_go