ansys.dpf.core.operators.geo.elements_volume#

class ansys.dpf.core.operators.geo.elements_volume(mesh=None, mesh_scoping=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

Compute the measure of the Elements (volume for 3D elements, surface for 2D elements or length for 1D elements) using default shape functions, except for polyhedrons.

Parameters:
  • mesh (MeshedRegion)

  • mesh_scoping (Scoping) – If not provided, the measure of all elements for the mesh is computed. If provided, the Scoping needs to have “Elemental” location.

Returns:

field

Return type:

Field

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.geo.elements_volume()
>>> # Make input connections
>>> my_mesh = dpf.MeshedRegion()
>>> op.inputs.mesh.connect(my_mesh)
>>> my_mesh_scoping = dpf.Scoping()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.geo.elements_volume(
...     mesh=my_mesh,
...     mesh_scoping=my_mesh_scoping,
... )
>>> # Get output data
>>> result_field = op.outputs.field()
_inputs#
_outputs#
static _spec() ansys.dpf.core.operators.specification.Specification#
static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters:

server – Server with channel connected to the remote or local instance. When None, attempts to use the global server.

Returns:

A new Config instance equivalent to the default config for this operator.

Return type:

config

property inputs: InputsElementsVolume#

Enables to connect inputs to the operator

Returns:

An instance of InputsElementsVolume.

Return type:

inputs

property outputs: OutputsElementsVolume#

Enables to get outputs of the operator by evaluating it

Returns:

An instance of OutputsElementsVolume.

Return type:

outputs