Skip to content

Implement plotting of ElementNodal #373

@akaszynski

Description

@akaszynski

As of now, ElementNodal plotting isn't enabled, but it's something that could be added with pyvista #3112. If you prefer not waiting for the next release, instead of DataSet.separate_cells simply use shrink(1.0).

Here's a brief example:

import ansys.dpf.core as dpf
from ansys.dpf.core import examples
model = dpf.Model(examples.simple_bar)

mesh = model.metadata.meshed_region

nodal_forces = model.results.element_nodal_forces()
fields = nodal_forces.outputs.fields_container()
field = fields.select_component(0)[0]

# separate individual cells
grid = mesh.grid.shrink(1.0)

scalars = field.data
grid.plot(scalars=scalars)

tmp

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions