summaryrefslogtreecommitdiff
path: root/fortran/navy_four_levels
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/navy_four_levels')
-rw-r--r--fortran/navy_four_levels/FourLevelPulseProp_Double.f95109
1 files changed, 46 insertions, 63 deletions
diff --git a/fortran/navy_four_levels/FourLevelPulseProp_Double.f95 b/fortran/navy_four_levels/FourLevelPulseProp_Double.f95
index d3a0d7f..881dccb 100644
--- a/fortran/navy_four_levels/FourLevelPulseProp_Double.f95
+++ b/fortran/navy_four_levels/FourLevelPulseProp_Double.f95
@@ -1,4 +1,4 @@
- program FourLevelPulseProp_v3_Double
+program FourLevelPulseProp_v3_Double
!
! Written by: Dr. Frank A. Narducci
! Written on: May 12, 2008
@@ -28,11 +28,10 @@
character*150 fname
integer nmat,npts,Nfrac,Nframe,Nframemax,NSkip,NWrite,tpts,zpts
parameter (nmat=3,npts=100) !matrix size, number of detuning points in dispersion curve
- !REMEMBER TO CHANGE NMAT IN LMatConstruct Routine
+ !tpts is the number of temporal points in the cell
parameter (tpts=10,zpts=tpts+1) !Caution: funny things happened when tpts=200 (and presumably greater)
- !tpts is the number of temporal points in the cell
parameter (Nframemax=2000000)
- parameter ( NWrite=100) !number of frames to actually write
+ parameter (NWrite=100) !number of frames to actually write
integer i,j,k,m,n
complex*16 a1,a2,a3,a4,a5,a6
complex*16 b1,b2,b3,b4,b5,b6,b7
@@ -69,28 +68,24 @@
complex*16 rho31_last(zpts),rho32_last(zpts),rho33_last(zpts),rho34_last(zpts)
complex*16 rho41_last(zpts),rho42_last(zpts),rho43_last(zpts),rho44_last(zpts)
- !No Om_last because we never need the previous spatial point
+ !No Om_last because we never need the previous spatial point
complex*16 L(nmat,nmat),Linv(nmat,nmat),Ltemp(nmat,nmat)
common/para/ga12,W21
- real*8 d !used by NR Routines
+ real*8 d !used by NR Routines
integer indx(nmat)
-!
-! Fundamental numbers
-!
+ ! Fundamental numbers
ci=cmplx(0.,1.)
pi=acos(-1.0)
c=3e8
hbar=1.055e-34
epsil=8.85e-12
-
-!
-! Atomic numbers (based on Rubidium 85)
-!
- beta=2*pi*3e6 !in Hz
+
+ ! Atomic numbers (based on Rubidium 85)
+ beta=2*pi*3e6 !in Hz
W41=0
W42=1
W43=0
@@ -107,12 +102,9 @@
ga34=0.5*(W31+W41+W32+W42+W43)
lambda=780.24e-9
-!
-! Atomic parameters
-!
+ ! Atomic parameters
write (*,*)'New version from moved folder'
-! write (*,*)'Enter density in m^-1'
- eta=6.9e11
+ eta=6.9e11 ! density in m^-1
alpha1=3*eta*lambda*lambda/(2*pi)
alpha1tilde=alpha1*c/beta
alpha2=3*eta*lambda*lambda/(2*pi)
@@ -121,13 +113,11 @@
alphactilde=alphac*c/beta
-! User defined numbers
-!
-! write (*,*)'Enter peak scaled Rabi frequency for the pump at entrance of cell'
- Om1peak=0.01
-! write (*,*)'Enter peak scaled Rabi frequency for the probe at entrance of cell'
- Om2peak=1
-! write (*,*)'Enter maximum detuning in MHz for dispersion lineshape plot'
+ ! User defined numbers
+ Om1peak=0.01 ! Field 1 peak scaled Rabi frequency for the pump at entrance of cell
+ Om2peak=1 ! Field 2 peak scaled Rabi frequency for the pump at entrance of cell
+ Omcpeak=0.1 ! Field 3 peak scaled Rabi frequency for the pump at entrance of cell
+ ! Maximum detuning in MHz for dispersion lineshape plot
delmax=0
Ga4=(W41+W42+W43)
Ga2=W21
@@ -136,46 +126,43 @@
Om_crit=sqrt(Om_crit/2)
write (*,*)'Om_crit = ',Om_crit
-! write (*,*)'Enter peak scaled Rabi frequency for the coupling field at entrance of cell'
- Omcpeak=0.1
-! Now that the user has an idea of the dispersion, do the full propagation problem
-! write (*,*)'Enter detuning of center frequency of the coupling pulse in MHz'
+ ! Now that the user has an idea of the dispersion, do the full propagation problem
+
+ ! Detuning of center frequency of the coupling pulse in MHz
delc_prop=0
- delc_prop=2*pi*1e6*delc_prop/beta !Now dimensionless
+ delc_prop=2*pi*1e6*delc_prop/beta !Now dimensionless
-! write (*,*)'Enter detuning of center frequency of the pump pulse in MHz'
+ ! Detuning of center frequency of the pump pulse in MHz
del2_prop=0.
- del2_prop=2*pi*1e6*del2_prop/beta !Now dimensionless
-! write (*,*)'Enter detuning of center frequency of the probe pulse in MHz'
+ del2_prop=2*pi*1e6*del2_prop/beta !Now dimensionless
+ ! Detuning of center frequency of the probe pulse in MHz
del1_prop=0.
- del1_prop=2*pi*1e6*del1_prop/beta !Now dimensionless
+ del1_prop=2*pi*1e6*del1_prop/beta !Now dimensionless
-! write (*,*) 'Enter pulse width in nsec'
+ ! Pulse width in nsec
tp=1e-6
- tp=beta*tp !Now dimensionless
-! write (*,*)'Enter length of cell in m'
+ tp=beta*tp !Now dimensionless
+ ! Length of cell in m
Lcell=100
- Lcell=beta*Lcell/c !Now dimensionless
+ Lcell=beta*Lcell/c !Now dimensionless
t_start=secnds(0.E0)
write (*,*)'t_start = ',t_start
-! XXXXXXX
-!
-! Set up initial pulse.
-!
+ !
+ ! Set up initial pulse.
+ !
tshift=2*tp
write (*,*) 'peak center at the cell begining i.e. tshift = ', tshift
- tmax=Lcell !Length of time to pass cell (no c because we're dimensionless)
+ tmax=Lcell !Length of time to pass cell (no c because we're dimensionless)
dt=tmax/tpts
- dz=dt !(no c because we're dimensionless)
-! write (*,*)'tp = ',tp
+ dz=dt !(no c because we're dimensionless)
+ !write (*,*)'tp = ',tp
Nframe=zpts+int(4*tp/dt)+1 !Change the number 4 to anything you want to see longer pulse evolution
if (Nframe.ge.Nframemax) write (*,*)'Error!!!!Nframe>Nframemax'
-! write (*,*)'Nframe,tpts = ',Nframe,tpts
-!
-! Initialize matrices
-!
+ !
+ ! Initialize matrices
+ !
Omold=cmplx(0.,0.)
Omold_vac=cmplx(0.,0.)
tpeak=-1
@@ -188,7 +175,7 @@
Omc(m)=cmplx(0.,0.)
Om_vac(m)=cmplx(0.,0.)
- rho11(m)=cmplx(1.,0.) !Change this to change the initial condition
+ rho11(m)=cmplx(1.,0.) !Change this to change the initial condition
rho12(m)=cmplx(0.,0.)
rho13(m)=cmplx(0.,0.)
rho14(m)=cmplx(0.,0.)
@@ -209,8 +196,8 @@
-! Propagation co-efficients
-!
+ ! Propagation co-efficients
+ !
a1=1.
a2=0.5*ci*alpha1tilde*dt
@@ -304,24 +291,20 @@
NSkip=int(NFrame/NWrite)
- fname='MovieParameters4level.txt'
-! write (*,*)'Enter file name to save parameters'
+ fname='MovieParameters4level.txt' ! File name to save parameters
3 format(a150)
open(9,file=fname)
write (9,133)Nframe,zpts,beta,NSkip,dt
133 format(1x,i10,',',i5,',',f12.2,',',i5,',',f12.2)
close (9)
- fname='Movie4level.dat'
-! write (*,*)'Enter file name to save movie'
+ fname='Movie4level.dat' ! File name to save movie
open(9,file=fname)
- fname='Movie4level_EndPoints.dat'
-! write (*,*)'Enter file name to save endpoints'
+ fname='Movie4level_EndPoints.dat' ! File name to save endpoints
open(10,file=fname)
do n=1,Nframe
-! write (*,*)'n = ',n
t=float(n-1)*dt
Om1(1)=Om1peak*exp(-(t-tshift)**2/(tp*tp))
Om2(1)=Om2peak
@@ -373,7 +356,7 @@
rho21(m)=conjg(rho12(m))
- ! rho22(m) needs to be calculated lower down
+ ! rho22(m) needs to be calculated lower down
rho23(m)=g1*rho23_last(m)+g2*conjg(Om1(m))*rho21_last(m)+g3*conjg(Om2(m))*(rho33_last(m)-rho22_last(m))
rho23(m)=rho23(m)+g4*conjg(Omc(m))*rho43_last(m)+g5*conjg(Om1(m-1))*rho21_last(m)
@@ -430,7 +413,7 @@
end do
if (cdabs(Om2(zpts)).gt.cdabs(Omold)) tpeak=t
if (cdabs(Om_vac(zpts)).gt.cdabs(Omold_vac)) tpeak_vac=t
- write (10,139) t,cdabs(Om1(zpts)),cdabs(Om_vac(zpts)) !EndPoint File
+ write (10,139) t,cdabs(Om1(zpts)),cdabs(Om_vac(zpts)) !EndPoint File
Omold=Om2(zpts)
Omold_vac=Om_vac(zpts)
@@ -444,7 +427,7 @@
t_elapsed=t_end-t_start
write(*,*)'T elapsed = ',t_elapsed
stop
- end
+end