From 2f1f31d8cd4c3508ba95394e2e27a6de5010dec0 Mon Sep 17 00:00:00 2001 From: Jamil Appa Date: Wed, 4 Oct 2023 17:45:26 +0000 Subject: [PATCH] Add calc moment functions --- zutil/post/__init__.py | 2 ++ zutil/post/post.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/zutil/post/__init__.py b/zutil/post/__init__.py index fe81727..ccbf732 100644 --- a/zutil/post/__init__.py +++ b/zutil/post/__init__.py @@ -20,8 +20,10 @@ from .post import calc_lift_centre_of_action from .post import calc_drag_centre_of_action from .post import get_monitor_data +from .post import calc_moment from .post import calc_force_wall +from .post import calc_moment_wall from .post import cp_profile_wall_from_file from .post import cf_profile_wall_from_file diff --git a/zutil/post/post.py b/zutil/post/post.py index 35a380e..cf81f2a 100644 --- a/zutil/post/post.py +++ b/zutil/post/post.py @@ -169,6 +169,15 @@ def calc_force(surface_data, ignore_zone, half_model=False, filter=None, **kwarg return pforce, fforce +def calc_moment_wall(file_root, ignore_zone, half_model=False, filter=None, **kwargs): + + wall = PVDReader(FileName=file_root + "_wall.pvd") + wall.UpdatePipeline() + + moment = calc_moment(wall, ignore_zone, half_model, filter, **kwargs) + Delete(wall) + del wall + return moment def calc_moment(surface_data, ignore_zone, half_model=False, filter=None, **kwargs):