HeatFluxSetup#

Qualified name: loads.heat_flux.api.heat_flux_api.HeatFluxSetup

class loads.heat_flux.api.heat_flux_api.HeatFluxSetup(item)[source]#

Bases: LoadSetup, SourceTargetSettableMixin

The API handler for heat flux loads

The following example shows how to create a heat flux 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 flux')

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_flux

Deprecated version of set_general_job_settings_parameter()

set_link

Deprecated method

set_link_by_name

Sets the link for the associated heat flux

set_source_heat_flux

Deprecated version of set_source_value()

set_source_value

Sets the 'source' value of the load vector

set_target_heat_flux

Deprecated version of set_target_value()

set_target_value

Sets the 'target' value of the load vector

set_dof(dof_name, value) HeatFluxSetup[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_flux_setup = heat_flux_setup.set_dof(dof_name='target', value=10)
Returns:

self

Return type:

HeatFluxSetup

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]) HeatFluxSetup[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 flux setup object

Example

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

self

Return type:

HeatFluxSetup

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_flux(value)[source]#

Deprecated version of set_general_job_settings_parameter()

Deprecated

set_heat_flux 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 flux

See example at the top for how to create a heat flux 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:

HeatFluxSetup

Raises:

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

set_source_heat_flux(value)[source]#

Deprecated version of set_source_value()

Deprecated

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

set_source_value(value) HeatFluxSetup[source]#

Sets the ‘source’ value of the load vector

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

Example

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

self

Return type:

HeatFluxSetup

Raises:

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

set_target_heat_flux(value)[source]#

Deprecated version of set_target_value()

Deprecated

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

set_target_value(value) HeatFluxSetup[source]#

Sets the ‘target’ value of the load vector

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

Example

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

self

Return type:

HeatFluxSetup

Raises:

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