This repository has been archived on 2022-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
openfoam_project/post_process/animate/__main__.py

19 lines
555 B
Python
Raw Normal View History

2022-01-23 09:38:00 +01:00
import argparse
2022-01-23 15:44:34 +01:00
from pathlib import Path
2022-01-23 09:38:00 +01:00
parser = argparse.ArgumentParser(
description='Animate the results from OpenFoam'
)
parser.add_argument('var', type=str,
help='OpenFoam variable to display')
2022-01-23 14:34:55 +01:00
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')
2022-01-23 09:38:00 +01:00
args = parser.parse_args()
if args.var == 'alpha.water':
import alpha_water
2022-01-23 14:34:55 +01:00
alpha_water.animate(args.config, args.log_level)