How to export FDE mode data so it can be imported as FDTD source?

modeexport
fdtd
sourceimport
fde

#1

Continuing the discussion from Multimode source as an input:

Is it possible to calculate mode profiles (e.g. for aforementioned 50 modes) in MODE Solutions, save them and later use as input source in FDTD Solutions?

EDIT:
I have already found a solution to the additional question - FDE Data Export.

EDIT:
I managed to export mode profiles from FDE in MODE Solutions (both to .mat and .ldf). Now I tried to import them as a new source (Sources -> Import ->Edit object -> Import Source). There is no option to load .ldf file and even when I chose it, nothing happened - instead there is possibility to load .fld files. When I tried to load .mat file with modes, I got error as below:

So, the question is still open - how can I import to FDTD Solutions the mode profiles I have obtained with MODE Solutions?
[/quote]


#2

It is possible, but you need to save the mode profile data into ASAP interface file(*.fld). This can be done from the DECK in the Eigensolver Analysis window in two steps.

Step #1 is to add the mode(s) of your interest in the DECK:

Step #2 is to save the mode from the DECK into fld file:

This will save the mode profile data into a format that is accepted by the import source in FDTD.

You can also use commands “asapexport” and “asapimport” to accomplish the same without GUI.

The reason why you received the error is because you used Data Export option in the modal analysis tab that allows you to export various data sets, but it does not have the FDTD import source format.


#3

Following your advice I tried to use “asapexport” and then I got something like this:

asapexport(“global_mode1”,1,“global_1”);
Error: prompt line 1: in asapexport: the dimensions of the data in the file
are not compatible with the axis lengths.

I do not quite understand this error, as I want to create a new file…
The same happens when I tried saving using a file browser window.


#4

This error is related to the data dimensions. Make sure that the FDE solver region is oriented in XY plane(z normal).


#5

Thank you for the solution!

And what about if I wanted to use EME solver? As far as I know it needs to be in x-direction. Will I have to change the orientation of the structure each time I want to use FDE/EME?


#6

If you wish to use *.fld file, then you would have to rotate the structure because this format requires it to be in the XY plane and EME propagates in x direction. Nevertheless, you could save the mode profiles in the *.mat file in FDE as well as in EME.

In FDE, you can get the results from the result window and save them to matlab file using matlabsave(); command:

In EME, you can get the mode profiles from the EME port:

or save data from a monitor into matlab file:

If you manipulate the data before saving them into matlab file, make sure that they have correct structure.