pythermica package
Submodules
pythermica.analyse_nwk module
- pythermica.analyse_nwk.analyse_GL_nwk_data(filename_gl, list_of_nodes_numbers, list_of_nodes_names)[source]
- read the gl.nwk file and generate the relation matrix,
with the same order as the list_of_nodes_numbers
- Args:
filename_gl (str): filename of the *gl.nwk to process list_of_nodes_numbers (list): list of all the node numbers list_of_nodes_names (list): ist of the name of each node,
with the same order as list_of_nodes_numbers
- Returns:
mat_GL (np.array): the coefficient matrice with GL links between each nodes
- pythermica.analyse_nwk.analyse_GR_nwk_data(filename_gr: str, list_of_nodes_numbers: list, list_of_nodes_names: list)[source]
- read the gr.nwk file and generate the relation matrix,
with the same order as the list_of_nodes_numbers
- Args:
filename_gr (str): filename of the *gr.nwk to process list_of_nodes_numbers (list): list of all the node numbers list_of_nodes_names (list): ist of the name of each node,
with the same order as list_of_nodes_numbers
- Returns:
mat_GR (np.array): the coefficient matrice with GL links between each nodes
- pythermica.analyse_nwk.extract_nodes(filename_nod)[source]
Read the *.od.nwk file and generate the list of all nodes and their names
- Args:
filename_nod (str): file name of the results in *.nod.nwk
- Returns:
list_of_nodes_numbers [list]: list of all the node numbers, ordered
- list_of_nodes_names [list]: list of the name of each node,
with the same order as list_of_nodes_numbers
- pythermica.analyse_nwk.generate_correlation_matrixes(list_mats, list_node_names, list_titles, use_log=True, save_fig=False, filename='', cmap='afmhot_r')[source]
creat a Matrice figure of the node coefficients
- Args:
list_mats (list of np.array): list of the coefficient matrices list_node_names (list): list of the node names, needs one for each node list_titles (list): list of the subplot titles, coerrespondes to list_mats use_log (bool, optional): if True, then compute the log10 of the matrice before ploting . Defaults to True. save_fig (bool, optional): if True, then save the figure on a PNG file. Defaults to False. filename (str, optional): name of the figure file, used if save_fig. Defaults to “”.
- Returns:
fig, axarr [matplotlib.Figure and Axies]: the matplotlig objects
- pythermica.analyse_nwk.get_all_dict_of_gb_lines(filename_gb, list_of_nodes_numbers, index_lines_with_new_node, lines_with_new_node)[source]
open the file and read all the coefficients
- pythermica.analyse_nwk.get_nth_max_coupling(mat, list_of_nodes_names, n=10)[source]
Read the matrice and print the biggest elements
- Args:
mat (numpy.array): the coefficients matrix list_of_nodes_names (list): the list of names n (int, optional): number of maximum element to print. Defaults to 10.
- pythermica.analyse_nwk.get_useful_files(root)[source]
Look for the useful fils in a folder
- Args:
root (str): relative or absolute name of the folder
pythermica.hdf5_process module
pythermica.plot_variables module
Created on Wed Jun 9 17:39:13 2021
@author: Zineb Bouaoudate
- pythermica.plot_variables.figure_over_nodes(therm_results, temperatures, times, n_orbits, path_list, case_names, nodes_to_process=['/Powercard P60', '/Printed Circuits', '/Transponders (1)', '/Batteries'], path_root='./', name_yaxis='Temperature', filename_prefix='')[source]
generate a bunch of figures to compare simulations
pythermica.pythermica module
- class pythermica.pythermica.Thermica(path, verbose=True)[source]
Bases:
objectMain class to analyse the simulation results
- get_filenames(type='none', sort_by='name')[source]
general fonction to get the filenames depending of the type of results wanted
- get_internal_dissipation()[source]
return the value in W of the internal dissiabation for each node (each mesh cell)
- names_unique
list of the names used to label the nodes
- nodes_per_names
list of the lists of the nodes for each unique names
- nodes_value
list of the node value, order in the same way as the temperatures
- path
path were the simulation results are stored
- process_model_nodes()[source]
The nodes are accessible, but this model is meat to understand better their information
- read_temperature_results(groupname='Results', subgroup='Thermal', datasetname='Temperatures')[source]
Read the *.temp.h5 data file according to the group, subgroup and dataset name
- Args:
- groupname (str): name of the groupe, from
[“Model”, “Posther”n “Results”, “Run Info”, “Time”]. Defautl is “Results”
- subgroup (str): name of the subgroup. If Group is “Results”, options are
[“Couplings”, “Electric”, “Outgassing”, “Properties”, “Thermal”, “Variables”]. Default is Thermal
- datasetname (str): name of the DataSet. If Subgroup is “Thermal”, options are
[“Albedo fluxes”, “Internal dissipations”, “Planet IR fluxes”, “Residual fluxes”, “Solar fluxes”, “Temperatures”]. Default is “Temperatures”
- Returns:
[type]: [description]
Module contents
Top-level package for pythermica.