Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chrpetre committed Jan 3, 2024
1 parent 0bc8cb7 commit bdc486d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Binary file added doc/source/_static/TBROM_pointcloud_3d_viz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions examples/02-tbrom_examples/02-TBROM_input_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pyvista as pv
from pytwin import TwinModel, download_file

twin_file = download_file("ThermalTBROM_FieldInput_23R1.twin", "twin_files", force_download=True)
Expand Down Expand Up @@ -247,3 +248,17 @@ def norm_vector_field(field: np.ndarray):
# Plot the results.

plot_result_comparison(sim_results)

# Plot the 3D field results on point cloud. To be able to retrieve the PyVista object associated to the field results
# and post process them, you need to have the geometry embedded with the TBROM when exporting it to Twin Builder.
field_data = twin_model.get_tbrom_output_field(romname)
plotter = pv.Plotter()
plotter.set_background("white")
plotter.add_axes()
plotter.add_mesh(field_data, scalar_bar_args={"color": "black"})
plotter.show()

###############################################################################
# .. image:: /_static/TBROM_pointcloud_3d_viz.png
# :width: 400pt
# :align: center

0 comments on commit bdc486d

Please sign in to comment.