Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:frequencyanalysis:use

HowTo

General Consideration

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 :

  • on a domain not loaded
  • on a loaded domain
  • during the load of the domain

FrequencyAnalysisMethod

Actually two Frequency Analysis Method are implemented in Metafor

  • a Power Iterations Frequency Analysis Method
  • a Lanczos Frequency Analysis Method (the most efficient one)

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)    

PowerIterationsFrequencyAnalysisMethod

Defining a PowerIterationsFrequencyAnalysisMethod allows to build the few first eigen values / eigen vectors (eigen vectors are intrinsiquely computed during orthogonalisation process).

    freqAnaly = PowerIterationsFrequencyAnalysisMethod(domain)    

LanczosFrequencyAnalysisMethod

The Lanczos Frequency Analysis Method benefit

    freqAnaly = LanczosFrequencyAnalysisMethod(domain)
    freqAnaly.setInitByPowerMethod(False)
    freqAnaly.setGrahamSchmidt(true)
    freqAnaly.setLanczosSizeVSNbModesFactor(10)
    freqAnaly.setSymTriDiagEigenSolver(DSTE_VR)

Direct Use

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)    

FrequencyAnalysisValueExtractor

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.

FrequencyAnalysisObjectiveFunction

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

Vizualisation of eigen modes

  try:  
        win = VizWin()
        for i in range(domain.getInteractionSet().size()):
            win.add(domain.getInteractionSet().getInteraction(i))
        domain.setAnalysis(freqAnaly);
        for i in range(nbEigenVal):
            freqAnaly.showEigenVector(i)
            win.update()
            print "Eigen Vector ", i , "EigenValue = ", freqAnaly.getEigenValue(i)
            raw_input("press enter to continue")
    except NameError:
        pass
doc/user/frequencyanalysis/use.txt · Last modified: 2018/01/26 10:57 by papeleux