Esempio n. 1
0
 def settingsElmerMesh(self, meshList, pathCase=None, elmerMeshName=''):
     pathCase = self.priorityPath2(pathCase)
     os.chdir(pathCase)
     print(os.getcwd())
     self.elmerMeshName = elmerMeshName
     for keys in meshList:
         changeVariablesFunV2(keys, meshList[keys], nameFile=f'{self.elmerMeshName}.geo')
Esempio n. 2
0
    def setTimeVaryingMappedFixedValue(self, pathCase=None):
        "Устанавливает значения для ГУ TimeVaryingMappedFixedValue"
        path = self.priorityPath(pathCase)
        os.chdir(path)

        for var in self.dicTVMF:
            changeVariablesFunV2(var, self.dicTVMF[var], nameFile='U')
Esempio n. 3
0
    def setElmerVar(self, *elmerDictioaries, pathCase=None, sifName=None):

        path = self.priorityPath(pathCase)
        sifName = self.prioritysifFile(sifName)
        os.chdir(path)
        for list in elmerDictioaries:
            for var in list:
                changeVariablesFunV2(var, list[var], nameFile=sifName)
Esempio n. 4
0
    def setAnyFiles(self, *listsVar, files=['controlDict'], pathCase=None):
        """The function serves to set *list of variables at controlDict for case with path of pathNewCase"""

        path = self.priorityPath(pathCase)
        os.chdir(path)
        for file in files:
            for spisok_var in listsVar:
                for var in spisok_var:
                    changeVariablesFunV2(var, spisok_var[var], nameFile=file)
Esempio n. 5
0
 def setfvSolution(self, *listsfvSolution, pathCase=None):
     """The function serves to set *list of variables at controlDict for case with path of pathNewCase"""
     path = self.priorityPath(pathCase)
     os.chdir(path)
     for spisok_var in listsfvSolution:
         for var in spisok_var:
             changeVariablesFunV2(var,
                                  spisok_var[var],
                                  nameFile='fvSolution')
Esempio n. 6
0
 def setDecomposeParDict(self,
                         coreOF=None,
                         nameVar='core_OF',
                         pathCase=None):
     """The function serves to set *list of variables at controlDict for case with path of pathNewCase"""
     path = os.path.join(self.priorityPath(pathCase), 'system')
     coreOF = self.prioritCores(coreOF)
     os.chdir(path)
     print(os.getcwd())
     changeVariablesFunV2(nameVar, coreOF, nameFile='decomposeParDict')
Esempio n. 7
0
    def setBlockMesh(self, meshList, pathCase=None):
        """The fucntion sets given variables to blockMeshDict file
        meshList is the dictionary with variables and name of the variables, which will be set at blockMeshDict file
        """
        pathCase = self.priorityPath(pathCase)
        os.chdir(pathCase)
        for keys in meshList:
            changeVariablesFunV2(keys, meshList[keys], nameFile='blockMeshDict')

        print('The file blockMesh is set!')
Esempio n. 8
0
    def setVarAllFiels(self, *varDict, pathCase=None):

        dictionary = self.priorityDictionary(varDict)
        path = self.priorityPath(pathCase)
        fileList = os.listdir(self.path)
        os.chdir(path)
        for file in fileList:
            for list in dictionary:
                for var in list:
                    changeVariablesFunV2(var, list[var], nameFile=file)
Esempio n. 9
0
    def setVar(self, *varDict, nameFiels=['U', 'k'], pathCase=None):
        """Устанавливает значение перенных из словарей *varDict в файлах из списка nameFiels
        в кейсе pathCase"""
        dictionary = self.priorityDictionary(varDict)
        path = self.priorityPath(pathCase)

        os.chdir(path)
        for file in nameFiels:
            for list in dictionary:
                for var in list:
                    changeVariablesFunV2(var, list[var], nameFile=file)