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')
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')
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)
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)
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')
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')
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!')
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)
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)