Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some questions about the code #3

Open
Yaozengsw opened this issue Nov 4, 2024 · 1 comment
Open

some questions about the code #3

Yaozengsw opened this issue Nov 4, 2024 · 1 comment

Comments

@Yaozengsw
Copy link

Dear Mr. Michael Ekstrom,
Thank you for taking the time to read my message amidst your busy schedule.
I am a graduate student at Wuhan University, and I have been studying the Lugiato-Lefever equation (LLE). Fortunately, I recently read your article, “Modeling of optical microresonator frequency combs,” which helped me understand how to apply the split-step Fourier method to solve the LLE. However, I am facing challenges with the equation presented in the paper “Topological dissipative Kerr soliton combs in a valley photonic crystal resonator,” particularly with handling the pump term.
I have attached the code I developed, and I would greatly appreciate it if you could take a moment to review it and help me identify any issues. Additionally, if you have any insights or code related to the time series diagram (Fig. 7.2 in your thesis), I would be grateful for your guidance.
Thank you once again for your time and assistance. I apologize for any inconvenience my inquiry may cause.
Wishing you good health and all the best.
Warm regards,
Yao Zeng
School of Electronic Information
Wuhan University
Wuhan 430072, China

clear all;
clc;
kappa=10000;
Pin=2.2;
dispersion2=0.1e9;
delta_w=30e12;
%%
FSR=450e9;
a=300e-9;
l=180a;
L=3
l;
omega0=370.67e12;
n2=2.5e-19;
c=3e8;
A_eff=2.1e-14;
gamma=(omega0n2)/(cA_eff);
eta=0.5;
hbar=1.05e-34;
Omega=omega0-delta_w;
%%
nt=1000; Tmax=300; % FFT points and window size
step_num=200; % No. of z steps
deltaz=L/step_num; % step size in z
dtau=(2Tmax)/nt; % step size in tau
tau=(-nt/2:nt/2-1)dtau; % temporal grid
omega=fftshift((2
pi/Tmax)
(-nt/2:nt/2-1)); % frequency grid
%% 输入场
psi=sech(tau);
% Plot input time series
figure;
subplot(3,1,1)
plot (tau, abs(psi).abs(psi), '-r'); hold on;
%% Split Step LLE
P_hat=fft(sqrt(Pin)ones(1, nt));
D1=-kappa/2-1i
delta_w-1i
piFSRdispersion2omega.omega;
D2=exp(D1
deltaz);
alpha=(kappa
eta)/(hbarOmega);
% Initial linear half-step
psi=ifft(fft(psi).sqrt(D2)+(sqrt(alpha)P_hat./D1).(sqrt(D2) - 1));
for q=1:1
% Nonlinear step
psi=psi.exp(1ideltaz
L
FSRgammaabs(psi).^2);
% Linear step
psi=ifft(fft(psi).*D2+(sqrt(alpha)P_hat./D1).(D2 - 1));
end
% Inverse linear half-step
psi=ifft(fft(psi).*1./sqrt(D2)+(sqrt(alpha)P_hat./D1).(1./sqrt(D2)-1));
% Plot output time series
subplot(3,1,2)
plot (tau, abs(psi).*abs(psi), '-b')
%% 频谱
E_t=psi;
P_t=E_t.*conj(E_t);
x_complex=P_t;
dt=dtau;
Nf = length(x_complex);
Fs=1/dt;
df=Fs/Nf;
freq_span = (-floor(Nf/2):floor((Nf-1)/2))df;
fft_mag_laser_Ax = abs(fftshift(fft(x_complex)));
subplot(3,1,3)
plot(freq_span,10
log10(fft_mag_laser_Ax),'k')
xlabel('Frequency (GHz)')
ylabel('Microwave Power (dB)')

@miceks
Copy link
Owner

miceks commented Nov 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants