CompositionAccelerationSetup#

Qualified name: loads.composition_acceleration.api.composition_acceleration_api.CompositionAccelerationSetup

class loads.composition_acceleration.api.composition_acceleration_api.CompositionAccelerationSetup(item)[source]#

Bases: LoadSetup, TranslationSettableMixin

The API handler for composition accelerations

The following example shows how to create a composition acceleration 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()
>>> lcc_setup = simulation_setup.create_load_case_container_setup().set_name(name='Example LCC')
>>> lc_setup = lcc_setup.create_load_case_setup(lc_type='Mechanical load case').set_name(name='Example LC')
>>> composition_acceleration_setup = lc_setup.create_load_setup(load_type='Composition acceleration')

The next example shows how to get an API object for an already existing load.

Example

>>> from more.api import ApiGateway
>>> api = ApiGateway(proj=proj)
>>> simulation_setup = api.create_simulation_setup()
>>> lcc_setup = simulation_setup.create_load_case_container_setup().set_name(name='Example LCC')
>>> lc_setup = lcc_setup.create_load_case_setup(lc_type='Mechanical load case').set_name(name='Example LC')
>>> composition_acceleration_setup = lc_setup.get_load_setup(index=0) # The load under this index must already exist

Methods

set_dof

Sets the value of an element of the DOF vector

set_dof_dict

Sets the values of the load vector to those given in the dictionary

set_u

Sets the 'u' value of the load vector

set_v

Sets the 'v' value of the load vector

set_w

Sets the 'w' value of the load vector

set_dof(dof_name, value) CompositionAccelerationSetup[source]#

Sets the value of an element of the DOF vector

See example at the top for how to create the setup object

Example

>>> composition_acceleration_setup = composition_acceleration_setup.set_dof(dof_name='v', value=10)
Returns:

self

Return type:

CompositionAccelerationSetup

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]) CompositionAccelerationSetup[source]#

Sets the values of the load vector to those given in the dictionary

See example at the top for how to create a composition acceleration setup object

Example

>>> composition_acceleration_setup = composition_acceleration_setup.set_dof_dict(dof_values_dict={'u': 5, 'v': 2.0})
Returns:

self

Return type:

CompositionAccelerationSetup

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_u(value: float) CompositionAccelerationSetup[source]#

Sets the ‘u’ value of the load vector

See example at the top for how to create a composition acceleration setup object

Example

>>> composition_acceleration_setup = composition_acceleration_setup.set_u(value=10)
Returns:

self

Return type:

CompositionAccelerationSetup

Raises:

TypeError – Raised if the supplied value is not a floating point number

set_v(value: float) CompositionAccelerationSetup[source]#

Sets the ‘v’ value of the load vector

See example at the top for how to create a composition acceleration setup object

Example

>>> composition_acceleration_setup = composition_acceleration_setup.set_v(value=10)
Returns:

self

Return type:

CompositionAccelerationSetup

Raises:

TypeError – Raised if the supplied value is not a floating point number

set_w(value: float) CompositionAccelerationSetup[source]#

Sets the ‘w’ value of the load vector

See example at the top for how to create a composition acceleration setup object

Example

>>> composition_acceleration_setup = composition_acceleration_setup.set_w(value=10)
Returns:

self

Return type:

CompositionAccelerationSetup

Raises:

TypeError – Raised if the supplied value is not a floating point number