我仿真光学双稳态的时候为什么总是发散啊


#1

关于设定介电常数张量的问题 继续讨论:
这个问题太宽了,没有针对性。你是直接用网上的例子吗?如是,计算机操作系统版本是什么?软件是什么版本?我这里测试网上例子没有问题。现在已经是v8.17.1072,请下载最新版测试。


#2

很感谢得到孙老师的回复,就是我仿真网上的例子没有问题,但是在仿真其他文献时,按照网上的例子修改脚本,却得不到正确的结果,麻烦老师看一下

在2017-01-11 03:02:33,陈德超cdc12345@hnu.edu.cn写道:

|
| | gsunLumerical Team
January 10 |
|
|

自 关于设定介电常数张量的问题 继续讨论:
这个问题太宽了,没有针对性。你是直接用网上的例子吗?如是,计算机操作系统版本是什么?软件是什么版本?我这里测试网上例子没有问题。现在已经是v8.17.1072,请下载最新版测试。

|

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.


#3

你需要提供文件啊!否则我们没有办法猜出问题所在。


#4

forward.fsp (363.0 KB)
这个是我的文件,这个是我的脚本,不知道哪里错了


closeall;
clear;
w0 = 2pic/550e-9; # center frequency
Imin = 0.01; Imax = 0.5;

load(“reverse.fsp”);
Ey = getdata(‘monitor_2’,‘Ey’);
Esy = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I = linspace(Imin, Imax, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey),1,zero_pad);
Ey_through_t = invfft(pinch(Ey_through_w)filter1);
Ey_through_t = Ey_through_t(1:length(t));
Esy_through_w = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy),1,zero_pad);
Esy_through_t = invfft(pinch(Esy_through_w)*filter1);
Esy_through_t = Esy_through_t(1:length(t));

load(“reverse.fsp”);
Ey_r = getdata(‘monitor_2’,‘Ey’);
Esy_r = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I_r = linspace(Imax, Imin, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w_r = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey_r),1,zero_pad);
Ey_through_t_r = invfft(pinch(Ey_through_w_r)filter1);
Ey_through_t_r = Ey_through_t_r(1:length(t));
Esy_through_w_r = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy_r),1,zero_pad);
Esy_through_t_r = invfft(pinch(Esy_through_w_r)*filter1);
Esy_through_t_r = Esy_through_t_r(1:length(t));

plot results

plotxy(I, abs(Ey_through_t)^2/abs(Esy_through_t)^2,
I_r, abs(Ey_through_t_r)^2/abs(Esy_through_t_r)^2,
‘I (MW/cm^2)’,’(E_out/E_source)^2’);
legend(“Increasing Source Intensity”, “Decreasing Source Intensity”);


#5

此类仿真的主要问题是银材料。我做了一些修改,现在不发散,但是结果是否符合预期还需要你进一步测试。
forward.fsp (366.8 KB)


#6

孙老师,经过调试之后还是不行,学生不知道哪里出错了~这是我仿真脚本,一个是获取信号光的脚本,一个是获得双稳态的脚本。希望得到您的指导,我用的文件是您修改过的那个


closeall;
clear;
w0 = 2pic/550e-9; # center frequency
Imin = 00; Imax = 700;

load(“13forward.fsp”);
Ey = getdata(‘monitor_2’,‘Ey’);
Esy = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I = linspace(Imin, Imax, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey),1,zero_pad);
Ey_through_t = invfft(pinch(Ey_through_w)filter1);
Ey_through_t = Ey_through_t(1:length(t));
Esy_through_w = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy),1,zero_pad);
Esy_through_t = invfft(pinch(Esy_through_w)*filter1);
Esy_through_t = Esy_through_t(1:length(t));

load(“reverse.fsp”);
Ey_r = getdata(‘monitor_2’,‘Ey’);
Esy_r = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I_r = linspace(Imax, Imin, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w_r = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey_r),1,zero_pad);
Ey_through_t_r = invfft(pinch(Ey_through_w_r)filter1);
Ey_through_t_r = Ey_through_t_r(1:length(t));
Esy_through_w_r = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy_r),1,zero_pad);
Esy_through_t_r = invfft(pinch(Esy_through_w_r)*filter1);
Esy_through_t_r = Esy_through_t_r(1:length(t));

