Datasets:
ArXiv:
License:
File size: 589 Bytes
65bb44d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import json
from pathlib import Path
def rename(path):
data = json.load(open(path, "r"))
data["vel_in"] = data["velocity"]
del data["velocity"]
del data["height"]
json.dump(data, open(path, "w"))
dirs = ["prop", "bc", "geo"]
for d in dirs:
case_dirs = sorted(Path(f"data/dam/{d}").iterdir())
for case_dir in case_dirs:
if not case_dir.is_dir():
continue
case_param_path = case_dir / "case_params.json"
assert case_param_path.exists()
case_params = json.load(open(case_param_path, "r"))
print(case_params)
|