InterfaceTemperatureSetup

Qualified name: outputs.interface_temperature.api.interface_temperature_api.InterfaceTemperatureSetup

class outputs.interface_temperature.api.interface_temperature_api.InterfaceTemperatureSetup(item)[source]

Bases: OutputSetup

The API handler for Interface temperature outputs

The following example shows how to create a Interface temperature 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='Thermal output case').set_name(name='Example OC')
>>> output_setup = oc_setup.create_output_setup(output_type='Interface temperature')

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='Thermal output case').set_name(name='Example OC')
>>> output_setup = oc_setup.get_output_setup(index=0) # The output under this index must already exist

Methods

set_component_by_name

Sets the component for the associated Interface temperature

set_dof

Sets the value of an element of the DOF vector

set_dof_dict

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

set_interface_by_name

Sets the interface for the associated Interface temperature

set_value

Sets the value of the DOF vector

set_component_by_name(component_name: str) InterfaceTemperatureSetup[source]

Sets the component for the associated Interface temperature

See example at the top for how to create a Interface temperature setup object

Example

>>> output_setup = output_setup.set_component_by_name(component_name='example component')
Returns:

self

Return type:

InterfaceTemperatureSetup

Raises:

NameNotFoundError – Raised if the supplied name is not a recognized component

set_dof(dof_name, value) InterfaceTemperatureSetup[source]

Sets the value of an element of the DOF vector

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

Example

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

self

Return type:

InterfaceTemperatureSetup

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

  • NameNotFoundError – Raised if there is no DOF with the given name

set_dof_dict(dof_values_dict: Dict[str, float]) InterfaceTemperatureSetup[source]

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

See example at the top for how to create a Interface temperature setup object

Example

>>> output_setup = output_setup.set_dof_dict(dof_values_dict={'value': 100})
Returns:

self

Return type:

InterfaceTemperatureSetup

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_interface_by_name(interface_name) InterfaceTemperatureSetup[source]

Sets the interface for the associated Interface temperature

Returns:

self

Return type:

InterfaceTemperatureSetup

Raises:

NameNotFoundError – Raised if the supplied name is not recognized

set_value(value) InterfaceTemperatureSetup[source]

Sets the value of the DOF vector

See example at the top for how to create a Interface temperature setup object

Example

>>> output_setup = output_setup.set_value(value=100)
Returns:

self

Return type:

InterfaceTemperatureSetup

Raises:

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