Visualization of boundaries/BCs
Visualization of boundaries/BCs
In this private Jupyter notebook there is some code:
def vis_meshes(basename, physical_groups=[]):
mesh = pv.read(basename + "_domain.vtu")
p = pv.Plotter()
p.add_mesh(mesh, show_edges=True, show_scalar_bar=False, color=None, scalars=None, label="domain")
colors = mpl.colormaps["turbo"](np.linspace(0,1,len(physical_groups)))
for pg, color in zip(physical_groups, colors):
mesh = pv.read(f"{basename}_physical_group_{pg}.vtu")
p.add_mesh(mesh, color=color, label=pg, line_width=4)
p.add_mesh(mesh.copy(False), style="points", color=color, point_size=9, label="")
p.view_xy()
p.show_bounds(ticks="outside", xlabel="x / m", ylabel="y / m")
p.add_legend(bcolor=None)
#p.camera.zoom(1.3)
p.window_size = [1500,750]
return p
p = vis_meshes("out/dwh_initial_stress", ["Left", "Top", "Right", "Bottom", "Hole"])
p.show()
Edited by Christoph Lehmann