Green operator material independent terms. Each term is stored in a
dictionary, where each pair of strain/stress components (key, str) is
associated with the Green operator material independent term evaluated
in all spatial discrete points (item, numpy.ndarray (2d or 3d)).
Cluster interaction tensors associated with the Green operator material
independent terms. Each term is stored in a dictionary (item, dict) for
each pair of material phases (key, str), which in turn contains the
corresponding matricial form (item, numpy.ndarray (2d)) associated with
each pair of clusters (key, str).
rve_dims (list[float]) – RVE size in each dimension.
regular_grid (numpy.ndarray (2d or 3d)) – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the material phase label (int) assigned to the
corresponding voxel.
material_phases (list[str]) – RVE material phases labels (str).
strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.
problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2),
2D axisymmetric (3) and 3D (4).
global_data_matrix (numpy.ndarray (2d)) – Data matrix (numpy.ndarray of shape (n_voxels, n_features_dims))
containing the required clustering features’ data to perform all
the prescribed cluster analyses.
clustering_type (dict) – Clustering type (item, {‘static’, ‘adaptive’}) of each material
phase (key, str).
phase_n_clusters (dict) – Number of clusters (item, int) associated with each material phase
(key, str).
base_clustering_scheme (dict) – Prescribed base clustering scheme (item, numpy.ndarray of shape
(n_clusterings, 3)) for each material phase (key, str). Each row is
associated with a unique clustering characterized by a clustering
algorithm (col 1, int), a list of features (col 2, list[int]) and a
list of the features data matrix’ indexes (col 3, list[int]).
eff_elastic_properties (dict, default=None) – Elastic properties (key, str) and their values (item, float)
estimated from the RVE’s elastic effective tangent modulus.
adaptive_clustering_scheme (dict) – Prescribed adaptive clustering scheme (item, numpy.ndarray of shape
(n_clusterings, 3)) for each material phase (key, str). Each row is
associated with a unique clustering characterized by a clustering
algorithm (col 1, int), a list of features (col 2, list[int]) and a
list of the features data matrix’ indexes (col 3, list[int]).
adapt_criterion_data (dict, default=None) – Clustering adaptivity criterion (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
criterion to be used and the required parameters.
adaptivity_type (dict, default=None) – Clustering adaptivity type (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
type to be used and the required parameters.
adaptivity_control_feature (dict, default=None) – Clustering adaptivity control feature (item, str) associated with
each material phase (key, str).
rve_dims (list[float]) – RVE size in each dimension.
regular_grid (numpy.ndarray (2d or 3d)) – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the material phase label (int) assigned to the
corresponding voxel.
material_phases (list[str]) – RVE material phases labels (str).
strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.
problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2),
2D axisymmetric (3) and 3D (4).
global_data_matrix (numpy.ndarray (2d)) – Data matrix (numpy.ndarray of shape (n_voxels, n_features_dims))
containing the required clustering features’ data to perform all
the prescribed cluster analyses.
clustering_type (dict) – Clustering type (item, {‘static’, ‘adaptive’}) of each material
phase (key, str).
phase_n_clusters (dict) – Number of clusters (item, int) associated with each material phase
(key, str).
base_clustering_scheme (dict) – Prescribed base clustering scheme (item, numpy.ndarray of shape
(n_clusterings, 3)) for each material phase (key, str). Each row is
associated with a unique clustering characterized by a clustering
algorithm (col 1, int), a list of features (col 2, list[int]) and a
list of the features data matrix’ indexes (col 3, list[int]).
eff_elastic_properties (dict, default=None) – Elastic properties (key, str) and their values (item, float)
estimated from the RVE’s elastic effective tangent modulus.
adaptive_clustering_scheme (dict) – Prescribed adaptive clustering scheme (item, numpy.ndarray of shape
(n_clusterings, 3)) for each material phase (key, str). Each row is
associated with a unique clustering characterized by a clustering
algorithm (col 1, int), a list of features (col 2, list[int]) and a
list of the features data matrix’ indexes (col 3, list[int]).
adapt_criterion_data (dict, default=None) – Clustering adaptivity criterion (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
criterion to be used and the required parameters.
adaptivity_type (dict, default=None) – Clustering adaptivity type (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
type to be used and the required parameters.
adaptivity_control_feature (dict, default=None) – Clustering adaptivity control feature (item, str) associated with
each material phase (key, str).
where \(\chi^{(I)}\) is the
characteristic function of the \(I\) th material cluster and
\(\boldsymbol{Y}\) is a point of the microscale reference
configuration (\(\Omega_{\mu,\,0}\)).
The detailed description of the cluster characteristic function can
be found in Section 4.3.1 of Ferreira (2022) [1].
where \(\chi^{(I)}\) is the characteristic function of the
\(I\) th material cluster,
\(\boldsymbol{\mathsf{\Phi}}^{0}\) is the reference material
Green operator (fourth-order tensor), and \(\boldsymbol{Y}\) and
\(\boldsymbol{Y'}\) are points of the microscale reference
configuration (\(\Omega_{\mu,\,0}\)).
Such a computation is required to compute the cluster interaction
tensors. More information can be found in Ferreira (2022) [2]
(see Equations (4.112) and surrounding text).
Parameters:
cluster_filter (numpy.ndarray) – Cluster discrete characteristic function in spatial domain.
gop_1_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the first
Green operator material independent term in the spatial domain
(inverse discrete Fourier transform).
gop_2_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the second
Green operator material independent term in the spatial domain
(inverse discrete Fourier transform).
gop_0_freq_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the
zero-frequency Green operator (material independent) term in the
spatial domain (inverse discrete Fourier transform).
Returns:
cit_1_integral_mf (numpy.ndarray (2d)) – Discrete integral over the spatial domain of material cluster I of
the discrete convolution between the material cluster J
characteristic function and the first Green operator material
independent term in the spatial domain (numpy.ndarray of shape
(n_comps, n_comps)).
cit_2_integral_mf (numpy.ndarray (2d)) – Discrete integral over the spatial domain of material cluster I of
the discrete convolution between the material cluster J
characteristic function and the second Green operator material
independent term in the spatial domain (numpy.ndarray of shape
(n_comps, n_comps)).
cit_0_freq_integral_mf (numpy.ndarray (2d)) – Discrete integral over the spatial domain of material cluster I of
the discrete convolution between the material cluster J
characteristic function and the zero-frequency Green operator
(material independent) term in the spatial domain.
voxels_clusters (numpy.ndarray (2d or 3d)) – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the cluster label (int) assigned to the
corresponding voxel.
Get unique clustering features indexes from clustering scheme.
Parameters:
clustering_scheme (ndarry of shape (n_clusterings, 3)) – Clustering scheme (numpy.ndarray of shape (n_clusterings, 3)). Each
row is associated with a unique clustering characterized by a
clustering algorithm (col 1, int), a list of features
(col 2, list[int]) and a list of the features data matrix’ indexes
(col 3, list[int]).
Returns:
indexes – List of unique clustering features indexes.
regular_grid (numpy.ndarray (2d or 3d)) – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the material phase label (int) assigned to the
corresponding voxel.
material_phases (list[str]) – RVE material phases labels (str).
Returns:
phase_voxel_flat_idx – Flat voxels’ indexes (item, list[int]) associated with each
material phase (key, str).
where \(\chi^{(J)}\) is the characteristic function of the
\(J\) th material cluster,
\(\boldsymbol{\mathsf{\Phi}}^{0}\) is the reference material
Green operator (fourth-order tensor), \(\boldsymbol{Y}\) and
\(\boldsymbol{Y'}\) are points of the microscale reference
configuration (\(\Omega_{\mu,\,0}\)), and
\(\boldsymbol{\zeta}\) is the frequency wave vector. The operator
\(\mathscr{F}^{-1}(\cdot)\) denotes the inverse Fourier transform
and \(\breve{(\cdot)}\) denotes a field defined in the frequency
domain.
Such a computation is required to compute the cluster interaction
tensors. More information can be found in Ferreira (2022) [3]
(see Equations (4.111) and surrounding text).
Parameters:
cluster_filter_dft (numpy.ndarray) – Cluster discrete characteristic function in frequency domain
(discrete Fourier transform).
gop_1_dft_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the first Green
operator material independent term in the frequency domain
(discrete Fourier transform).
gop_2_dft_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the second
Green operator material independent term in the frequency domain
(discrete Fourier transform).
gop_0_freq_dft_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the Green
operator zero-frequency (material independent) term in the
frequency domain (discrete Fourier transform).
Returns:
gop_1_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the
first Green operator material independent term in the spatial
domain (inverse discrete Fourier transform).
gop_2_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the
second Green operator materia independent term in the spatial
domain (inverse discrete Fourier transform).
gop_0_freq_filt_vox (dict) – Regular grid shaped matrix (item, numpy.ndarray) containing each
fourth-order matricial form component (key, str) of the convolution
between the material cluster characteristic function and the
zero-frequency Green operator (material independent) term in the
spatial domain (inverse discrete Fourier transform).
where \(\boldsymbol{\mathsf{T}}^{(I)(J)}\) is the cluster
interaction tensor (fourth-order tensor) between the \(I\) th
and \(J\) th material clusters, \(f^{(I)}\) is the volume
fraction of the \(I\) th material cluster, \(v_{\mu}\) is
the volume of the CRVE, \(\boldsymbol{Y}\) and
\(\boldsymbol{Y'}\) are points of the microscale reference
configuration (\(\Omega_{\mu,\,0}\)), \(\chi^{(I)}\) is the
characteristic function of the \(I\) th material cluster,
\(\boldsymbol{\mathsf{\Phi}}^{0}\) is the reference material
Green operator (fourth-order tensor), and \(n_{c}\) is the number
of material clusters.
The detailed description of the custer interaction tensors can
be found in Section 4.3 of Ferreira (2022) [4].
Adaptive update of cluster interaction matrix:
The cluster interaction tensors adaptive computation mode can only be
performed after at least one full computation has been performed.
A detailed description of the adaptive update of the cluster
interaction matrix can be found in Section 2.3.3 of
Ferreira et. al (2022) [5].
Parameters:
mode ({'full', 'adaptive'}, default='full') – The default full mode performs the complete computation of all
cluster interaction tensors. The ‘adaptive’ mode speeds up the
computation of the new cluster interaction tensors resulting from
an adaptive clustering characterized by adaptive_clustering_map.
adaptive_clustering_map (dict) – Adaptive clustering map (item, dict with list of new cluster labels
(item, list[int]) resulting from the refinement of each target
cluster (key, str)) for each material phase (key, str). Required in
adaptive mode, otherwise ignored.
Get clustering adaptivity criterion data of each material phase.
Returns:
adapt_criterion_data – Clustering adaptivity criterion (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
criterion to be used and the required parameters.
Get required data for clustering adaptivity output file.
Returns:
adaptivity_output – For each adaptive material phase (key, str), stores a list (item)
containing the adaptivity metrics associated with the clustering
adaptivity output file.
Get cluster interaction tensors (Green material independent terms).
Returns:
cit_x_mf – Cluster interaction tensors associated with the Green operator
material independent terms. Each term is stored in a dictionary
(item, dict) for each pair of material phases (key, str), which in
turn contains the corresponding matricial form (item,
numpy.ndarray (2d)) associated with each pair of clusters
(key, str).
Get summary of number of clusters of each material phase.
Returns:
clustering_summary – For each material phase (key, str), stores list (item) containing
the associated type (‘static’ or ‘adaptive’), the base number of
clusters (int) and the final number of clusters (int).
Get regular grid of voxels with material phase labels.
Returns:
regular_grid – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the material phase label (int) assigned to the
corresponding voxel.
Get required variables to build a clusters state based voxels array.
Returns:
material_phases (list) – CRVE material phases labels (str).
phase_clusters (dict) – Clusters labels (item, list of int) associated with each material
phase (key, str).
voxels_clusters (ndarray) – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the cluster label (int) assigned to the
corresponding voxel.
Get regular grid containing the cluster label of each voxel.
Returns:
voxels_clusters – Regular grid of voxels (spatial discretization of the RVE), where
each entry contains the cluster label (int) assigned to the
corresponding voxel.
target_clusters (list[int]) – List with the labels (int) of clusters to be adapted.
target_clusters_data (dict) – For each target cluster (key, str), store dictionary (item, dict)
containing cluster associated parameters relevant for the adaptive
procedures.
Returns:
adaptive_clustering_map – Adaptive clustering map (item, dict with list of new cluster labels
(item, list[int]) resulting from the refinement of each target
cluster (key, str)) for each material phase (key, str).
adaptive_clustering_scheme (dict) – Prescribed adaptive clustering scheme (item, numpy.ndarray of shape
(n_clusterings, 3)) for each material phase (key, str). Each row is
associated with a unique clustering characterized by a clustering
algorithm (col 1, int), a list of features (col 2, list[int]) and a
list of the features data matrix’ indexes (col 3, list[int]).
adapt_criterion_data (dict) – Clustering adaptivity criterion (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
criterion to be used and the required parameters.
adaptivity_type (dict) – Clustering adaptivity type (item, dict) associated with each
material phase (key, str). This dictionary contains the adaptivity
type to be used and the required parameters.
adaptivity_control_feature (dict) – Clustering adaptivity control feature (item, str) associated with
each material phase (key, str).