Beispiel #1
0
parser.add_argument('-o',
                    '--output',
                    type=str,
                    help='Output mesh (default=out.msh)',
                    default='out.msh')
parser.add_argument('--iteration',
                    type=int,
                    help='iteration to process (default=latest)')
args = parser.parse_args()

from pydcm import restart, save, log

if args.iteration:
    iteration = args.iteration
else:
    iteration = 'current'

sim = restart(args.case, iteration=iteration)

log("Loaded simulation " + sim.name)
log("  iteration: " + str(sim.iteration))
log("  time:      " + str(sim.time))

if args.fields:
    log("Computing fields")
    for field in args.fields:
        log("  " + field)
    sim.postprocessing()

sim.write_mesh(args.output, args.fields)
Beispiel #2
0
parser.add_argument('--save', type=int, help='Save solution every SAVE iterations (default=1000)', default=1000)
parser.add_argument('-o', '--order', type=int, help='Change the order of simulation')
parser.add_argument('--cfl', type=int, help='Change the CFL number gradually to this number')
parser.add_argument('--statistics',help='Start averaging turbulence statistics from zero', action='store_true')
args = parser.parse_args()


from pydcm import restart, save, log

if args.iteration:
    iteration = args.iteration
else:
    iteration = 'current'

sim = restart(args.case,iteration=iteration)
log("Loaded simulation "+sim.name)
log("  iteration: "+str(sim.iteration))
log("  time:      "+str(sim.time))

sim.print_constants()

if args.order:
    sim.create_space_discretization( order=args.order )

if args.cfl:
    sim.set_cfl('if(cfl<=0,1,min('+str(args.cfl)+',cfl*1.01))')

if args.statistics:
    sim.turb_stats_count = 0
    sim.set_post_iteration()
Beispiel #3
0
"""
Read DCM case, post-process, and output mesh.
Must be invoked through mpirun, and restarted with same number of tasks as before
""")
parser.add_argument('case',  type=str, help='DCM case')
parser.add_argument('-f', '--fields', type=str, nargs='+', help='space-separated list of field names (default=solution)')
parser.add_argument('-o', '--output', type=str, help='Output mesh (default=out.msh)', default='out.msh')
parser.add_argument('--iteration',    type=int, help='iteration to process (default=latest)')
args = parser.parse_args()

from pydcm import restart, save, log

if args.iteration:
    iteration = args.iteration
else:
    iteration = 'current'

sim = restart(args.case,iteration=iteration)

log("Loaded simulation "+sim.name)
log("  iteration: "+str(sim.iteration))
log("  time:      "+str(sim.time))

if args.fields:
    log("Computing fields")
    for field in args.fields:
        log("  "+field)
    sim.postprocessing()

sim.write_mesh(args.output,args.fields)