Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Wavelength Sweep with parameters from text file

Please login with a confirmed email address before reporting spam

Hi

I m a beginner in COMSOL. My structure is shown in picture. Its is Au-GaAs-Air structure from bottom to top (2D). Simply I can brief out my objectives in following steps.

1) Have refractive index with respect to each wavelength in text file.
2) How to input those parameters?
3) How to do Wavelength sweep? for ex between 800nm-1200nm.

It would be really helpful if anybody could help me.


6 Replies Last Post 13.11.2013, 20:50 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2013, 03:08 GMT-5
I am not using 4.3, but in 3.5 you can use option>function to import data from text file to comsol. and in solving the problem use "parametric" (you can define the range of spectrum there)!
I am not using 4.3, but in 3.5 you can use option>function to import data from text file to comsol. and in solving the problem use "parametric" (you can define the range of spectrum there)!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2013, 03:26 GMT-5
look at this discussion:
www.comsol.com/community/forums/general/thread/5315/
look at this discussion: http://www.comsol.com/community/forums/general/thread/5315/

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2013, 03:41 GMT-5
Hi Maha

Thanks for your reply. Actually i tried import GaAs refractive index data from txt files (real and imaginary parts with respect to wavelength and named respective file as real and img ) using interpolation function from Global definitions. When I try to define Relative permittivity in GaAs as "real(lambda)-j*img(lambda)" but it didnt work.

For reference how I did to import txt files, I tried based on this tutorial - www.youtube.com/watch?v=DkY4vaKo72w

And also you had seen my structure as shown in attachment. Actually I want to use Plane wave source at GaAs but not at Gold. Using port , I think it not possible to define the Planewave at GaAs. Is there any possible solution
Hi Maha Thanks for your reply. Actually i tried import GaAs refractive index data from txt files (real and imaginary parts with respect to wavelength and named respective file as real and img ) using interpolation function from Global definitions. When I try to define Relative permittivity in GaAs as "real(lambda)-j*img(lambda)" but it didnt work. For reference how I did to import txt files, I tried based on this tutorial - https://www.youtube.com/watch?v=DkY4vaKo72w And also you had seen my structure as shown in attachment. Actually I want to use Plane wave source at GaAs but not at Gold. Using port , I think it not possible to define the Planewave at GaAs. Is there any possible solution

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2013, 20:55 GMT-5
Hi Vasanthan,
Are you sure that you defined real and imaginary part of GaAs as "real(lambda)-j*img(lambda)"????
in matlab "real" and "img" has their own meaning!!! you can not use them as a definition to another parameter. You should name your file (.txt file) correctly. e.g. GaAs. Then in global expression call data! name:real_GaAs, definition: GaAs(wavelength). And in a separate .txt file imaginary parts!
You can set your port in the lower boundary. What's the matter?! I think you want to see the effect of gold nano particle! you should use "pair" command to make a port where you want.
Hi Vasanthan, Are you sure that you defined real and imaginary part of GaAs as "real(lambda)-j*img(lambda)"???? in matlab "real" and "img" has their own meaning!!! you can not use them as a definition to another parameter. You should name your file (.txt file) correctly. e.g. GaAs. Then in global expression call data! name:real_GaAs, definition: GaAs(wavelength). And in a separate .txt file imaginary parts! You can set your port in the lower boundary. What's the matter?! I think you want to see the effect of gold nano particle! you should use "pair" command to make a port where you want.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.11.2013, 21:37 GMT-5
HI Maha

Thanks for your reply.

Actually for understanding I said as real and img. But actually Imported real part (n) of GaAs as txt file and named it as reGaAs and similarly imaginary part as imgGaAs. I think this naming will be no problem. I imported this txt file by right clicking Global definitions and from there Functions-Interpolation.

(For clear visual of structure check the attachment. I made few changes in structure design and kindly find in attachments.)

Generally I simplify my Simulation idea as you refer my Au-GaAs-Air structure:

