示例#1
0
 def CritRe2(self,para):
     for i in self.ReList:
         para[6]=str(self.alpha)+'-'+str(self.Sval)+'-'+str(self.beta)+'-'+str(int(i))+'-.mdl';
         para[3]=i;
         para[5]=self.beta;
         funcs.simPara(os.getcwd(),self.FileList[1],para);
         funcs.incSolver(self.exe,self.FileList[:-1]);
示例#2
0
 def CritRe(self):
     for i in self.ReList:
         if not os.path.exists(str(i)):
             os.makedirs(str(i));
         os.chdir(str(i));
         funcs.CopyFileVal(self.FilePath,os.getcwd(),self.FileList,str(i),self.beta);
         funcs.incSolver(self.exe,self.FileList[:-1]);
         os.chdir(self.RePath);
示例#3
0
文件: manySim.py 项目: niyaa/paper
 def CritRe(self):
     for i in self.ReList:
         if not os.path.exists(str(i)):
             os.makedirs(str(i))
         os.chdir(str(i))
         funcs.CopyFileVal(self.FilePath, os.getcwd(), self.FileList,
                           str(i), self.beta)
         funcs.incSolver(self.exe, self.FileList[:-1])
         os.chdir(self.RePath)
示例#4
0
 def CritRe2(self,para):
     for i in self.ReList:
         para[6]=str(self.alpha)+'-'+str(self.Sval)+'-'+str(self.beta)+'-'+str(i)+'-.mdl';
         para[3]=i;
         para[5]=self.beta;
         funcs.simPara(os.getcwd(),self.FileList[1],para);
         funcs.incSolver(self.exe,self.FileList[:-1]);
         fileName=str(self.alpha)+'-'+str(self.Sval)+'-'+str(self.beta)+'-'+str(i)+'-'+'.his';
         arg='mv TimeValues.his '+fileName;
示例#5
0
 def CritRe2(self, para):
     for i in self.ReList:
         para[6] = str(self.alpha) + '-' + str(self.Sval) + '-' + str(
             self.beta) + '-' + str(i) + '-.mdl'
         para[3] = i
         para[5] = self.beta
         funcs.simPara(os.getcwd(), self.FileList[1], para)
         fileName = str(self.alpha) + '-' + str(self.Sval) + '-' + str(
             self.beta) + '-' + str(i) + '-' + '.his'
         funcs.HiFileCh(os.getcwd(), self.FileList[1], fileName)
         funcs.incSolver(self.exe, self.FileList[:-1])
示例#6
0
文件: manySim3.py 项目: niyaa/paper
 def CritRe2(self, para):
     for i in self.ReList:
         para[6] = str(self.alpha) + '-' + str(self.Sval) + '-' + str(
             self.beta) + '-' + str(i) + '-.mdl'
         para[3] = i
         para[5] = self.beta
         funcs.simPara(os.getcwd(), self.FileList[1], para)
         funcs.incSolver(self.exe, self.FileList[:-1])
         fileName = str(self.alpha) + '-' + str(self.Sval) + '-' + str(
             self.beta) + '-' + str(i) + '-' + '.his'
         arg = 'mv TimeValues.his ' + fileName
         subprocess.call(arg, shell=True)
示例#7
0
 def IncModFreFile(self,para):
     for i in self.ReList:
         para[6]=str(self.alpha)+'-'+str(self.Sval)+'-'+str(self.beta)+'-'+str(int(i))+'-.mdl';
         para[3]=i;
         para[5]=self.beta;
         funcs.simPara(os.getcwd(),self.FileList[1],para);
         funcs.incSolver(self.exe,self.FileList[:-1]);
         fileName=str(self.alpha)+'-'+str(self.Sval)+'-'+str(self.beta)+'-'+str(int(i))+'-'+'.his';
         arg='mv TimeValues.his '+fileName;
         subprocess.call(arg,shell=True);
     
         filelist=['geom.xml','bd.xml','geomHplusD.fld'];
         #ipVar.incSolverHypS(filelist);
         #ipVar.incSolverHyp(1,4,filelist);
         ipVar.incSolver('~/.sg',filelist);
示例#8
0
            os.getcwd() + '/b')
os.chdir(simPath + '/b')
filelist = ['geom.xml', 'base.xml']
#funcs.incSolver(exe,filelist);

os.chdir(simPath)
if not os.path.exists(os.getcwd() + '/d'):
    os.mkdir('d')

shutil.copy(rootPath + '/dist.xml',
            os.getcwd() + '/d')
shutil.copy(simPath + '/geom.xml',
            os.getcwd() + '/d')
os.chdir(simPath + '/d')
filelist = ['geom.xml', 'dist.xml']
funcs.incSolver(exe, filelist)
os.chdir(simPath)

if not os.path.exists(os.getcwd() + '/bd'):
    os.mkdir('bd')
shutil.copy(rootPath + '/bd.xml',
            os.getcwd() + '/bd')
shutil.copy(simPath + '/geom.xml', os.getcwd() + '/bd')
shutil.copy((simPath + '/b/geom_10.chk'), (os.getcwd() + '/bd'))
shutil.copy((simPath + '/d/geom_0.chk'), (os.getcwd() + '/bd'))

os.chdir(simPath + '/bd')
subprocess.call("mv geom_10.chk geom3D.bse", shell=True)
subprocess.call("mv geom_0.chk geom3D-dist.bse", shell=True)
subprocess.call(
    "~/nekNewton/dist/bin/FldAddFld 1 1e-9 geom3D.bse geom3D-dist.bse geomBplusD.fld ",
示例#9
0
文件: baseflow.py 项目: niyaa/paper
shutil.copy(rootPath+'/base.xml',os.getcwd()+'/b'); 
shutil.copy(simPath+'/geom.xml',os.getcwd()+'/b');
os.chdir(simPath+'/b');
filelist=['geom.xml','base.xml']; 
#funcs.incSolver(exe,filelist);

        
os.chdir(simPath);    
if not os.path.exists(os.getcwd()+'/d'):
    os.mkdir('d');

shutil.copy(rootPath+'/dist.xml',os.getcwd()+'/d'); 
shutil.copy(simPath+'/geom.xml',os.getcwd()+'/d');
os.chdir(simPath+'/d');
filelist=['geom.xml','dist.xml']; 
funcs.incSolver(exe,filelist);
os.chdir(simPath); 

if not os.path.exists(os.getcwd()+'/bd'):
    os.mkdir('bd');
shutil.copy(rootPath+'/bd.xml',os.getcwd()+'/bd'); 
shutil.copy(simPath+'/geom.xml',os.getcwd()+'/bd')
shutil.copy((simPath+'/b/geom_10.chk'),(os.getcwd()+'/bd'));
shutil.copy((simPath+'/d/geom_0.chk'),(os.getcwd()+'/bd'));
        
os.chdir(simPath+'/bd');
subprocess.call("mv geom_10.chk geom3D.bse",shell=True);
subprocess.call("mv geom_0.chk geom3D-dist.bse",shell=True);        
subprocess.call("~/nekNewton/dist/bin/FldAddFld 1 1e-9 geom3D.bse geom3D-dist.bse geomBplusD.fld ",shell=True);
fileList=['geom.xml','bd.xml'];
funcs.first(os.getcwd(),exe,fileList,1e-29,700,1200,1000)