InterfaceHeatFlowSetup¶
Qualified name: loads.interface_heat_flow.api.interface_heat_flow_api.InterfaceHeatFlowSetup
- class loads.interface_heat_flow.api.interface_heat_flow_api.InterfaceHeatFlowSetup(item)[source]¶
Bases:
LoadSetup
The API handler for Heat Flow Interface loads
The following example shows how to create a Heat Flow to Interface Load 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 Interface')
The next example shows how to get an API object for an already existing load.
- class:
note
>>> 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
Sets the component for the associated Heat Flow Interface
Sets the value of an element of the DOF vector
Sets the values of the DOF vector to those given in the dictionary
Sets the interface for the associated Heat Flow Interface
Sets the value of the DOF vector
- set_component_by_name(component_name: str) InterfaceHeatFlowSetup [source]¶
Sets the component for the associated Heat Flow Interface
See example at the top for how to create a Heat Flow to Interface setup object
Example
>>> load_setup = load_setup.set_component_by_name(component_name='example component')
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if the supplied name is not a recognized component
- set_dof(dof_name, value) InterfaceHeatFlowSetup [source]¶
Sets the value of an element of the DOF vector
See example at the top for how to create the setup object
Example
>>> load_setup = load_setup.set_dof(dof_name='value', value=10)
- Returns:
self
- Return type:
- 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]) InterfaceHeatFlowSetup [source]¶
Sets the values of the DOF vector to those given in the dictionary
See example at the top for how to create a Heat Flow to Interface setup object
Example
>>> load_setup = load_setup.set_dof_dict(dof_values_dict={'value': 100})
- 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_interface_by_name(interface_name) InterfaceHeatFlowSetup [source]¶
Sets the interface for the associated Heat Flow Interface
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if the supplied name is not recognized
- set_value(value) InterfaceHeatFlowSetup [source]¶
Sets the value of the DOF vector
See example at the top for how to create a Heat Flow to Interface setup object
Example
>>> load_setup = load_setup.set_value(value=100)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number