Aggregate Warpage

# pylint: disable=pointless-statement
from pathlib import Path
import numpy as np
from mesh2vec.mesh2vec_cae import Mesh2VecCae

Load Shell from ANSA, simulation results from d3plot

hg = Mesh2VecCae.from_ansa_shell(
    3,
    Path("../../data/hat/Hatprofile.k"),
    json_mesh_file=Path("../../data/hat/cached_hat_key.json"),
)

Plot Feature locally

hg.add_features_from_ansa(
    ["warpage"],
    Path("../../data/hat/Hatprofile.k"),
    json_mesh_file=Path("../../data/hat/cached_hat_key.json"),
)
name = hg.aggregate("warpage", 0, np.nanmean)
fig = hg.get_visualization_plotly(str(name))
fig.update_layout(title=name[0])
fig


Aggregate Feature and plot

name = hg.aggregate("warpage", 3, np.nanmean)
fig = hg.get_visualization_plotly(str(name))
fig.update_layout(title=name)
fig


Access the results

hg.to_dataframe()
vtx_id warpage-nanmean-0 warpage-nanmean-3
0 4700000 0.000000 0.000000
1 4700001 0.000000 0.000000
2 4700002 0.000000 0.000000
3 4700003 0.000034 0.005791
4 4700004 0.000008 0.000726
... ... ... ...
6395 2002173 0.000000 0.000000
6396 2002174 0.000000 0.000000
6397 2002175 0.000000 0.000000
6398 2002176 0.000000 0.000000
6399 2002177 0.000000 0.000000

6400 rows × 3 columns



Total running time of the script: ( 0 minutes 0.714 seconds)

Gallery generated by Sphinx-Gallery