Пример #1
0
def directory_Request(FilePath, dirReq):
    if dirReq == 0:
        Folder_Path = Parameters.path_check(
            FilePath.folder_path,
            "\nStore simulation files to %s?\nA) Yes, use/create the folder and save to it \nB) No, I want to specify a different folder directory \nC) No, I want to cancel this process\nPick an answer of A, B, or C: ",
            0)
        FilePath.newFolderPath(Folder_Path)
Пример #2
0
def main(files, geo, dyn, axs=2, x=2, CollectData=False):
    """Runs simulation from reading in input form to processing end data"""

    if len(os.listdir(files.folder_path)) == 0:
        Folder_Path = Parameters.path_check(
            files.folder_path,
            "\nStore simulation files to %s?\nA) Yes, use/create the folder and save to it \nB) No, I want to specify a different folder directory \nC) No, I want to cancel this process\nPick an answer of A, B, or C: ",
            0)
        files.newFolderPath(Folder_Path)

        ## Generate Journal Files
        talkToAnsys.generateMesh_wbjn(files, geo, 1)
        talkToAnsys.generateFluent_wbjn(files, dyn, 1)

        if hasattr(files, 'WB_path'):
            talkToAnsys.run_wbjn(files.WB_path, files.wbjnMesh_path, '-B')
            yesNo(
                "Project with Mesh file has been generated. Begin simulation? (This will take a long time)"
            )
            ## Generate C File
            files = CFile_Generation.genCFile(files, geo, dyn)
            talkToAnsys.run_wbjn(files.WB_path, files.wbjnFluent_path, '-B')