Frequency Analysis are computed on a the whole model loaded though his Domain
.
That means that geometry, mesh, elements, material, fixations has to be defined.
Time integration, Iteration Manager, Solver Manager may not be defined.
Frequency Analysis may be conduced the same way :
Actually two Frequency Analysis Method are implemented in Metafor
Common commands (according to the fact freqAnaly is a FrequencyAnalysisMethod :
freqAnaly.setNumberOfEigenValues(nbEigenVal) freqAnaly.setSpectralShifting(spectralShifting) freqAnaly.setSymmetrizeK(True) freqAnaly.setSolver(LinearSolver) freqAnaly.save2Fafac(filename) freqAnaly.setWriteMatrix2Matlab(True) freqAnaly.setComputeErrors(True) freqAnaly.setPrec(True) freqAnaly.setMaxIte(True) freqAnaly.setVerbose(True) freqAnaly.execute() freqAnaly.setTSCLabel("EigenFrequency") freqAnaly.writeTSC() freqAnaly.getEigenValue(i)
Defining a PowerIterationsFrequencyAnalysisMethod allows to build the few first eigen values / eigen vectors (eigen vectors are intrinsiquely computed during orthogonalisation process).
freqAnaly = PowerIterationsFrequencyAnalysisMethod(domain)
The Lanczos Frequency Analysis Method benefit
freqAnaly = LanczosFrequencyAnalysisMethod(domain) freqAnaly.setInitByPowerMethod(False) freqAnaly.setGrahamSchmidt(true) freqAnaly.setLanczosSizeVSNbModesFactor(10) freqAnaly.setSymTriDiagEigenSolver(DSTE_VR)
As soon as a domain is defined (geometry, mesh, elements, materials, loadings), a frequency analysis can be defined and called using
freqAnaly.execute() freqAnaly.setTSCLabel("EigenFrequency") freqAnaly.writeTSC() freqAnaly.getEigenValue(i) freqAnaly.save2Fafac(filename)
In some particular situation, it can be interesting to compute the eigen frequencies according to the load of the Domain. A good example is the measurement of the centrifugal stiffening…
To archieve this operation, a FrequencyAnalysisValueExtractor can be defined and values can be computed at each time step of a simulation :
freqAnalyValExt = FrequencyAnalysisValueExtractor(freqAnaly) freqAnalyValExt.setSaveFaFac(False)
(be care to the potential CPU cost of this operation as FrequencyAnalysis will be computed at each time step)
FrequencyAnalysisValueExtractor is a common ValueExtractor
, so values can be visualized during computation, used as TSC, … refer to Saving history curves to disk and Viewing curves in real time for more informations on how to use ValueExtractor
.
In some other case, user may only want the eigen values at the end of a complex simulation. FrequencyAnalysisObjectiveFunction is done for this
freqAnalyFObj = FrequencyAnalysisObjectiveFunction(no, freqAnaly) freqAnalyFObj.saveToFaFac(False)
refer to Objective functions for more information on how to use Objective Functions
try: win = VizWin() for i in range(domain.getInteractionSet().size()): win.add(domain.getInteractionSet().getInteraction(i)) for i in range(nbEigenVal): freqAnaly.showEigenVector(i) win.update() print( "Eigen Vector ", i , "EigenValue = ", freqAnaly.getEigenValue(i) ) input("press enter to continue") except NameError: pass