Beispiel #1
0
def main(args, curr_dir):
    np.set_printoptions(precision=5, threshold=np.inf)
    logger.set_up_pyrklog(args.logfile)
    infile = load_infile(args.infile)
    out_db = database.Database(filepath=args.outfile)
    if not hasattr(infile, 'n_ref'):
        n_ref = 0
    else:
        n_ref = infile.n_ref
    si = sim_info.SimInfo(timer=infile.ti,
                          components=infile.components,
                          iso=infile.fission_iso,
                          e=infile.spectrum,
                          n_precursors=infile.n_pg,
                          n_decay=infile.n_dg,
                          n_fic=n_ref,
                          kappa=infile.kappa,
                          feedback=infile.feedback,
                          rho_ext=infile.rho_ext,
                          plotdir=args.plotdir,
                          infile=args.infile,
                          db=out_db)
    # TODO: think about weather to add n_ref to all input files, or put n_ref in
    # database files
    print_logo(curr_dir)
    sol = solve(si=si, y=si.y, infile=infile)
    log_results(si)
    out_db.close_db()
    pyrklog.critical("\nSimulation succeeded.\n")
Beispiel #2
0
def main(args, curr_dir):
    np.set_printoptions(precision=5, threshold=np.inf)
    logger.set_up_pyrklog(args.logfile)
    infile = load_infile(args.infile)
    out_db = database.Database(filepath=args.outfile)
    if not hasattr(infile, 'n_ref'):
        n_ref = 0
    else:
        n_ref = infile.n_ref
    si = sim_info.SimInfo(timer=infile.ti,
                          components=infile.components,
                          iso=infile.fission_iso,
                          e=infile.spectrum,
                          n_precursors=infile.n_pg,
                          n_decay=infile.n_dg,
                          n_fic=n_ref,
                          kappa=infile.kappa,
                          feedback=infile.feedback,
                          rho_ext=infile.rho_ext,
                          plotdir=args.plotdir,
                          infile=args.infile,
                          db=out_db)
    # TODO: think about weather to add n_ref to all input files, or put n_ref in
    # database files
    print_logo(curr_dir)
    sol = solve(si=si, y=si.y, infile=infile)
    log_results(si)
    out_db.close_db()
    pyrklog.critical("\nSimulation succeeded.\n")
Beispiel #3
0
def main(args, curr_dir):
    np.set_printoptions(precision=5, threshold=np.inf)
    logger.set_up_pyrklog(args.logfile)
    infile = importlib.import_module(args.infile)

    si = sim_info.SimInfo(timer=infile.ti,
                          components=infile.components,
                          iso=infile.fission_iso,
                          e=infile.spectrum,
                          n_precursors=infile.n_pg,
                          n_decay=infile.n_dg,
                          kappa=infile.kappa,
                          feedback=infile.feedback,
                          rho_ext=infile.rho_ext,
                          plotdir=args.plotdir)
    print_logo(curr_dir)
    sol = solve(si=si, y=si.y, infile=infile)
    log_results(si)
    plotter.plot(sol, si)
    pyrklog.critical("\nSimulation succeeded.\n")