ConvectionSetup¶
Qualified name: loads.convection.api.convection_api.ConvectionSetup
- class loads.convection.api.convection_api.ConvectionSetup(item)[source]¶
Bases:
LoadSetup
The API handler for convection loads
The following example shows how to create a convection 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='Convection')
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 convection
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 convection
Deprecated method
Deprecated method
Deprecated version of
set_general_job_settings_parameter()
Sets the value of the convection
- set_component_by_name(component_name: str) ConvectionSetup [source]¶
Sets the component for the associated convection
See example at the top for how to create a convection 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) ConvectionSetup [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]) ConvectionSetup [source]¶
Sets the values of the DOF vector to those given in the dictionary
See example at the top for how to create a convection setup object
Example
>>> load_setup = load_setup.set_dof_dict(dof_values_dict={'value': 20})
- 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) ConvectionSetup [source]¶
Sets the interface for the associated convection
- Returns:
self
- Return type:
- Raises:
NameNotFoundError – Raised if the supplied name is not recognized
- set_link(link) ConvectionSetup [source]¶
Deprecated method
Deprecated
Convection no longer uses links. set_link will be removed in a future MORe release, it is replaced by
set_component_by_name()
andset_interface_by_name()
- set_link_by_name(link_name) ConvectionSetup [source]¶
Deprecated method
Deprecated
Convection no longer uses links. set_link_by_name will be removed in a future MORe release, it is replaced by
set_component_by_name()
andset_interface_by_name()
- set_temperature(value) ConvectionSetup [source]¶
Deprecated version of
set_general_job_settings_parameter()
Deprecated
set_convection will be removed in a future MORe release, it is replaced by
set_temperature_value()
- set_value(value) ConvectionSetup [source]¶
Sets the value of the convection
See example at the top for how to create a convection setup object
Example
>>> load_setup = load_setup.set_value(value=20)
- Returns:
self
- Return type:
- Raises:
TypeError – Raised if the supplied value is not a floating point number