]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
version Vimmp pour demo Bremen
authorpascale.noyret <pascale.noyret@edf.fr>
Thu, 4 Oct 2018 16:41:30 +0000 (18:41 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Thu, 4 Oct 2018 16:41:30 +0000 (18:41 +0200)
17 files changed:
Vimmp/LBM/LBM2MED.py [new file with mode: 0644]
Vimmp/LBM/Mesh_res_LBM.med [new file with mode: 0644]
Vimmp/LBM/run_LBM2MED [new file with mode: 0644]
Vimmp/LBM/scheme_LBM2MED.xml [new file with mode: 0644]
Vimmp/Models/CFD.py [new file with mode: 0644]
Vimmp/Models/DPM.py [new file with mode: 0644]
Vimmp/Models/LBM.py [new file with mode: 0644]
Vimmp/Models/OtherCFD.py [new file with mode: 0644]
Vimmp/Models/__init__.py [new file with mode: 0644]
Vimmp/cata_lbm.py [new file with mode: 0644]
Vimmp/cata_lbm_genere.xsd [new file with mode: 0644]
Vimmp/cata_vimmp.py [new file with mode: 0644]
Vimmp/cata_vimmp_genere.xsd [new file with mode: 0644]
Vimmp/configuration_Vimmp.py [new file with mode: 0644]
Vimmp/prefs.py [new file with mode: 0644]
Vimmp/prefs_Vimmp.py [new file with mode: 0644]
Vimmp/qtEficasVimmp.py [new file with mode: 0755]

diff --git a/Vimmp/LBM/LBM2MED.py b/Vimmp/LBM/LBM2MED.py
new file mode 100644 (file)
index 0000000..eba1696
--- /dev/null
@@ -0,0 +1,80 @@
+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)
diff --git a/Vimmp/LBM/Mesh_res_LBM.med b/Vimmp/LBM/Mesh_res_LBM.med
new file mode 100644 (file)
index 0000000..e9b5a50
Binary files /dev/null and b/Vimmp/LBM/Mesh_res_LBM.med differ
diff --git a/Vimmp/LBM/run_LBM2MED b/Vimmp/LBM/run_LBM2MED
new file mode 100644 (file)
index 0000000..5fd0b24
--- /dev/null
@@ -0,0 +1 @@
+~/salome/appli_V8_5_0/salome --shutdown-servers=1 -t script_launch_LBM2MED.py
diff --git a/Vimmp/LBM/scheme_LBM2MED.xml b/Vimmp/LBM/scheme_LBM2MED.xml
new file mode 100644 (file)
index 0000000..b771f40
--- /dev/null
@@ -0,0 +1,69 @@
+<?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>
diff --git a/Vimmp/Models/CFD.py b/Vimmp/Models/CFD.py
new file mode 100644 (file)
index 0000000..8c4ea09
--- /dev/null
@@ -0,0 +1,48 @@
+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
new file mode 100644 (file)
index 0000000..5c5c0ae
--- /dev/null
@@ -0,0 +1,8 @@
+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
new file mode 100644 (file)
index 0000000..6371f9a
--- /dev/null
@@ -0,0 +1,47 @@
+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
new file mode 100644 (file)
index 0000000..6301f5a
--- /dev/null
@@ -0,0 +1,55 @@
+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
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Vimmp/cata_lbm.py b/Vimmp/cata_lbm.py
new file mode 100644 (file)
index 0000000..1510cb0
--- /dev/null
@@ -0,0 +1,36 @@
+# 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
new file mode 100644 (file)
index 0000000..8e171ac
--- /dev/null
@@ -0,0 +1,106 @@
+<?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>
diff --git a/Vimmp/cata_vimmp.py b/Vimmp/cata_vimmp.py
new file mode 100644 (file)
index 0000000..6e732fc
--- /dev/null
@@ -0,0 +1,64 @@
+# 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
new file mode 100644 (file)
index 0000000..6781286
--- /dev/null
@@ -0,0 +1,64 @@
+<?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>
diff --git a/Vimmp/configuration_Vimmp.py b/Vimmp/configuration_Vimmp.py
new file mode 100644 (file)
index 0000000..6a8cc45
--- /dev/null
@@ -0,0 +1,43 @@
+# -*- 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
diff --git a/Vimmp/prefs.py b/Vimmp/prefs.py
new file mode 100644 (file)
index 0000000..8567802
--- /dev/null
@@ -0,0 +1,22 @@
+# Copyright (C) 2007-2012   EDF R&D
+#
+# 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
+#
+code="Vimmp" 
+import sys, os
+if os.path.dirname(os.path.abspath(__file__)) not in sys.path :
+   sys.path.insert(0,os.path.dirname(os.path.abspath(__file__)))
diff --git a/Vimmp/prefs_Vimmp.py b/Vimmp/prefs_Vimmp.py
new file mode 100644 (file)
index 0000000..492ad1c
--- /dev/null
@@ -0,0 +1,55 @@
+# -*- 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.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='fr'
+
+# 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'),
+)
+#nombreDeBoutonParLigne=4
+simpleClic=True
+#closeFrameRechercheCommande=True
+boutonDsMenuBar=False
+#closeArbre=True
+afficheListesPliees=False
+#withXSD=True
+afficheCommandesPliees = False
+dumpXSD=True
+#afficheIhm=False
diff --git a/Vimmp/qtEficasVimmp.py b/Vimmp/qtEficasVimmp.py
new file mode 100755 (executable)
index 0000000..91140d9
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013   EDF R&D
+#
+# 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
+#
+"""
+   Ce module sert a lancer EFICAS configure pour MAP 
+"""
+# Modules Python
+# Modules Eficas
+import prefs
+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__)),'..'))
+
+import prefs
+from InterfaceQT4 import eficas_go
+eficas_go.lanceEficas(code=prefs.code)