sfepy.homogenization.coefs_phononic module¶
-
class
sfepy.homogenization.coefs_phononic.
AcousticMassTensor
(name, problem, kwargs)[source]¶ The acoustic mass tensor for a given frequency.
- Returns
- selfAcousticMassTensor instance
This class instance whose evaluate() method computes for a given frequency the required tensor.
Notes
eigenmomenta, eigs should contain only valid resonances.
-
to_file_txt
= None¶
-
class
sfepy.homogenization.coefs_phononic.
AppliedLoadTensor
(name, problem, kwargs)[source]¶ The applied load tensor for a given frequency.
- Returns
- selfAppliedLoadTensor instance
This class instance whose evaluate() method computes for a given frequency the required tensor.
Notes
eigenmomenta, ueigenmomenta, eigs should contain only valid resonances.
-
to_file_txt
= None¶
-
class
sfepy.homogenization.coefs_phononic.
BandGaps
(name, problem, kwargs)[source]¶ Band gaps detection.
- Parameters
- eigensolverstr
The name of the eigensolver for mass matrix eigenvalues.
- eig_range(int, int)
The eigenvalues range (squared frequency) to consider.
- freq_margins(float, float)
Margins in percents of initial frequency range given by eig_range by which the range is increased.
- fixed_freq_range(float, float)
The frequency range to consider. Has precedence over eig_range and freq_margins.
- freq_stepfloat
The frequency step for tracing, in percent of the frequency range.
- freq_epsfloat
The frequency difference smaller than freq_eps is considered zero.
- zero_epsfloat
The tolerance for finding zeros of mass matrix eigenvalues.
- detect_funcallable
The function for detecting the band gaps. Default is
detect_band_gaps()
.- log_save_namestr
If not None, the band gaps log is to be saved under the given name.
- raw_log_save_namestr
If not None, the raw band gaps log is to be saved under the given name.
-
process_options
()[source]¶ Setup application-specific options.
Subclasses should implement this method as needed.
- Returns
- app_optionsStruct instance
The application options.
-
class
sfepy.homogenization.coefs_phononic.
DensityVolumeInfo
(name, problem, kwargs)[source]¶ Determine densities of regions specified in region_to_material, and compute average density based on region volumes.
-
class
sfepy.homogenization.coefs_phononic.
Eigenmomenta
(name, problem, kwargs)[source]¶ Eigenmomenta corresponding to eigenvectors.
- Parameters
- var_namestr
The name of the variable used in the integral.
- thresholdfloat
The threshold under which an eigenmomentum is considered zero.
- threshold_is_relativebool
If True, the threshold is relative w.r.t. max. norm of eigenmomenta.
- transformcallable, optional
Optional function for transforming the eigenvectors before computing the eigenmomenta.
- Returns
- eigenmomentaStruct
The resulting eigenmomenta. An eigenmomentum above threshold is marked by the attribute ‘valid’ set to True.
-
class
sfepy.homogenization.coefs_phononic.
PhaseVelocity
(name, problem, kwargs)[source]¶ Compute phase velocity.
-
class
sfepy.homogenization.coefs_phononic.
PolarizationAngles
(name, problem, kwargs)[source]¶ Compute polarization angles, i.e., angles between incident wave direction and wave vectors. Vector length does not matter - eigenvectors are used directly.
-
class
sfepy.homogenization.coefs_phononic.
SchurEVP
(name, problem, kwargs)[source]¶ Schur complement eigenvalue problem.
-
class
sfepy.homogenization.coefs_phononic.
SimpleEVP
(name, problem, kwargs)[source]¶ Simple eigenvalue problem.
-
sfepy.homogenization.coefs_phononic.
compute_cat_dim_dim
(coef, iw_dir)[source]¶ Christoffel acoustic tensor part of dielectric tensor dimension.
-
sfepy.homogenization.coefs_phononic.
compute_cat_dim_sym
(coef, iw_dir)[source]¶ Christoffel acoustic tensor part of piezo-coupling tensor dimension.
-
sfepy.homogenization.coefs_phononic.
compute_cat_sym_sym
(coef, iw_dir)[source]¶ Christoffel acoustic tensor (part) of elasticity tensor dimension.
-
sfepy.homogenization.coefs_phononic.
compute_eigenmomenta
(em_equation, var_name, problem, eig_vectors, transform=None)[source]¶ Compute the eigenmomenta corresponding to given eigenvectors.
-
sfepy.homogenization.coefs_phononic.
cut_freq_range
(freq_range, eigs, valid, freq_margins, eig_range, fixed_freq_range, freq_eps)[source]¶ Cut off masked resonance frequencies. Margins are preserved, like no resonances were cut.
- Returns
- freq_rangearray
The new range of frequencies.
- freq_range_marginsarray
The range of frequencies with prepended/appended margins equal to fixed_freq_range if it is not None.
-
sfepy.homogenization.coefs_phononic.
detect_band_gaps
(mass, freq_info, opts, gap_kind='normal', mtx_b=None)[source]¶ Detect band gaps given solution to eigenproblem (eigs, eig_vectors). Only valid resonance frequencies (e.i. those for which corresponding eigenmomenta are above a given threshold) are taken into account.
Notes
make freq_eps relative to ]f0, f1[ size?
-
sfepy.homogenization.coefs_phononic.
find_zero
(f0, f1, callback, freq_eps, zero_eps, mode)[source]¶ For f in ]f0, f1[ find frequency f for which either the smallest (mode = 0) or the largest (mode = 1) eigenvalue of problem P given by callback is zero.
- Returns
- flag0, 1, or 2
The flag, see Notes below.
- frequencyfloat
The found frequency.
- eigenvaluefloat
The eigenvalue corresponding to the found frequency.
Notes
Meaning of the return value combinations:
mode
flag
meaning
0, 1
0
eigenvalue -> 0 for f in ]f0, f1[
0
1
f -> f1, smallest eigenvalue < 0
0
2
f -> f0, smallest eigenvalue > 0 and -> -infty
1
1
f -> f1, largest eigenvalue < 0 and -> +infty
1
2
f -> f0, largest eigenvalue > 0
-
sfepy.homogenization.coefs_phononic.
get_callback
(mass, method, mtx_b=None, mode='trace')[source]¶ Return callback to solve band gaps or dispersion eigenproblem P.
Notes
- Find zero callbacks return:
eigenvalues
- Trace callbacks return:
(eigenvalues,)
- or
(eigenvalues, eigenvectors) (in full (dispoersion) mode)
- If mtx_b is None, the problem P is
M w = lambda w,
- otherwise it is
omega^2 M w = eta B w
-
sfepy.homogenization.coefs_phononic.
get_gap_ranges
(freq_range, gaps, kinds)[source]¶ For each (potential) band gap in gaps, return the frequency ranges of its parts according to kinds.
-
sfepy.homogenization.coefs_phononic.
get_log_freqs
(f0, f1, df, freq_eps, n_point_min, n_point_max)[source]¶ Get logging frequencies.
The frequencies get denser towards the interval boundaries.