write_cms_rbd_file#

Autogenerated DPF operator classes.

class ansys.dpf.core.operators.result.write_cms_rbd_file.write_cms_rbd_file(model_data=None, center_of_mass=None, inertia_relief=None, model_size=None, master_node_coordinates=None, v_trsf=None, k_mat=None, mass_mat=None, c_mat=None, rhs=None, dn=None, dr_cross_n=None, drn=None, dn_cross_n=None, dnx_y=None, dny_y=None, dnz_y=None, dyx_n=None, dyy_n=None, dyz_n=None, dnxn=None, dnyn=None, dnzn=None, file_path=None, config=None, server=None)#

Write the invariant terms and the model data in a cms_rbd file

Parameters:
  • model_data (PropertyField) – Data describing the finite element model

  • center_of_mass (Field) – Center of mass of the body

  • inertia_relief (Field) – Inertia matrix

  • model_size (float) – Size of the diagonal box containing the body

  • master_node_coordinates (default: None) –

  • v_trsf (default: None) – Translational and rotational shape functions

  • k_mat (Field) –

  • mass_mat (Field) –

  • c_mat (Field) –

  • rhs (Field) –

  • dn (default: None) –

  • dr_cross_n (default: None) –

  • drn (default: None) –

  • dn_cross_n (default: None) –

  • dnx_y (default: None) –

  • dny_y (default: None) –

  • dnz_y (default: None) –

  • dyx_n (default: None) –

  • dyy_n (default: None) –

  • dyz_n (default: None) –

  • dnxn (default: None) –

  • dnyn (default: None) –

  • dnzn (default: None) –

  • file_path (str) – Path with cms_rbd extension where the export occurs

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> # Make input connections
>>> my_model_data = dpf.PropertyField()
>>> op.inputs.model_data.connect(my_model_data)
>>> my_center_of_mass = dpf.Field()
>>> op.inputs.center_of_mass.connect(my_center_of_mass)
>>> my_inertia_relief = dpf.Field()
>>> op.inputs.inertia_relief.connect(my_inertia_relief)
>>> my_model_size = float()
>>> op.inputs.model_size.connect(my_model_size)
>>> my_master_node_coordinates = dpf.()
>>> op.inputs.master_node_coordinates.connect(my_master_node_coordinates)
>>> my_v_trsf = dpf.()
>>> op.inputs.v_trsf.connect(my_v_trsf)
>>> my_k_mat = dpf.Field()
>>> op.inputs.k_mat.connect(my_k_mat)
>>> my_mass_mat = dpf.Field()
>>> op.inputs.mass_mat.connect(my_mass_mat)
>>> my_c_mat = dpf.Field()
>>> op.inputs.c_mat.connect(my_c_mat)
>>> my_rhs = dpf.Field()
>>> op.inputs.rhs.connect(my_rhs)
>>> my_dn = dpf.()
>>> op.inputs.dn.connect(my_dn)
>>> my_dr_cross_n = dpf.()
>>> op.inputs.dr_cross_n.connect(my_dr_cross_n)
>>> my_drn = dpf.()
>>> op.inputs.drn.connect(my_drn)
>>> my_dn_cross_n = dpf.()
>>> op.inputs.dn_cross_n.connect(my_dn_cross_n)
>>> my_dnx_y = dpf.()
>>> op.inputs.dnx_y.connect(my_dnx_y)
>>> my_dny_y = dpf.()
>>> op.inputs.dny_y.connect(my_dny_y)
>>> my_dnz_y = dpf.()
>>> op.inputs.dnz_y.connect(my_dnz_y)
>>> my_dyx_n = dpf.()
>>> op.inputs.dyx_n.connect(my_dyx_n)
>>> my_dyy_n = dpf.()
>>> op.inputs.dyy_n.connect(my_dyy_n)
>>> my_dyz_n = dpf.()
>>> op.inputs.dyz_n.connect(my_dyz_n)
>>> my_dnxn = dpf.()
>>> op.inputs.dnxn.connect(my_dnxn)
>>> my_dnyn = dpf.()
>>> op.inputs.dnyn.connect(my_dnyn)
>>> my_dnzn = dpf.()
>>> op.inputs.dnzn.connect(my_dnzn)
>>> my_file_path = str()
>>> op.inputs.file_path.connect(my_file_path)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.result.write_cms_rbd_file(
...     model_data=my_model_data,
...     center_of_mass=my_center_of_mass,
...     inertia_relief=my_inertia_relief,
...     model_size=my_model_size,
...     master_node_coordinates=my_master_node_coordinates,
...     v_trsf=my_v_trsf,
...     k_mat=my_k_mat,
...     mass_mat=my_mass_mat,
...     c_mat=my_c_mat,
...     rhs=my_rhs,
...     dn=my_dn,
...     dr_cross_n=my_dr_cross_n,
...     drn=my_drn,
...     dn_cross_n=my_dn_cross_n,
...     dnx_y=my_dnx_y,
...     dny_y=my_dny_y,
...     dnz_y=my_dnz_y,
...     dyx_n=my_dyx_n,
...     dyy_n=my_dyy_n,
...     dyz_n=my_dyz_n,
...     dnxn=my_dnxn,
...     dnyn=my_dnyn,
...     dnzn=my_dnzn,
...     file_path=my_file_path,
... )
>>> # Get output data
>>> result_data_sources = op.outputs.data_sources()
static default_config(server=None)#

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.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the global server.

