FDM

FDM class:

Python class, available in the file share/FDM.py file, that provides an interface to the filter diagonalization method [WC08] for extracting eigenmodes and their frequencies from time-domain data. In [ACWB09], we validate the method and demonstrate its accuracy.

FDM methods

__init__ (self, prefix, fieldName, beginDump, endDump)

Initialize the FDM object. Here prefix is the path to the data files, up to and excluding the underscore preceding the dataset name. fieldName is the name of the field to analyze to obtain frequencies. beginDump and endDump are the first and one greater than the last dump numbers to use.

setPointsRandom (self, npts)

Select npts random field points to use in the analysis. Components will also be chosen randomly.

setPointsUniform (self, npts, component = None)

Here, npts is a tuple giving the number of points to use in each spatial direction; points will be placed on a uniform grid. If component (an integer) is given, only that component will be used. If component is omitted, the component will be chosen from among all field components in a round-robin fashion.

readAndCompute (self)

This reads the data specified and performs the bulk of the FDM analysis. However, computeModes must be called to compute a requested number of modes.

computeModes (self, nmodes)

This computes the (complex) frequencies of nmodes modes.

constructModes (self, fieldName, compl = real)

Construct the field fieldName for the previously computed modes. compl can be either real or imag. Eigenmode fields will be written to files named Eigenmode_*fieldName*[I]_modenum.h5 in the same directory as the data. The letter I is appended to the field name for imaginary fields, and modenum is the mode index, starting with 0, ordered from low to high frequency.

displayModes (self)

Display the computed mode information in a convenient format. This gives the number of the mode, the frequency, the inverse Q and the SVD value which allows the user to understand where the reliable mode calculations stop.

Example use of FDM

import FDM

extr = FDM.FDM("modeExtract2s", "elecField", 2, 14)
extr.setPointsUniform((10, 10), None)
extr.readAndCompute()
extr.computeModes(2)
extr.constructModes("elecField")
extr.displayModes()