Generate shape coefficientsΒΆ
The following steps are performed to obtain all the artifacts for shape coefficient use case:
Read parameters file
Read Mesh description
Its path can be specified
Or it can be obtained from the simulation configuration file
Read data for pressure coefficient
Initialize Path Manager
[1]:
from cfdmod.pressure.path_manager import CePathManager
import pathlib
path_manager = CePathManager(output_path=pathlib.Path("./output/pressure"))
Read post-processing Ce config file
[ ]:
from cfdmod.pressure import CeCaseConfig
config_path = pathlib.Path("./fixtures/tests/pressure/Ce_params.yaml")
post_proc_cfg = CeCaseConfig.from_file(config_path)
post_proc_cfg
Read LNAS Mesh
[3]:
from lnas import LnasFormat
mesh_path = pathlib.Path("./fixtures/tests/pressure/galpao/galpao.normalized.lnas")
mesh = LnasFormat.from_file(mesh_path)
mesh.geometry.vertices.shape, mesh.geometry.triangles.shape
[3]:
((1549, 3), (2915, 3))
Process shape coefficient use case
[ ]:
from cfdmod.pressure import run_ce
cp_data_path = pathlib.Path("./fixtures/tests/pressure/data/cp_t.normalized.h5")
run_ce(
cp_h5=cp_data_path,
mesh_path=mesh_path,
cfg_path=config_path,
output=path_manager.output_path,
)