property inputs#

Enables to connect inputs to the operator

Returns:

inputs

Return type:

InputsWriteCmsRbdFile

property outputs#

Enables to get outputs of the operator by evaluating it

Returns:

outputs

Return type:

OutputsWriteCmsRbdFile

property config#

Copy of the operator’s current configuration.

You can modify the copy of the configuration and then use operator.config = new_config or instantiate an operator with the new configuration as a parameter.

For information on an operator’s options, see the documentation for that operator.

Returns:

Copy of the operator’s current configuration.

Return type:

ansys.dpf.core.config.Config

Examples

Modify the copy of an operator’s configuration and set it as current config of the operator.

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.add()
>>> config_add = op.config
>>> config_add.set_work_by_index_option(True)
>>> op.config = config_add
connect(pin, inpt, pin_out=0)#

Connect an input on the operator using a pin number.

Parameters:
  • pin (int) – Number of the input pin.

  • inpt (str, int, double, bool, list[int], list[float], Field, FieldsContainer, Scoping,) –

  • ScopingsContainer – Operator, os.PathLike Object to connect to.

  • MeshedRegion – Operator, os.PathLike Object to connect to.

  • MeshesContainer – Operator, os.PathLike Object to connect to.

  • DataSources – Operator, os.PathLike Object to connect to.

  • CyclicSupport – Operator, os.PathLike Object to connect to.

  • dict – Operator, os.PathLike Object to connect to.

  • Outputs – Operator, os.PathLike Object to connect to.

  • pin_out (int, optional) – If the input is an operator, the output pin of the input operator. The default is 0.

Examples

Compute the minimum of displacement by chaining the "U" and "min_max_fc" operators.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> max_fc_op = dpf.operators.min_max.min_max_fc()
>>> max_fc_op.inputs.connect(disp_op.outputs)
>>> max_field = max_fc_op.outputs.field_max()
>>> max_field.data
DPFArray([[0.59428386, 0.00201751, 0.0006032 ]]...
connect_operator_as_input(pin, op)#

Connects an operator as an input on a pin. :type pin: :param pin: Number of the output pin. The default is 0. :type pin: int :type op: :param op: Requested type of the output. The default is None. :type op: ansys.dpf.core.dpf_operator.Operator

eval(pin=None)#

Evaluate this operator.

Parameters:

pin (int) – Number of the output pin. The default is None.

Returns:

output – Returns the first output of the operator by default and the output of a given pin when specified. Or, it only evaluates the operator without output.

Return type:

FieldsContainer, Field, MeshedRegion, Scoping

Examples

Use the eval method.

>>> from ansys.dpf import core as dpf
>>> import ansys.dpf.core.operators.math as math
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.find_multishells_rst())
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> normfc = math.norm_fc(disp_op).eval()
get_output(pin=0, output_type=None)#

Retrieve the output of the operator on the pin number.

To activate the progress bar for server version higher or equal to 3.0, use my_op.progress_bar=True

Parameters:
  • pin (int, optional) – Number of the output pin. The default is 0.

  • output_type (ansys.dpf.core.common.types, type, optional) – Requested type of the output. The default is None.

Returns:

Output of the operator.

Return type:

type

static operator_specification(op_name, server=None)#

Documents an Operator with its description (what the Operator does), its inputs and outputs and some properties

property progress_bar: bool#

With this property, the user can choose to print a progress bar when the operator’s output is requested, default is False

run()#

Evaluate this operator.

property specification#

Returns the Specification (or documentation) of this Operator

Return type:

Specification

class ansys.dpf.core.operators.result.write_cms_rbd_file.InputsWriteCmsRbdFile(op: ansys.dpf.core.dpf_operator.Operator)#

