cratepy.ioput.readprocedures.read_phase_clustering

read_phase_clustering(file, file_path, keyword, n_material_phases, material_properties)[source]

Read (base) number of clusters associated with each material phase.

The specification of the data associated with the material phases (base) number of clusters has the following input data file syntax:

Number_of_Clusters
< phase_id > < n_clusters >
< phase_id > < n_clusters >
...

where phase_id (int) is the material identifier and n_clusters is the corresponding (base) number of clusters.


Parameters:
  • file (file) – Data file.

  • file_path (str) – Data file path.

  • keyword (str) – Keyword.

  • n_material_phases (int) – Number of material phases.

  • material_properties (dict) – Constitutive model material properties (key, str) values (item, {int, float, bool}).

Returns:

phase_n_clusters – Number of clusters (item, int) associated with each material phase (key, str).

Return type:

dict