LinkDisplacementSetup¶
Qualified name: outputs.link_displacement.api.link_displacement_api.LinkDisplacementSetup
- class outputs.link_displacement.api.link_displacement_api.LinkDisplacementSetup(item)[source]¶
Bases:
OutputSetup,TranslationSettableMixin,RotationSettableMixinThe API handler for link outputs
The following example shows how to create a link output using the API, it is assumed that these steps were performed in each of the examples for other methods in this class.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> occ_setup = simulation_setup.create_output_case_container_setup().set_name(name='Example OCC') >>> oc_setup = occ_setup.create_output_case_setup(oc_type='Mechanical output case').set_name(name='Example OC') >>> link_displacement_setup = oc_setup.create_output_setup(output_type='Link displacement')
The next example shows how to get an API object for an already existing output.
Example
>>> from more.api import ApiGateway >>> api = ApiGateway(proj=proj) >>> simulation_setup = api.create_simulation_setup() >>> occ_setup = simulation_setup.create_output_case_container_setup().set_name(name='Example OCC') >>> oc_setup = occ_setup.create_output_case_setup(oc_type='Mechanical output case').set_name(name='Example OC')
>>> link_displacement_setup = oc_setup.get_output_setup(index=0) # The output under this index must already exist
Methods
Sets the value of an element of the DOF vector
Sets the values of the output vector to those given in the dictionary
Deprecated method
Sets the link for the associated link output
Sets the 'ru' value of the output vector
Sets the 'rv' value of the output vector
Sets the 'rw' value of the output vector
Sets the 'u' value of the output vector
Sets the 'v' value of the output vector
Sets the 'w' value of the output vector
- set_dof(dof_name, value) LinkDisplacementSetup[source]¶
Sets the value of an element of the DOF vector
See example at the top for how to create the setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_dof(dof_name='v', value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
NameNotFoundError – Raised if the given name is not a recognized DOF
- set_dof_dict(dof_values_dict: Dict[str, float]) LinkDisplacementSetup[source]¶
Sets the values of the output vector to those given in the dictionary
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_dof_dict(dof_values_dict={'u': 5, 'ru': 10, 'v': 2.0})
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
NameNotFoundError – Raised if a key in the supplied dictionary is not a recognized dof
- set_link(link) LinkDisplacementSetup[source]¶
Deprecated method
Deprecated
set_link will be removed in a future MORe release, it is replaced by
set_link_by_name()
- set_link_by_name(link_name: str) LinkDisplacementSetup[source]¶
Sets the link for the associated link output
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_link_by_name(link_name='example link') # The link with this name must already exist
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if the supplied link name was not found
- set_ru(value: float) LinkDisplacementSetup[source]¶
Sets the ‘ru’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_ru(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
- set_rv(value: float) LinkDisplacementSetup[source]¶
Sets the ‘rv’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_rv(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
- set_rw(value: float) LinkDisplacementSetup[source]¶
Sets the ‘rw’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_rw(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
- set_u(value: float) LinkDisplacementSetup[source]¶
Sets the ‘u’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_u(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
- set_v(value: float) LinkDisplacementSetup[source]¶
Sets the ‘v’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_v(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number
- set_w(value: float) LinkDisplacementSetup[source]¶
Sets the ‘w’ value of the output vector
See example at the top for how to create a link output setup object
Example
>>> link_displacement_setup = link_displacement_setup.set_w(value=10)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number