create_source_block#

Icepak.create_source_block(object_name, input_power, assign_material=True, material_name='Ceramic_material', use_object_for_name=True)[source]#

Create a source block for an object.

Parameters:
object_namestr, list

Name of the object.

input_powerstr or var

Input power.

assign_materialbool, optional

Whether to assign a material. The default is True.

material_name

Material to assign if assign_material=True. The default is "Ceramic_material".

use_object_for_namebool, optional

Whether to use the object name for the source block name. The default is True.

Returns:
pyaedt.modules.Boundary.BoundaryObject

Boundary object when successful or None when failed.

References

>>> oModule.AssignBlockBoundary

Examples

>>> box = icepak.modeler.create_box([5, 5, 5], [1, 2, 3], "BlockBox3", "copper")
>>> block = icepak.create_source_block("BlockBox3", "1W", False)
pyaedt info: Block on ...
>>> block.props
{'Objects': ['BlockBox3'], 'Block Type': 'Solid', 'Use External Conditions': False, 'Total Power': '1W'}