Description and context
Cable Thermal Model supports circuits with pipes. These pipes can be filled with either water or air. However, the pipe material is not parametrizable. Its thermal properties are hardcoded and based on HDPE material properties. In reality, pipes can be made of other materials than HDPE, such as PVC. This issue aims to allow selection of different pipe materials in the model.
Feature design
The proposed way to implement this feature consists of the following steps.
- Create a new Enum class
PipeMaterial in the enum_classes_cable.py module specifying the materials a pipe can be made of. This class should at least contain the options PE (pcPE) and PVC (pcPVC).
- Add any missing material properties to
material_properties.csv.
- Add the pipe material to the
PipeInputSchema.
- Create a new attribute
pipe_material_df of the Pipe class containing the thermal properties of the pipe material. Add logic to the __init__ method of the Pipe class that reads the thermal properties from material_properties.csv and stores it in a new attribute pipe_material_df of the Pipe class containing the thermal properties of the pipe material. This logic could also be moved to a private setter method that gets called in Pipe.__init__.
- Adjust the logic in
FDCable.get_cable_copy_with_pipe so that the specified material properties are used, instead of the harcoded ones.
Update documentation and tests
As with every change to the code, make sure that documentation is up to date and that the functionality is tested.
Description and context
Cable Thermal Model supports circuits with pipes. These pipes can be filled with either water or air. However, the pipe material is not parametrizable. Its thermal properties are hardcoded and based on HDPE material properties. In reality, pipes can be made of other materials than HDPE, such as PVC. This issue aims to allow selection of different pipe materials in the model.
Feature design
The proposed way to implement this feature consists of the following steps.
PipeMaterialin theenum_classes_cable.pymodule specifying the materials a pipe can be made of. This class should at least contain the optionsPE(pcPE) andPVC(pcPVC).material_properties.csv.PipeInputSchema.pipe_material_dfof thePipeclass containing the thermal properties of the pipe material. Add logic to the__init__method of thePipeclass that reads the thermal properties frommaterial_properties.csvand stores it in a new attributepipe_material_dfof thePipeclass containing the thermal properties of the pipe material. This logic could also be moved to a private setter method that gets called inPipe.__init__.FDCable.get_cable_copy_with_pipeso that the specified material properties are used, instead of the harcoded ones.Update documentation and tests
As with every change to the code, make sure that documentation is up to date and that the functionality is tested.