18 lines
562 B
Python
18 lines
562 B
Python
import argparse
|
|
from pathlib import Path
|
|
|
|
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=Path, default='config.ini',
|
|
help='Configuration file (default config.ini)')
|
|
parser.add_argument('-l', '--log-level', default='INFO', type=str,
|
|
help='Log level')
|
|
|
|
args = parser.parse_args()
|
|
|
|
if args.var == 'alpha.water':
|
|
from . import alpha_water
|
|
alpha_water.animate(args.config, args.log_level)
|