computeBeam2ModeCoupling.py

This analyzer convolves a beam current with the dominant mode frequency so you can tell how much your beam is coupling to a high-power microwave device. Inputs are the name of the current density field representing the particle beam, the directional component to couple, and the frequency of the mode that is going to be coupled to. The start time is also specified in order to compute the coupling after any transient time.

-s <simname>, --simulationName=<simname>

(string, required)

<simname> is the name of the simulation to be analyzed. The file extension should NOT be included in this text field.

-j <curdenfield>, --jName=<curdenfield>

(string, required)

<curdenfield> is the name of the current density field to analyze.

-c <comp>, --component=<comp>

(int, required)

<comp> is the component 0,1,or 2 of the current density field to analyze.

-f <freq>, --frequency=<freq>

(float, required)

Replace <freq> with the frequency to be analyzed.

-t <time>, --startTime=<time>

(float, required)

Replace <time> with the start time of the analysis.

-w, --overwrite

(flag)

Whether a dataset or group should be overwritten if it already exists.

Output

This analyzer prints the coupling coefficients to the screen as well as writing them out to a text file namd I1.txt.

If you are running this analyzer from the UI, and the file I1.txt exists, then it will be overwritten each time the analyzer is run, unless you uncheck the Overwrite Existing Files box near the bottom of the Analysis Results pane.

If you are running the analyzer from the command line, the dataset will not be overwritten unless the -w, or --overwrite flag is specified on the command line.

The results of your analyzer may not be written into the output file if you have not specified the overwrite option to be True.