18 lines
436 B
Python
18 lines
436 B
Python
|
import argparse
|
||
|
|
||
|
parser = argparse.ArgumentParser(
|
||
|
description='Animate the results from OpenFoam'
|
||
|
)
|
||
|
parser.add_argument('var', type=str,
|
||
|
help='OpenFoam variable to display')
|
||
|
parser.add_argument('-c', '--config', type=str,
|
||
|
help='Configuration file')
|
||
|
|
||
|
args = parser.parse_args()
|
||
|
if args.config == None:
|
||
|
args.config = 'config.ini'
|
||
|
|
||
|
if args.var == 'alpha.water':
|
||
|
import alpha_water
|
||
|
alpha_water.animate(args.config)
|