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

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)