+++ /dev/null
-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<r**2, (nx,ny))
- vel = fromfunction(lambda d,x,y: (1-d)*uLB*(1.0+1e-4*sin(y/ly*2*pi)),(2,nx,ny))
- feq = equilibrium(1.0,vel); fin = feq.copy()
-
-###### Main time loop ##########################################################
- for time in range(maxIter):
- fin[i1,-1,:] = fin[i1,-2,:] # Right wall: outflow condition.
- rho = sumpop(fin) # Calculate macroscopic density and velocity.
- u = dot(c.transpose(), fin.transpose((1,0,2)))/rho
-
- u[:,0,:] =vel[:,0,:] # Left wall: compute density from known populations.
- rho[0,:] = 1./(1.-u[0,0,:]) * (sumpop(fin[i2,0,:])+2.*sumpop(fin[i1,0,:]))
-
- feq = equilibrium(rho,u) # Left wall: Zou/He boundary condition.
- fin[i3,0,:] = fin[i1,0,:] + feq[i3,0,:] - fin[i1,0,:]
- fout = fin - omega * (fin - feq) # Collision step.
- for i in range(q): fout[i,obstacle] = fin[noslip[i],obstacle]
- for i in range(q): # Streaming step.
- fin[i,:,:] = roll(roll(fout[i,:,:],c[i,0],axis=0),c[i,1],axis=1)
-
- if (time==(maxIter-1)): # Visualization
- X = [0.]; Y = [0.]; U = []; V = []
- for xc in range(nx):
- X.append(1.0*(xc+1))
- for yc in range(ny):
- Y.append(1.0*(yc+1))
- for xc in range(nx):
- U.append(u[0,xc,yc]); V.append(u[1,xc,yc])
-
- CoordX = mc.DataArrayDouble(X); CoordY = mc.DataArrayDouble(Y)
- CompU = mc.DataArrayDouble(U); CompV = mc.DataArrayDouble(V)
-
- Mesh1 = mc.MEDCouplingCMesh("Mesh_LBM")
- Mesh1.setCoords(CoordX,CoordY)
-
- FieldU = mc.MEDCouplingFieldDouble(mc.ON_CELLS)
- FieldU.setMesh(Mesh1)
- FieldU.setArray(CompU)
- FieldU.setName("U")
- FieldV = mc.MEDCouplingFieldDouble(mc.ON_CELLS)
- FieldV.setMesh(Mesh1)
- FieldV.setArray(CompV)
- FieldV.setName("V")
- file_mesh = "/home/D57673/work/LBM/Code_Python/YACS_fct/Mesh_res_LBM.med"
- ml.WriteMesh(file_mesh, Mesh1, True)
- ml.WriteFieldUsingAlreadyWrittenMesh(file_mesh, FieldU)
- ml.WriteFieldUsingAlreadyWrittenMesh(file_mesh, FieldV)
+++ /dev/null
-~/salome/appli_V8_5_0/salome --shutdown-servers=1 -t script_launch_LBM2MED.py
+++ /dev/null
-<?xml version='1.0' encoding='iso-8859-1' ?>
-<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
- <type name="string" kind="string"/>
- <struct name="Engines/dataref">
- <member name="ref" type="string"/>
- </struct>
- <type name="bool" kind="bool"/>
- <sequence name="boolvec" content="bool"/>
- <type name="double" kind="double"/>
- <sequence name="dblevec" content="double"/>
- <objref name="file" id="file"/>
- <type name="int" kind="int"/>
- <sequence name="intvec" content="int"/>
- <struct name="stringpair">
- <member name="name" type="string"/>
- <member name="value" type="string"/>
- </struct>
- <sequence name="propvec" content="stringpair"/>
- <objref name="pyobj" id="python:obj:1.0"/>
- <sequence name="seqboolvec" content="boolvec"/>
- <sequence name="seqdblevec" content="dblevec"/>
- <sequence name="seqintvec" content="intvec"/>
- <sequence name="seqpyobj" content="pyobj"/>
- <sequence name="stringvec" content="string"/>
- <sequence name="seqstringvec" content="stringvec"/>
- <container name="DefaultContainer">
- <property name="container_kind" value="Salome"/>
- <property name="attached_on_cloning" value="0"/>
- <property name="container_name" value="FactoryServer"/>
- <property name="name" value="localhost"/>
- </container>
- <inline name="PyScript0">
- <script><code><![CDATA[import LBM2MED
-LBM2MED.run_LBM(maxIter,nx,ny)
-]]></code></script>
- <load container="DefaultContainer"/>
- <inport name="maxIter" type="int"/>
- <inport name="nx" type="int"/>
- <inport name="ny" type="int"/>
- </inline>
- <datanode name="DataIn1">
- <parameter name="maxIter" type="int">
- <value><int>100000</int></value>
- </parameter>
- <parameter name="nx" type="int">
- <value><int>260</int></value>
- </parameter>
- <parameter name="ny" type="int">
- <value><int>90</int></value>
- </parameter>
- </datanode>
- <control> <fromnode>DataIn1</fromnode> <tonode>PyScript0</tonode> </control>
- <datalink control="false">
- <fromnode>DataIn1</fromnode> <fromport>maxIter</fromport>
- <tonode>PyScript0</tonode> <toport>maxIter</toport>
- </datalink>
- <datalink control="false">
- <fromnode>DataIn1</fromnode> <fromport>nx</fromport>
- <tonode>PyScript0</tonode> <toport>nx</toport>
- </datalink>
- <datalink control="false">
- <fromnode>DataIn1</fromnode> <fromport>ny</fromport>
- <tonode>PyScript0</tonode> <toport>ny</toport>
- </datalink>
- <presentation name="PyScript0" x="313" y="42" width="158" height="117" expanded="1" expx="313" expy="42" expWidth="158" expHeight="117" shownState="0"/>
- <presentation name="DataIn1" x="14" y="43" width="158" height="117" expanded="1" expx="14" expy="43" expWidth="158" expHeight="117" shownState="0"/>
- <presentation name="__ROOT__" x="0" y="0" width="475" height="164" expanded="1" expx="0" expy="0" expWidth="475" expHeight="164" shownState="0"/>
-</proc>
+++ /dev/null
-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",
- ),
- ),
-
- )
-
+++ /dev/null
-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),
- )
+++ /dev/null
-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",
- ),
- ),
-
- )
-
+++ /dev/null
-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",
- ),
- ),
-
- )
-
--- /dev/null
+# 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,),
+ # ),
+
--- /dev/null
+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
+)
+
+++ /dev/null
-# 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()'
-
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:LBM="http://chercheurs.edf.com/logiciels/LBM" targetNamespace="http://chercheurs.edf.com/logiciels/LBM" elementFormDefault="qualified" attributeFormDefault="qualified" >
- <simpleType name="T_rho">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_Rheo_Type">
- <restriction base="string">
- <enumeration value="Newtonian"/>
- <enumeration value="Carreau-Yasuda"/>
- </restriction>
- </simpleType>
- <simpleType name="T_Visc0">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_ViscInf">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_Tau">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_n">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_a">
- <restriction base="float"/>
- </simpleType>
- <simpleType name="T_nx">
- <restriction base="int"/>
- </simpleType>
- <simpleType name="T_ny">
- <restriction base="int"/>
- </simpleType>
- <simpleType name="T_max_iter">
- <restriction base="int"/>
- </simpleType>
- <simpleType name="T_File_Format">
- <restriction base="string">
- <enumeration value="Med"/>
- <enumeration value="Other"/>
- </restriction>
- </simpleType>
- <simpleType name="T_File_Name">
- <restriction base="string"/>
- </simpleType>
- <simpleType name="T_File_name">
- <restriction base="string"/>
- </simpleType>
- <group name="T_Rheo_Newt">
- <sequence>
- <element name="Visc0" type="LBM:T_Visc0" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </group>
- <group name="T_Rheo_Visco">
- <sequence>
- <element name="Visc0" type="LBM:T_Visc0" minOccurs="1" maxOccurs="1"/>
- <element name="ViscInf" type="LBM:T_ViscInf" minOccurs="1" maxOccurs="1"/>
- <element name="Tau" type="LBM:T_Tau" minOccurs="1" maxOccurs="1"/>
- <element name="n" type="LBM:T_n" minOccurs="1" maxOccurs="1"/>
- <element name="a" type="LBM:T_a" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </group>
- <complexType name="T_Physical_Param" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="rho" type="LBM:T_rho" minOccurs="1" maxOccurs="1"/>
- <element name="Rheo_Type" type="LBM:T_Rheo_Type" minOccurs="1" maxOccurs="1"/>
- <group ref="LBM:T_Rheo_Newt" minOccurs="0" maxOccurs="1"/>
- <group ref="LBM:T_Rheo_Visco" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="T_Discretization" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="nx" type="LBM:T_nx" minOccurs="1" maxOccurs="1"/>
- <element name="ny" type="LBM:T_ny" minOccurs="1" maxOccurs="1"/>
- <element name="max_iter" type="LBM:T_max_iter" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <group name="T_Mesh_Med">
- <sequence>
- <element name="File_Name" type="LBM:T_File_Name" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </group>
- <group name="T_Mesh_Other">
- <sequence>
- <element name="File_name" type="LBM:T_File_name" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </group>
- <complexType name="T_Output_Files" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="File_Format" type="LBM:T_File_Format" minOccurs="1" maxOccurs="1"/>
- <group ref="LBM:T_Mesh_Med" minOccurs="0" maxOccurs="1"/>
- <group ref="LBM:T_Mesh_Other" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="T_LBM_Param" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="Physical_Param" type="LBM:T_Physical_Param" minOccurs="0" maxOccurs="1"/>
- <element name="Discretization" type="LBM:T_Discretization" minOccurs="0" maxOccurs="1"/>
- <element name="Output_Files" type="LBM:T_Output_Files" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="T_LBM">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="LBM_Param" type="LBM:T_LBM_Param" />
- </choice>
- </complexType> <element name="LBM" type="LBM:T_LBM"/>
-</schema>
+++ /dev/null
-# 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()'
-
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:Map2="http://chercheurs.edf.com/logiciels/Map2" targetNamespace="http://chercheurs.edf.com/logiciels/Map2" elementFormDefault="qualified" attributeFormDefault="qualified" >
-<simpleType name="T_usecase">
- <restriction base="string">
- <enumeration value="Emulsion"/>
- <enumeration value="Surfactant Mesophases"/>
- <enumeration value="nano powder dispersion"/>
- </restriction>
- </simpleType>
- <simpleType name="T_workflow">
- <restriction base="string">
- <enumeration value="Dilute emulsion /suspension"/>
- <enumeration value="Concentrated emulsions"/>
- </restriction>
- </simpleType>
- <simpleType name="T_cfd">
- <restriction base="string">
- <enumeration value="Code_Saturne - UoM"/>
- <enumeration value="OpenFOAM - POLITO"/>
- <enumeration value="LBM"/>
- </restriction>
- </simpleType>
- <simpleType name="T_rh">
- <restriction base="string">
- <enumeration value="TFEM - UniNa"/>
- <enumeration value="OpenFOAM - IBM-UK"/>
- </restriction>
- </simpleType>
- <simpleType name="T_surfTens">
- <restriction base="string">
- <enumeration value="GROMACS - UoM"/>
- <enumeration value="LAMMPS - ICPF"/>
- </restriction>
- </simpleType>
- <complexType name="T_Dilute_emulsion" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="cfd" type="Map2:T_cfd" minOccurs="1" maxOccurs="1"/>
- <element name="rh" type="Map2:T_rh" minOccurs="1" maxOccurs="1"/>
- <element name="surfTens" type="Map2:T_surfTens" minOccurs="1" maxOccurs="1"/>
- </sequence>
- </complexType>
- <group name="T_b_Dilute_emulsion">
- <sequence>
- <element name="Dilute_emulsion" type="Map2:T_Dilute_emulsion" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </group>
- <group name="T_b_Emulsion">
- <sequence>
- <element name="workflow" type="Map2:T_workflow" minOccurs="1" maxOccurs="1"/>
- <group ref="Map2:T_b_Dilute_emulsion" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </group>
- <complexType name="T_case" >
- <sequence minOccurs="0" maxOccurs="1">
- <element name="usecase" type="Map2:T_usecase" minOccurs="1" maxOccurs="1"/>
- <group ref="Map2:T_b_Emulsion" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- <complexType name="T_Map2">
- <choice minOccurs="0" maxOccurs="unbounded">
- <element name="case" type="Map2:T_case" />
- </choice>
- </complexType> <element name="Map2" type="Map2:T_Map2"/>
-</schema>
+++ /dev/null
-# -*- coding: utf-8 -*-\r
-# maConfiguration MANAGEMENT OF EDF VERSION\r
-# ======================================================================\r
-# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
-# (AT YOUR OPTION) ANY LATER VERSION.\r
-#\r
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
-#\r
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
-#\r
-#\r
-# ======================================================================\r
-"""\r
- Ce module sert pour charger les paramètres de configuration d'EFICAS\r
-"""\r
-# Modules Python\r
-from InterfaceQT4 import configuration\r
-import os\r
-\r
-\r
-class CONFIG(configuration.configBase):\r
-\r
- #-----------------------------------\r
- def __init__(self,appli,repIni):\r
- #-----------------------------------\r
-\r
- self.labels_user=['catalogues','lang']\r
- self.labels_eficas=['lang','rep_cata','catalogues']\r
- self.afficheOptionnelVide=True\r
- configuration.configBase.__init__(self,appli,repIni)\r
-\r
-\r
-def make_config(appli,rep):\r
- return CONFIG(appli,rep)\r
-\r
# 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'
#
#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
# 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
__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