-
Notifications
You must be signed in to change notification settings - Fork 0
2. Classes
init
__init__(self, stages):
self.components = stages["components"]
self.stage_temps = stages["stage_details"]
self.total_power = stages["total_power"]
self.stages = list(self.components.keys())
get_stage(self, name)
Description:
Returns a Stage object for the specified stage name.
Arguments:
- name (str): The name of the stage to search for.
Returns:
- Stage: An object containing the stage's properties and methods.
get_component(self, name, stage=None)
Description:
Returns a Component_Inspect object for the specified component name and stage. If stage is None, it searches all stages for the component and returns the first one found.
Arguments:
- name (str): The name of the component to search for.
- stage (str, optional): The name of the stage to search in. Defaults to None.
Returns: Component_Inspect: An object containing the component's properties and methods.
update_all_powers(self)
Description:
Updates the power for all components in the thermal model. This method iterates through all components in each stage and calculates their power based on the current stage temperatures.
optimize(self, optimization_points: int = 10)
Description:
Optimizes a VCS cooled thermal model.
Arguments:
- components_input (dict): The input component details.
- stage_details_input (dict): The input stage details.
- num_points (int): The number of points to sample for VCS temperatures.
Returns:
- details (dict): The updated component details with power calculations.
- output_data (dict): The output data containing stage details and total power.
- grids (list): A list containing the VCS2 grid, VCS1 grid, and SumVarArr.
plot_stage(self, stage_name, streamlit=False)
Description:
Plot the thermal model for a specific stage.
Arguments:
- stage_name (str): The name of the stage to plot.
- streamlit (bool, optional): Whether to use Streamlit for plotting. Defaults to False.
Returns:
- Figure: The plotted figure.
init
__init__(self, model, component, stage)
calculate_power(self)
Description:
Calculate the power function for the given component.
Arguments:
- self (Component_Inspect): The component object for which to calculate power. Returns:
- power (float): The calculated power per unit.
Description:
Plot the thermal conductivity of the component. This method uses the component's properties to determine the appropriate plotting method. Returns:
- integral_plot (fig): The plotted figure.