Intermediate class used to connect user inputs to write_cms_rbd_file operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> my_model_data = dpf.PropertyField()
>>> op.inputs.model_data.connect(my_model_data)
>>> my_center_of_mass = dpf.Field()
>>> op.inputs.center_of_mass.connect(my_center_of_mass)
>>> my_inertia_relief = dpf.Field()
>>> op.inputs.inertia_relief.connect(my_inertia_relief)
>>> my_model_size = float()
>>> op.inputs.model_size.connect(my_model_size)
>>> my_master_node_coordinates = dpf.()
>>> op.inputs.master_node_coordinates.connect(my_master_node_coordinates)
>>> my_v_trsf = dpf.()
>>> op.inputs.v_trsf.connect(my_v_trsf)
>>> my_k_mat = dpf.Field()
>>> op.inputs.k_mat.connect(my_k_mat)
>>> my_mass_mat = dpf.Field()
>>> op.inputs.mass_mat.connect(my_mass_mat)
>>> my_c_mat = dpf.Field()
>>> op.inputs.c_mat.connect(my_c_mat)
>>> my_rhs = dpf.Field()
>>> op.inputs.rhs.connect(my_rhs)
>>> my_dn = dpf.()
>>> op.inputs.dn.connect(my_dn)
>>> my_dr_cross_n = dpf.()
>>> op.inputs.dr_cross_n.connect(my_dr_cross_n)
>>> my_drn = dpf.()
>>> op.inputs.drn.connect(my_drn)
>>> my_dn_cross_n = dpf.()
>>> op.inputs.dn_cross_n.connect(my_dn_cross_n)
>>> my_dnx_y = dpf.()
>>> op.inputs.dnx_y.connect(my_dnx_y)
>>> my_dny_y = dpf.()
>>> op.inputs.dny_y.connect(my_dny_y)
>>> my_dnz_y = dpf.()
>>> op.inputs.dnz_y.connect(my_dnz_y)
>>> my_dyx_n = dpf.()
>>> op.inputs.dyx_n.connect(my_dyx_n)
>>> my_dyy_n = dpf.()
>>> op.inputs.dyy_n.connect(my_dyy_n)
>>> my_dyz_n = dpf.()
>>> op.inputs.dyz_n.connect(my_dyz_n)
>>> my_dnxn = dpf.()
>>> op.inputs.dnxn.connect(my_dnxn)
>>> my_dnyn = dpf.()
>>> op.inputs.dnyn.connect(my_dnyn)
>>> my_dnzn = dpf.()
>>> op.inputs.dnzn.connect(my_dnzn)
>>> my_file_path = str()
>>> op.inputs.file_path.connect(my_file_path)
property model_data#

Allows to connect model_data input to the operator.

Data describing the finite element model

Parameters:

my_model_data (PropertyField) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.model_data.connect(my_model_data)
>>> # or
>>> op.inputs.model_data(my_model_data)
property center_of_mass#

Allows to connect center_of_mass input to the operator.

Center of mass of the body

Parameters:

