chrono::modal::ChModalSolveDamped Class Reference

Description

Class for computing eigenvalues/eigenvectors for the DAMPED constrained system.

It dispatches the settings to some solver of ChQuadraticEigenvalueSolver class. It handles multiple runs of the solver if one wants to find specific ranges of frequencies. Finally it guarantees that eigenvalues are sorted in the appropriate order of increasing eigenvalue modulus.

#include <ChEigenvalueSolver.h>

Collaboration diagram for chrono::modal::ChModalSolveDamped:

Public Member Functions

 ChModalSolveDamped (int n_lower_modes, double base_freq=1e-5, int max_iters=500, double mtolerance=1e-10, bool mverbose=false, const ChQuadraticEigenvalueSolver &asolver=ChQuadraticEigenvalueSolverNullspaceDirect())
 Constructor for the case of N lower modes. More...
 
 ChModalSolveDamped (std::vector< ChFreqSpan > mfreq_spans, int max_iters=500, double mtolerance=1e-10, bool mverbose=false, const ChQuadraticEigenvalueSolver &asolver=ChQuadraticEigenvalueSolverNullspaceDirect())
 Constructor for the case of multiple spans of frequency analysis ex. More...
 
virtual int Solve (const ChSparseMatrix &M, const ChSparseMatrix &R, const ChSparseMatrix &K, const ChSparseMatrix &Cq, ChMatrixDynamic< std::complex< double >> &eigvects, ChVectorDynamic< std::complex< double >> &eigvals, ChVectorDynamic< double > &freq, ChVectorDynamic< double > &damp_ratios) const
 Solve the constrained eigenvalue problem (-wsquare*M + K)*x = 0 s.t. More...
 
virtual int Solve (ChAssembly &assembly, ChMatrixDynamic< std::complex< double >> &eigvects, ChVectorDynamic< std::complex< double >> &eigvals, ChVectorDynamic< double > &freq, ChVectorDynamic< double > &damp_ratios) const
 Solve the constrained eigenvalue problem (-wsquare*M + K)*x = 0 s.t. More...
 

Protected Attributes

std::vector< ChFreqSpan > freq_spans
 
double tolerance = 1e-10
 tolerance for the iterative solver.
 
int max_iterations = 500
 upper limit for the number of iterations. If too low might not converge.
 
bool verbose = false
 turn to true to see some diagnostic.
 
const ChQuadraticEigenvalueSolvermsolver
 

Constructor & Destructor Documentation

◆ ChModalSolveDamped() [1/2]

chrono::modal::ChModalSolveDamped::ChModalSolveDamped ( int  n_lower_modes,
double  base_freq = 1e-5,
int  max_iters = 500,
double  mtolerance = 1e-10,
bool  mverbose = false,
const ChQuadraticEigenvalueSolver asolver = ChQuadraticEigenvalueSolverNullspaceDirect() 
)
inline

Constructor for the case of N lower modes.

Ex. ChModalSolveDamped(7); finds first 7 lowest damped modes, using default settings (i.e. the ChQuadraticEigenvalueSolverNullspaceDirect solver). Ex. ChModalSolveDamped(5, 1e-5, 500, 1e-10, false, ChQuadraticEigenvalueSolverKrylovSchur()); finds first 5 lowest damped modes using the ChQuadraticEigenvalueSolverKrylovSchur() solver.

Parameters
n_lower_modesn of lower modes
base_freqfrequency to whom the nodes are clustered. Use 1e-5 to get n lower modes. As sigma in shift&invert, as: sigma = -pow(base_freq * CH_2PI, 2). Too small gives ill conditioning (no convergence). Too large misses rigid body modes.
max_itersupper limit for the number of iterations. If too low might not converge.
mtolerancetolerance for the iterative solver.
mverboseturn to true to see some diagnostic.
asolversolver to use (default: direct, null-space based)

◆ ChModalSolveDamped() [2/2]

chrono::modal::ChModalSolveDamped::ChModalSolveDamped ( std::vector< ChFreqSpan >  mfreq_spans,
int  max_iters = 500,
double  mtolerance = 1e-10,
bool  mverbose = false,
const ChQuadraticEigenvalueSolver asolver = ChQuadraticEigenvalueSolverNullspaceDirect() 
)
inline

Constructor for the case of multiple spans of frequency analysis ex.

ChModalSolveDamped({{10,1e-5,},{5,40}} , 500); finds first 10 lower modes, then 5 modes closest to 40 Hz, etc., using multiple runs of the solver. Closest mean that some could be higher than 40Hz, others can be lower. Another example: suppose you want the 5 lowest modes, then you also are interested in 1 high frequency mode whose frequency is already know approximately, ex. 205 Hz, then you can do ChGeneralizedEigenvalueSolverGeneric({{5,1e-5,},{1,205}}, ...). Note about overlapping ranges: if n-th run finds frequencies up to X Hz, and the (n+1)-th run finds some frequency with Y Hz where Y < X, then such Y mode(s) is discarded.

Parameters
mfreq_spansvector of {nmodes,freq}_i , will provide first nmodes_i starting at freq_i per each i vector entry
max_itersupper limit for the number of iterations. If too low might not converge.
mtolerancetolerance for the iterative solver.
mverboseturn to true to see some diagnostic.
asolversolver to use (default: direct, null-space based)

Member Function Documentation

◆ Solve() [1/2]

int chrono::modal::ChModalSolveDamped::Solve ( ChAssembly assembly,
ChMatrixDynamic< std::complex< double >> &  eigvects,
ChVectorDynamic< std::complex< double >> &  eigvals,
ChVectorDynamic< double > &  freq,
ChVectorDynamic< double > &  damp_ratios 
) const
virtual

Solve the constrained eigenvalue problem (-wsquare*M + K)*x = 0 s.t.

Cq*x = 0 Return the number of found modes, where n is not necessarily n_lower_modes (or the sum of ChFreqSpan::nmodes if multiple spans)

Parameters
assemblyinput M matrix, n_v x n_v
eigvectsoutput matrix n x n_v with eigenvectors as columns, will be resized
eigvalsoutput vector with n eigenvalues, will be resized.
freqoutput vector with n frequencies [Hz], as f=w/(2*PI), will be resized.
damp_ratiosoutput vector with n damping ratios, will be resized.

◆ Solve() [2/2]

int chrono::modal::ChModalSolveDamped::Solve ( const ChSparseMatrix M,
const ChSparseMatrix R,
const ChSparseMatrix K,
const ChSparseMatrix Cq,
ChMatrixDynamic< std::complex< double >> &  eigvects,
ChVectorDynamic< std::complex< double >> &  eigvals,
ChVectorDynamic< double > &  freq,
ChVectorDynamic< double > &  damp_ratios 
) const
virtual

Solve the constrained eigenvalue problem (-wsquare*M + K)*x = 0 s.t.

Cq*x = 0 Return the n. of found modes, where n is not necessarily n_lower_modes (or the sum of ChFreqSpan::nmodes if multiple spans)

Parameters
Minput M matrix, n_v x n_v
Rinput R matrix, n_v x n_v
Kinput K matrix, n_v x n_v
Cqinput Cq matrix of constraint jacobians, n_c x n_v
eigvectsoutput matrix n x n_v with eigenvectors as columns, will be resized
eigvalsoutput vector with n eigenvalues, will be resized.
freqoutput vector with n frequencies [Hz], as f=w/(2*PI), will be resized.
damp_ratiosoutput vector with n damping ratios, will be resized.

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_modal/ChEigenvalueSolver.h
  • /builds/uwsbel/chrono/src/chrono_modal/ChEigenvalueSolver.cpp