1) To obtain Transmission for each wavelength(say 800-1200nm) we input Real(reGaAs) and imag (imgGaAs) part of relative permittivity (obtained from refractive index real and imag parts) via Interpolation function in Global definitions.

2) I want to know how we can define them in Relative permittivity of GaAs material properties since we sweep in this property to obtain wavelength dependent Transmission (say Photoluminescence). In my case since relative permittivity is = reGaAs(lambda) - j*imgGaAs(lambda). But I think I have some error here.

3) Black arrow indicates an example of source excitation position and how it reflects back from Au metal and finally transmission obtained (yellow markers in air region).

4) I want to know exactly how we can place Planewave source inside/on GaAs?
HI Maha Thanks for your reply. Actually for understanding I said as real and img. But actually Imported real part (n) of GaAs as txt file and named it as reGaAs and similarly imaginary part as imgGaAs. I think this naming will be no problem. I imported this txt file by right clicking Global definitions and from there Functions-Interpolation. (For clear visual of structure check the attachment. I made few changes in structure design and kindly find in attachments.) Generally I simplify my Simulation idea as you refer my Au-GaAs-Air structure: 1) To obtain Transmission for each wavelength(say 800-1200nm) we input Real(reGaAs) and imag (imgGaAs) part of relative permittivity (obtained from refractive index real and imag parts) via Interpolation function in Global definitions. 2) I want to know how we can define them in Relative permittivity of GaAs material properties since we sweep in this property to obtain wavelength dependent Transmission (say Photoluminescence). In my case since relative permittivity is = reGaAs(lambda) - j*imgGaAs(lambda). But I think I have some error here. 3) Black arrow indicates an example of source excitation position and how it reflects back from Au metal and finally transmission obtained (yellow markers in air region). 4) I want to know exactly how we can place Planewave source inside/on GaAs?


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13.11.2013, 20:50 GMT-5
Hi Maha

Actually Now I had imported Refractive index values via interpolation. I had converted n and k values to Relative permitivity say GaAs_real and GaAs_imag. And also now I m trying to use Dipole source which is useful for my research work.

Previously in Parameters I had defined Lambda = 1000 and frequency = c_const/Lambda[nm]. I had used nm in Lambda since imported (ex. GaAs_real) wavelength values as say 800 ..... without nm.

In GaAs Material properties I had defined Relative permittivity as = GaAs_real(Lambda)-j*GaAs_imag(Lambda). I think this is correct definition.

So In Parametric sweep now I can do Lambda dependent.

(I had attached the concept of my simulation as picture where you can understand my idea)

My Goal is to get PL spectra (may be Transmission ) vs wavelength. I had placed Point in GaAs and used that as Dipole source. My target is to achieve Transmission spectra coming out from GaAs vs wavelength (say 800-1200nm). I m really confused here how-to-do. For obtaining transmission spectra do I need to use port condition or what ?
Hi Maha Actually Now I had imported Refractive index values via interpolation. I had converted n and k values to Relative permitivity say GaAs_real and GaAs_imag. And also now I m trying to use Dipole source which is useful for my research work. Previously in Parameters I had defined Lambda = 1000 and frequency = c_const/Lambda[nm]. I had used nm in Lambda since imported (ex. GaAs_real) wavelength values as say 800 ..... without nm. In GaAs Material properties I had defined Relative permittivity as = GaAs_real(Lambda)-j*GaAs_imag(Lambda). I think this is correct definition. So In Parametric sweep now I can do Lambda dependent. (I had attached the concept of my simulation as picture where you can understand my idea) My Goal is to get PL spectra (may be Transmission ) vs wavelength. I had placed Point in GaAs and used that as Dipole source. My target is to achieve Transmission spectra coming out from GaAs vs wavelength (say 800-1200nm). I m really confused here how-to-do. For obtaining transmission spectra do I need to use port condition or what ?

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.