plot results

plotxy(I, abs(Ey_through_t)^2/abs(Esy_through_t)^2,
I_r, abs(Ey_through_t_r)^2/abs(Esy_through_t_r)^2,
‘I (MW/cm^2)’,’(E_out/E_source)^2’);
legend(“Increasing Source Intensity”, “Decreasing Source Intensity”);


#7

光有脚本没有文件也不行啊!另外请将你的脚本用文件格式上传,而不是直接贴子这里。


#8

孙老师,我的文件用的是你调整后的那个,我在邮件中说过了,可能你没有看到13forward.fsp (3.8 MB)


#9

13forward.fsp (3.8 MB)
孙老师,不好意思哈,这是我的文件~这是我的脚本,出来的还是发散的,不知道什么原因
closeall;
clear;
w0 = 2pic/550e-9; # center frequency
Imin = 0.01; Imax = 0.5;

load(“13forward.fsp”);
Ey = getdata(‘monitor_2’,‘Ey’);
Esy = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I = linspace(Imin, Imax, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey),1,zero_pad);
Ey_through_t = invfft(pinch(Ey_through_w)filter1);
Ey_through_t = Ey_through_t(1:length(t));
Esy_through_w = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy),1,zero_pad);
Esy_through_t = invfft(pinch(Esy_through_w)*filter1);
Esy_through_t = Esy_through_t(1:length(t));

load(“reverse.fsp”);
Ey_r = getdata(‘monitor_2’,‘Ey’);
Esy_r = getdata(‘monitor_2_1’,‘Ey’);
t = getdata(‘monitor_2’,‘t’);
I_r = linspace(Imax, Imin, length(t));
zero_pad = 2^16;
w = fftw(t,1,zero_pad);
filter1 = 2*exp(-(w-w0)^2/(150e12)^2);

remove high frequency components

Ey_through_w_r = 2*((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Ey_r),1,zero_pad);
Ey_through_t_r = invfft(pinch(Ey_through_w_r)filter1);
Ey_through_t_r = Ey_through_t_r(1:length(t));
Esy_through_w_r = 2
((1:length(w))<=(length(w)/2+0.1))*fft(pinch(Esy_r),1,zero_pad);
Esy_through_t_r = invfft(pinch(Esy_through_w_r)*filter1);
Esy_through_t_r = Esy_through_t_r(1:length(t));

plot results

plotxy(I, abs(Ey_through_t)^2/abs(Esy_through_t)^2,
I_r, abs(Ey_through_t_r)^2/abs(Esy_through_t_r)^2,
‘I (MW/cm^2)’,’(E_out/E_source)^2’);
legend(“Increasing Source Intensity”, “Decreasing Source Intensity”);


#10

孙老师,我的文件就是用你发给我的那个,您久等了

在2017-01-14 06:21:49,陈德超cdc12345@hnu.edu.cn写道:

|
| | gsunLumerical Team
January 13 |
|
|

光有脚本没有文件也不行啊!另外请将你的脚本用文件格式上传,而不是直接贴子这里。

|

Visit Topic or reply to this email to respond.

In Reply To
|
| | cdc12345
January 13 |
|
| 孙老师,经过调试之后还是不行,学生不知道哪里出错了~这是我仿真脚本,一个是获取信号光的脚本,一个是获得双稳态的脚本。希望得到您的指导,我用的文件是您修改过的那个 [image][image][image][image] closeall; clear; w0 = 2pic/550e-9; # center frequency Imin = 00; Imax = 700; load(“13forward.fsp”); Ey = getdata(‘monitor_2’,‘Ey’); Esy = getdata(‘monitor_2_1’,‘Ey’); t = getdata('monitor… |

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.


#11

孙老师,我用的文件就是您发给我的那个


#12

我这边再次测试你发过来的文件,没有看到发散;


你看到这个警示了吗?
https://kb.lumerical.com/en/divergence_warning.png
如果看到了,说明你版本有问题,请下载最新版。

我说你的文件没有,是指reverse.fsp这个文件。前向仿真已经通过没有任何问题。

你不需要将脚本帖在这里,而是保存为一个文件发上来。