HeatFlowSetup

Qualified name: loads.heat_flow.api.heat_flow_api.HeatFlowSetup

class loads.heat_flow.api.heat_flow_api.HeatFlowSetup(item)[source]

Bases: LoadSetup, SourceTargetSettableMixin

The API handler for heat flow loads

The following example shows how to create a heat flow 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='Thermal load case').set_name(name='Example LC')
>>> load_setup = lc_setup.create_load_setup(load_type='Heat flow')

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='Thermal load case').set_name(name='Example LC')
>>> load_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_heat_flow

Deprecated version of set_general_job_settings_parameter()

set_link

Deprecated method

set_link_by_name

Sets the link for the associated heat flow

set_source_heat_flow

Deprecated version of set_source_value()

set_source_value

Sets the 'source' value of the load vector

set_target_heat_flow

Deprecated version of set_target_value()

set_target_value

Sets the 'target' value of the load vector

set_dof(dof_name, value) HeatFlowSetup[source]

Sets the value of an element of the DOF vector

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

Example

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

self

Return type:

HeatFlowSetup

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

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

See example at the top for how to create a heat flow setup object

Example

>>> load_setup = load_setup.set_dof_dict(dof_values_dict={'source': 5, 'target': 10})
Returns:

self

Return type:

HeatFlowSetup

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_heat_flow(value) HeatFlowSetup[source]

Deprecated version of set_general_job_settings_parameter()

Deprecated

set_heat_flow will be removed in a future MORe release, it is split into two methods set_target_value() and set_source_value():

Deprecated method

Deprecated

set_link will be removed in a future MORe release, it is replaced by set_link_by_name()

Sets the link for the associated heat flow

See example at the top for how to create a heat flow setup object

Example

>>> load_setup = load_setup.set_link_by_name(link_name='example link') # The link with this name must already exist
Returns:

self

Return type:

HeatFlowSetup

Raises:

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

set_source_heat_flow(value) HeatFlowSetup[source]

Deprecated version of set_source_value()

Deprecated

set_source_heat_flow will be removed in a future MORe release, it is replaced by set_source_value()

set_source_value(value) HeatFlowSetup[source]

Sets the ‘source’ value of the load vector

See example at the top for how to create a heat flow setup object

Example

>>> load_setup = load_setup.set_source_value(value=10)
Returns:

self

Return type:

HeatFlowSetup

Raises:

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

set_target_heat_flow(value) HeatFlowSetup[source]

Deprecated version of set_target_value()

Deprecated

set_target_heat_flow will be removed in a future MORe release, it is replaced by set_target_value()

set_target_value(value) HeatFlowSetup[source]

Sets the ‘target’ value of the load vector

See example at the top for how to create a heat flow setup object

Example

>>> load_setup = load_setup.set_target_value(value=10)
Returns:

self

Return type:

HeatFlowSetup

Raises:

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