Subpackage dimension_2
heatrapy.dimension_2.objects.single module
Contains the class single_object.
Used to compute single two-dimensional system models.
- class heatrapy.dimension_2.objects.single.SingleObject(amb_temperature, material='Cu', dx=0.01, dy=0.01, dt=0.1, size=(10, 10), file_name=None, boundaries=(0, 0, 0, 0), Q=[], Q0=[], initial_state=False, materials_path=False, draw=['temperature', 'materials'], draw_scale=None)[source]
Bases:
objectSingle_object class.
This class solves numerically the two-dimensional heat conduction equation.
- activate(initial_point, final_point, shape='square')[source]
Activation of the material.
Activates a given piece of material. If shape is ‘square’, then the initial_point is the tuple (x,y) of the bottom left point and the final_point is the tuple (x,y) of the top right point. If the shape is ‘circle’, the initial_point is the tuple (x,y) of the center of the circle and final_point is its radius.
- change_material(shape, material, initial_point, length, state=False)[source]
Material change.
Changes the material of a given piece of the background material. If shape is ‘square’, then the initial_point is the tuple (x,y) of the bottom left point and the length is the tuple (x,y) of the length. If the shape is ‘circle’, the initial_point is the tuple (x,y) of the center of the circle and length is its radius.
- change_power(shape, power_type, initial_point, final_point, power)[source]
Power change.
Changes the power matrix of the thermal object. If shape is ‘square’, then the initial_point is the tuple (x,y) of the bottom left point and the final_point is the tuple (x,y) of the top right point. If the shape is ‘circle’, the initial_point is the tuple (x,y) of the center of the circle and final_point is its radius. power is the value of the power to add, and power_type is the type of power to be introduced, which has the value ‘Q’ if it is temperature dependent and ‘Q0’ if it is temperature independent.
- compute(time_interval, write_interval, solver='explicit_k(x)', verbose=True)[source]
Compute the thermal process.
Computes the system for time_interval, and writes into the file_name file every write_interval time steps. Two different solvers can be used: ‘explicit_general’ and ‘explicit_k(x)’. If verbose = True, then the progress of the computation is shown.
- deactivate(initial_point, final_point, shape='square')[source]
Deactivation of the material.
Deactivates a given piece of material. If shape is ‘square’, then the initial_point is the tuple (x,y) of the bottom left point and the final_point is the tuple (x,y) of the top right point. If the shape is ‘circle’, the initial_point is the tuple (x,y) of the center of the circle and final_point is its radius.
heatrapy.dimension_2.objects.system module
Contains the classes system_objects and single_object.
Used to compute two-dimensional thermal objects
- class heatrapy.dimension_2.objects.system.SystemObjects(number_objects=2, materials=('Cu', 'Cu'), objects_length=((10, 10), (10, 10)), amb_temperature=293, dx=0.01, dy=0.01, dt=0.1, file_name=None, initial_state=False, boundaries=((0, 0, 0, 0), (0, 0, 0, 0)), materials_path=False)[source]
Bases:
objectSystem_objects class.
This class creates a system of 2D thermal objects, establishes contact between them and computes the respective thermal processes.
- change_boundaries(object_id, boundaries)[source]
Change boundaries.
Changes the boundaries variable of object_id.
- compute(time_interval, write_interval, solver='explicit_k(x)', verbose=True)[source]
Compute the thermal process.
Computes the system for time_interval, and writes into the file_name file every write_interval time steps. Two different solvers can be used: ‘explicit_general’ and ‘explicit_k(x)’. If verbose = True, then the progress of the computation is shown.