def _ecm_general(config_location): wrk = op.Workspace() wrk.clear() config = configparser.ConfigParser() config.read(os.path.join(config_location, 'config.txt')) config.set('OUTPUT', 'save', "True") config.set('OUTPUT', 'plot', "False") I_apps = [config.get('RUN', key) for key in config['RUN'] if 'i_app' in key] for I_app in I_apps: save_path = config_location + '\\' + I_app + 'A' prj, vrs, sols = ecm.run_simulation(float(I_app), save_path, config) plt.close('all') # _teardown(config_location) assert 1 == 1
@author: tom ..............""" import openpnm as op import matplotlib.pyplot as plt import ecm import configparser import os plt.close("all") wrk = op.Workspace() wrk.clear() if __name__ == "__main__": save_root = os.path.join(ecm.FIXTURES_DIR, 'cases') save_root = os.path.join(save_root, 'example_case_B') print(save_root) config = configparser.ConfigParser() config.read(os.path.join(save_root, 'config.txt')) print(ecm.lump_thermal_props(config)) ecm.print_config(config) I_apps = [ config.get('RUN', key) for key in config['RUN'] if 'i_app' in key ] for I_app in I_apps: save_path = save_root + '\\' + I_app + 'A' prj, vrs, sols = ecm.run_simulation(float(I_app), save_path, config)