my_center_of_mass (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.center_of_mass.connect(my_center_of_mass)
>>> # or
>>> op.inputs.center_of_mass(my_center_of_mass)
property inertia_relief#

Allows to connect inertia_relief input to the operator.

Inertia matrix

Parameters:

my_inertia_relief (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.inertia_relief.connect(my_inertia_relief)
>>> # or
>>> op.inputs.inertia_relief(my_inertia_relief)
property model_size#

Allows to connect model_size input to the operator.

Size of the diagonal box containing the body

Parameters:

my_model_size (float) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.model_size.connect(my_model_size)
>>> # or
>>> op.inputs.model_size(my_model_size)
property master_node_coordinates#

Allows to connect master_node_coordinates input to the operator.

Parameters:

my_master_node_coordinates

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.master_node_coordinates.connect(my_master_node_coordinates)
>>> # or
>>> op.inputs.master_node_coordinates(my_master_node_coordinates)
property v_trsf#

Allows to connect v_trsf input to the operator.

Translational and rotational shape functions

Parameters:

my_v_trsf

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.v_trsf.connect(my_v_trsf)
>>> # or
>>> op.inputs.v_trsf(my_v_trsf)
property k_mat#

Allows to connect k_mat input to the operator.

Parameters:

my_k_mat (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.k_mat.connect(my_k_mat)
>>> # or
>>> op.inputs.k_mat(my_k_mat)
property mass_mat#

Allows to connect mass_mat input to the operator.

Parameters:

my_mass_mat (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.mass_mat.connect(my_mass_mat)
>>> # or
>>> op.inputs.mass_mat(my_mass_mat)
property c_mat#

Allows to connect c_mat input to the operator.

Parameters:

my_c_mat (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.c_mat.connect(my_c_mat)
>>> # or
>>> op.inputs.c_mat(my_c_mat)
property rhs#

Allows to connect rhs input to the operator.

Parameters:

my_rhs (Field) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.rhs.connect(my_rhs)
>>> # or
>>> op.inputs.rhs(my_rhs)
property dn#

Allows to connect dn input to the operator.

Parameters:

my_dn

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dn.connect(my_dn)
>>> # or
>>> op.inputs.dn(my_dn)
property dr_cross_n#

Allows to connect dr_cross_n input to the operator.

Parameters:

my_dr_cross_n

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dr_cross_n.connect(my_dr_cross_n)
>>> # or
>>> op.inputs.dr_cross_n(my_dr_cross_n)
property drn#

Allows to connect drn input to the operator.

Parameters:

my_drn

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.drn.connect(my_drn)
>>> # or
>>> op.inputs.drn(my_drn)
property dn_cross_n#

Allows to connect dn_cross_n input to the operator.

Parameters:

my_dn_cross_n

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dn_cross_n.connect(my_dn_cross_n)
>>> # or
>>> op.inputs.dn_cross_n(my_dn_cross_n)
property dnx_y#

Allows to connect dnx_y input to the operator.

Parameters:

my_dnx_y

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dnx_y.connect(my_dnx_y)
>>> # or
>>> op.inputs.dnx_y(my_dnx_y)
property dny_y#

Allows to connect dny_y input to the operator.

Parameters:

my_dny_y

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dny_y.connect(my_dny_y)
>>> # or
>>> op.inputs.dny_y(my_dny_y)
property dnz_y#

Allows to connect dnz_y input to the operator.

Parameters:

my_dnz_y

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dnz_y.connect(my_dnz_y)
>>> # or
>>> op.inputs.dnz_y(my_dnz_y)
property dyx_n#

Allows to connect dyx_n input to the operator.

Parameters:

my_dyx_n

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dyx_n.connect(my_dyx_n)
>>> # or
>>> op.inputs.dyx_n(my_dyx_n)
property dyy_n#

Allows to connect dyy_n input to the operator.

Parameters:

my_dyy_n

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dyy_n.connect(my_dyy_n)
>>> # or
>>> op.inputs.dyy_n(my_dyy_n)
property dyz_n#

Allows to connect dyz_n input to the operator.

Parameters:

my_dyz_n

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dyz_n.connect(my_dyz_n)
>>> # or
>>> op.inputs.dyz_n(my_dyz_n)
property dnxn#

Allows to connect dnxn input to the operator.

Parameters:

my_dnxn

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dnxn.connect(my_dnxn)
>>> # or
>>> op.inputs.dnxn(my_dnxn)
property dnyn#

Allows to connect dnyn input to the operator.

Parameters:

my_dnyn

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dnyn.connect(my_dnyn)
>>> # or
>>> op.inputs.dnyn(my_dnyn)
property dnzn#

Allows to connect dnzn input to the operator.

Parameters:

my_dnzn

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.dnzn.connect(my_dnzn)
>>> # or
>>> op.inputs.dnzn(my_dnzn)
property file_path#

Allows to connect file_path input to the operator.

Path with cms_rbd extension where the export occurs

Parameters:

my_file_path (str) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> op.inputs.file_path.connect(my_file_path)
>>> # or
>>> op.inputs.file_path(my_file_path)
connect(inpt)#

Connect any input (an entity or an operator output) to any input pin of this operator. Searches for the input type corresponding to the output.

Parameters:
  • inpt (str, int, double, bool, list[int], list[float], Field, FieldsContainer, Scoping,) –

  • ScopingsContainer (E501) – Input of the operator.

  • MeshedRegion (E501) – Input of the operator.

  • MeshesContainer (E501) – Input of the operator.

  • DataSources (E501) – Input of the operator.

  • CyclicSupport (E501) – Input of the operator.

  • Outputs (E501) – Input of the operator.

  • noqa (os.PathLike #) – Input of the operator.

class ansys.dpf.core.operators.result.write_cms_rbd_file.OutputsWriteCmsRbdFile(op: ansys.dpf.core.dpf_operator.Operator)#

Intermediate class used to get outputs from write_cms_rbd_file operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> # Connect inputs : op.inputs. ...
>>> result_data_sources = op.outputs.data_sources()
property data_sources#

Allows to get data_sources output of the operator

Returns:

my_data_sources

Return type:

DataSources

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.write_cms_rbd_file()
>>> # Connect inputs : op.inputs. ...
>>> result_data_sources = op.outputs.data_sources()