Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Material Data entering into COMSOL from LUMERICAL

Bhavyabhushan Yadav A.V

Please login with a confirmed email address before reporting spam

Hi,

I started using COMSOL recently, and whenever we need to add material data to it, for example, the permittivity as function of lambda we must upload an xl file with a table containing the material data.

Previously i used to use LUMERICAL FDTD tool for simulation, and it has a wealth of material data available in it.

I thought it would make my task simpler to just export the material data from LUMERICAL FDTD and use it in comsol rather than creating tables for every new material i use on COMSOL. But, the problem is, in LUMERICAL FDTD when i export the material data it can only output a file in .mdf format. Can you suggest me a easy way to convert this file into a usable format in COMSOL, it will save a lot of time for me to carry out my simulation.

2 Replies Last Post 12.11.2014, 08:20 GMT-5
Bhavyabhushan Yadav A.V

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30.05.2014, 15:20 GMT-4
I found a easier way to do it.

refractiveindex.info website has material data that can be exported into text file.
I found a easier way to do it. refractiveindex.info website has material data that can be exported into text file.

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 12.11.2014, 08:20 GMT-5
Hello Dear,

You do not need to read .mdf file.
Use commands: getindex, and getfdtdindex in .lsf file of Lumerical
to extract material from Lumerical into text files.

Here is the .lsf file for this purpose:

material="Ag (Silver) - Palik (0-2um)";
fmin=100e12; #100THz
fmax=150e12; #150THz
f=linspace(fmin,fmax,500);

n_exp=getindex(material,f);
n_FDTD=getfdtdindex(material,f,fmin,fmax);

eps_exp = n_exp^2;
eps_FDTD= n_FDTD^2;

file1=material+"(raw).txt";
file2=material+"(FDTD).txt";

for (i=1:length(f)) {

write(file1,num2str(f(i)/1e12)+" "+num2str(real(eps_exp(i)))+" "+num2str(imag(eps_exp(i))));

write(file2,num2str(f(i)/1e12)+" "+num2str(real(eps_FDTD(i)))+" "+num2str(imag(eps_FDTD(i))));
}

The text files, have 3 columns, one for frequency, the other 2 for real and imaginary parts of epsilon.
You need to convert these 3 column files to 2 column files for entering data into into Comsol. Comsol interpolation function accepts text files of 2 columns only, one column is frequency the other column should either be real or imaginary part of epsilon.

Hope this helps.
Best,
Solmaz
Hello Dear, You do not need to read .mdf file. Use commands: getindex, and getfdtdindex in .lsf file of Lumerical to extract material from Lumerical into text files. Here is the .lsf file for this purpose: material="Ag (Silver) - Palik (0-2um)"; fmin=100e12; #100THz fmax=150e12; #150THz f=linspace(fmin,fmax,500); n_exp=getindex(material,f); n_FDTD=getfdtdindex(material,f,fmin,fmax); eps_exp = n_exp^2; eps_FDTD= n_FDTD^2; file1=material+"(raw).txt"; file2=material+"(FDTD).txt"; for (i=1:length(f)) { write(file1,num2str(f(i)/1e12)+" "+num2str(real(eps_exp(i)))+" "+num2str(imag(eps_exp(i)))); write(file2,num2str(f(i)/1e12)+" "+num2str(real(eps_FDTD(i)))+" "+num2str(imag(eps_FDTD(i)))); } The text files, have 3 columns, one for frequency, the other 2 for real and imaginary parts of epsilon. You need to convert these 3 column files to 2 column files for entering data into into Comsol. Comsol interpolation function accepts text files of 2 columns only, one column is frequency the other column should either be real or imaginary part of epsilon. Hope this helps. Best, Solmaz

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.