Metadata#

class ansys.dpf.core.model.Metadata(data_sources, server)#

Contains the metadata of a data source.

Parameters:
  • data_sources (DataSources)

  • server (server.DPFServer) – Server with the channel connected to the remote or local instance.

Overview#

release_streams

Release the streams if any.

named_selection

Scoping containing the list of nodes or elements in the named selection.

time_freq_support

Time frequency support.

data_sources

Data sources instance.

streams_provider

Streams provider operator connected to the data sources.

meshed_region

Meshed region instance.

mesh_provider

Mesh provider operator.

result_info

Result Info instance.

mesh_info

Mesh Info instance.

meshes_container

Meshes container instance.

meshes_provider

Meshes provider operator.

available_named_selections

List of available named selections.

Import detail#

from ansys.dpf.core.model import Metadata

Property detail#

property Metadata.time_freq_support#

Time frequency support.

Returns:

Time frequency support.

Return type:

ansys.dpf.core.time_freq_support.TimeFreqSupport

Examples

>>> from ansys.dpf.core import Model
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = Model(transient)

Get the number of sets from the result file.

>>> tf = model.metadata.time_freq_support
>>> tf.n_sets
35

Get the time values for the active result.

>>> tf.time_frequencies.data
DPFArray([0.        , 0.019975  , 0.039975  , 0.059975  , 0.079975  ,
       0.099975  , 0.119975  , 0.139975  , 0.159975  , 0.179975  ,
       0.199975  , 0.218975  , 0.238975  , 0.258975  , 0.278975  ,
       0.298975  , 0.318975  , 0.338975  , 0.358975  , 0.378975  ,
       0.398975  , 0.417975  , 0.437975  , 0.457975  , 0.477975  ,
       0.497975  , 0.517975  , 0.53754972, 0.55725277, 0.57711786,
       0.59702054, 0.61694639, 0.63683347, 0.65673452, 0.67662783]...
property Metadata.data_sources#

Data sources instance.

This data source can be connected to other operators.

Returns:

data_sources

Return type:

DataSources

Examples

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = dpf.Model(transient)

Connect the model data sources to the ‘U’ operator.

>>> ds = model.metadata.data_sources
>>> op = dpf.operators.result.displacement()
>>> op.inputs.data_sources.connect(ds)
property Metadata.streams_provider#

Streams provider operator connected to the data sources.

This streams provider can be connected to other operators.

Returns:

streams_provider

Return type:

ansys.dpf.core.operators.metadata.streams_provider

Examples

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> transient = examples.download_transient_result()
>>> model = dpf.Model(transient)

Connect the model data sources to the U operator.

>>> streams = model.metadata.streams_provider
>>> op = dpf.operators.result.displacement()
>>> op.inputs.streams_container.connect(streams)
property Metadata.meshed_region#

Meshed region instance.

Returns:

mesh – Mesh

Return type:

ansys.dpf.core.meshed_region.MeshedRegion

property Metadata.mesh_provider#

Mesh provider operator.

This operator reads a mesh from the result file. The underlying operator symbol is the class:ansys.dpf.core.operators.mesh.mesh_provider operator.

Returns:

mesh_provider – Mesh provider operator.

Return type:

ansys.dpf.core.operators.mesh.mesh_provider

property Metadata.result_info#

Result Info instance.

Returns:

result_info

Return type:

ansys.dpf.core.result_info.ResultInfo

property Metadata.mesh_info#

Mesh Info instance.

Returns:

mesh_info

Return type:

ansys.dpf.core.mesh_info.MeshInfo

property Metadata.meshes_container#

Meshes container instance.

Returns:

meshes – Meshes

Return type:

ansys.dpf.core.MeshesContainer

property Metadata.meshes_provider#

Meshes provider operator.

This operator reads a meshes container (with potentially time or space varying meshes) from the result files.

Returns:

meshes_provider – Meshes provider operator.

Return type:

ansys.dpf.core.Operator

Notes

Underlying operator symbol is “meshes_provider” operator

property Metadata.available_named_selections#

List of available named selections.

Returns:

named_selections

Return type:

list str

Method detail#

Metadata.release_streams()#

Release the streams if any.

Metadata.named_selection(named_selection)#

Scoping containing the list of nodes or elements in the named selection.

Parameters:

named_selection (str) – name of the named selection

Returns:

named_selection

Return type:

ansys.dpf.core.scoping.Scoping