From e1d512ed3a302d2afaefeba73ac2596a50ad93f4 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 21 Aug 2012 16:44:37 -0400 Subject: changed some substitution to better match our XMDS --- xmds2/realistic_Rb/Makefile | 55 ++++ xmds2/realistic_Rb/Makefile.fig | 39 +++ xmds2/realistic_Rb/Makefile.par | 32 +++ xmds2/realistic_Rb/Makefile.pp | 62 +++++ xmds2/realistic_Rb/realistic_Rb.xmds | 511 +++++++++++++++++++++++++++++++++++ 5 files changed, 699 insertions(+) create mode 100644 xmds2/realistic_Rb/Makefile create mode 100644 xmds2/realistic_Rb/Makefile.fig create mode 100644 xmds2/realistic_Rb/Makefile.par create mode 100644 xmds2/realistic_Rb/Makefile.pp create mode 100644 xmds2/realistic_Rb/realistic_Rb.xmds (limited to 'xmds2/realistic_Rb') diff --git a/xmds2/realistic_Rb/Makefile b/xmds2/realistic_Rb/Makefile new file mode 100644 index 0000000..e088e15 --- /dev/null +++ b/xmds2/realistic_Rb/Makefile @@ -0,0 +1,55 @@ +### -*- make -*- +### This file is part of the Debian xmds package +### Copyright (C) 2006 Rafael Laboissiere +### This file is relased under the GNU General Public License +### NO WARRANTIES! + +### This makefile can be used to build and run the XMDS examples + +XMDS_FILES = $(shell ls *.xmds) +RUN_FILES = $(patsubst %.xmds,%.run,$(XMDS_FILES)) +CC_FILES = $(patsubst %.xmds,%.cc,$(XMDS_FILES)) +XSIL_FILES = $(patsubst %.xmds,%.xsil,$(XMDS_FILES)) +M_FILES = $(patsubst %.xmds,%.m,$(XMDS_FILES)) + +XMDS = xmds2 +XSIL2GRAPHICS = xsil2graphics + +all: $(RUN_FILES) + +%.run: %.xmds + $(XMDS) $< + mv $(patsubst %.xmds,%,$<) $@ + +%.xsil: %.run + ./$< --E1o=0 --E3o=0 + +%.m: %.xsil + $(XSIL2GRAPHICS) $< + +plot: $(M_FILES) + octave pp.m + +clean: + rm -f $(CC_FILES) $(RUN_FILES) $(M_FILES) $(XSIL_FILES) *.wisdom.fftw3 *.dat octave-core *.wisdom *.pdf + rm -f $(png_targets) + rm -f $(eps_targets) + +eps_targets = $(wildcard *.eps) +pdf_targets = $(eps_targets:%.eps=%.pdf) +png_targets = $(pdf_targets:%.pdf=%.png) + +png: pdf $(png_targets) + +$(png_targets): %.png : %.pdf + convert -density 300 $< $@ + +pdf: $(pdf_targets) + +$(pdf_targets): %.pdf : %.eps + cat $< | ps2eps -B > __tt.eps + epspdf __tt.eps $@ + rm -f __tt.eps + #ps2eps -B $< | epspdf $< $@ +.PRECIOUS: %.run %.xsil %.m +.PHONY: all clean diff --git a/xmds2/realistic_Rb/Makefile.fig b/xmds2/realistic_Rb/Makefile.fig new file mode 100644 index 0000000..71fba31 --- /dev/null +++ b/xmds2/realistic_Rb/Makefile.fig @@ -0,0 +1,39 @@ +### -*- make -*- +### This makefile can be used to build and run the XMDS examples + +GNUPLOT_FILES = $(wildcard *.gp) + +SCRIPTS_DIR = . + + +eps_targets = $(wildcard *.eps) +eps_bb_targets = $(eps_targets:%.eps=%.bb) +pdf_targets = $(eps_targets:%.eps=%.pdf) +png_targets = $(pdf_targets:%.pdf=%.png) + +fig: png + +pdf: $(pdf_targets) + +# fix bounding box +$(eps_bb_targets): %.bb : %.eps + @cat $< | ps2eps -q -B > $@ + +$(pdf_targets): %.pdf : %.bb + epspdf $< $@ + +png: $(png_targets) + +$(png_targets): %.png : %.pdf + convert -density 300 $< $@ + +clean: + rm -f *.pdf + rm -f *.eps + rm -f *.bb + +real_clean: clean + rm -f *.png + +.PRECIOUS: %.run %.xsil %.m +.PHONY: all clean diff --git a/xmds2/realistic_Rb/Makefile.par b/xmds2/realistic_Rb/Makefile.par new file mode 100644 index 0000000..cc21c7b --- /dev/null +++ b/xmds2/realistic_Rb/Makefile.par @@ -0,0 +1,32 @@ +### -*- make -*- +### This file is part of the Debian xmds package +### Copyright (C) 2006 Rafael Laboissiere +### This file is relased under the GNU General Public License +### NO WARRANTIES! + +### This makefile can be used to build and run the XMDS examples + + +PARAMS_FILES = $(wildcard *.params) +PP_DIR = $(PARAMS_FILES:%.params=%) +CALC_XSIL_FILES = $(PARAMS_FILES:%.params=%/data.xsil) + +default: $(CALC_XSIL_FILES) + +$(CALC_XSIL_FILES): %/data.xsil : % %.params + echo processing $$(dirname $(@)) dir + $(MAKE) -C $$(dirname $(@)) -f ../Makefile.pp SCRIPTS_DIR=../ PARAMS_FILE=../$<.params + +$(PP_DIR): % : %.params + echo need to make dir + [ -d $@ ] || mkdir -p $@ + +clean: + for d in $(PP_DIR); \ + do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done + +real_clean: + for d in $(PP_DIR); \ + do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done + +.PHONY: all clean diff --git a/xmds2/realistic_Rb/Makefile.pp b/xmds2/realistic_Rb/Makefile.pp new file mode 100644 index 0000000..83e5bec --- /dev/null +++ b/xmds2/realistic_Rb/Makefile.pp @@ -0,0 +1,62 @@ +### -*- make -*- +### This makefile can be used to build and run the XMDS examples + + +XSIL_FILES = Nlevels_with_doppler_with_z_4wm.xsil +M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES)) +GNUPLOT_FILES = $(wildcard *.gp) + +SCRIPTS_DIR = . + +XSIL2GRAPHICS = xsil2graphics + +# fast light +#PARAMS = --delta1=0 --delta2=0 --delta3=0 --E1o=1.9e7 --E2o=3.1e5 --E3o=3.8e7 --E4o=1e1 +#PARAMS = --delta1=0 --delta2=0 --delta3=0 --E1o=0.1e7 --E2o=1e4 --E3o=.3e7 --E4o=0 --Lcell=1.5e-2 --Temperature=.0001 +PARAMS = \ + --Ndens=1e15 \ + --Lcell=10.0e-2 \ + --Temperature=5 \ + --Pwidth=0.4e-6 \ + --delta1=0 --delta2=0 --delta3=0 \ + --E1o=2e7 --E2o=1e2 --E3o=4e7 --E4o=1e0 + + +include $(PARAMS_FILE) + + +# slow light EIT +#PARAMS = --delta1=0 --delta2=0 --delta3=0 --E1o=1.9e7 --E2o=3.1e5 --E3o=0 --E4o=0 + +all: $(XSIL_FILES) Nlevels_with_doppler_with_z_4wm.xsil $(M_FILES) plot fig + +Nlevels_with_doppler_with_z_4wm.xsil: ../Nlevels_with_doppler_with_z_4wm.run $(PARAMS_FILE) + $< $(PARAMS) | grep "Time elapsed for simulation is:" > exact_analysis_execution_time.txt + +%.m: %.xsil + $(XSIL2GRAPHICS) $< + +fig: pp_I2.stamp + $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@ + + +pretty_plots: pp_I2.stamp $(GNUPLOT_FILES) + gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I2.gp + gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I4.gp + +plot: pp_I2.stamp + +pp_I2.stamp: $(XSIL_FILES) $(M_FILES) + octave -q $(SCRIPTS_DIR)/pp_I2.m + +clean: + rm -f $(M_FILES) $(XSIL_FILES) *.dat octave-core + rm -f pp_I2.stamp + $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@ + +real_clean: clean + $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@ + rm -f exact_analysis_execution_time.txt + +.PRECIOUS: %.run %.xsil %.m +.PHONY: all clean diff --git a/xmds2/realistic_Rb/realistic_Rb.xmds b/xmds2/realistic_Rb/realistic_Rb.xmds new file mode 100644 index 0000000..6a40191 --- /dev/null +++ b/xmds2/realistic_Rb/realistic_Rb.xmds @@ -0,0 +1,511 @@ + + + + realistic_Rb + + Eugeniy Mikhailov + + License GPL. + + Solving simplified Rb atom model + with fields propagation along spatial axis Z + with Doppler broadening. + + + We assume four-wave mixing condition when w3-w4=w2-w1 i.e. fields E3 and E4 drive the same + resonance as fields E2 and E1. + + + * --------------- | F=1, 2P_3/2 > + * \ \ + * \ E3_r \ -------- | F=2, 2P_+1/2 > + * \ E4_r \ / \ + * \ \ / E2_l \ + * \ / \ E1_l + * | F=2, 2S_1/2 > -------------- \ + * \ \ + * \ \ + * ------------- | F=1, 2S_1/2 > + * + + + We are solving + dE/dz+(1/c)*dE/dt=i*eta*rho_ij, where j level is higher then i. + Note that E is actually a Rabi frequency of electromagnetic field not the EM field + in xmds terms it looks like + dE_dz = i*eta*rhoij - 1/c*L[E], here we moved t dependence to Fourier space + + VERY IMPORTANT: all Rabi frequency should be given in [1/s], if you want to + normalize it to something else look drho/dt equation. + No need to renormalizes eta as long as its express through + the upper level decay rate in the same units as Rabi frequency. + + + + + section + double eta = 0; // eta constant in the wave equation for Rabi frequency. Units are [1/(m s)] + + // --------- Atom and cell properties ------------------------- + // range of Maxwell distribution atomic velocities + const double mass = (86.909180527 * 1.660538921e-27); // atom mass in [kg] + // above mass expression is written as (expression is isotopic_mass * atomic_mass_unit) + + // Average sqrt(v^2) in Maxwell distribution for one dimension + // Maxwell related parameters will be calculated in section + double v_thermal_averaged=0; + // Maxwell distribution velocities range to take in account in [m/s] + double V_maxwell_min = 0, V_maxwell_max = 0; + + // repopulation rate (atoms flying in/out the laser beam) in [1/s] + const double gt=0.01 *(2*M_PI*1e6); + // Natural linewidth of j's level in [1/s] + const double G3=3.0 *(2*M_PI*1e6); + const double G4=3.0 *(2*M_PI*1e6); + + // total decay of i-th level branching ratios. Rij branching of i-th level to j-th + const double R41=0.5, R42=0.5; + const double R31=0.5, R32=0.5; + + + complex E1ac, E2ac, E3ac, E4ac; // Complex conjugated Rabi frequencies + + complex r21, r31, r41, r32, r42, r43, r44; // density matrix elements + + // inner use variables + double probability_v; // will be used as p(v) in Maxwell distribution + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 to provide range for Maxwell velocity distribution\n"); + v_thermal_averaged=sqrt(k_boltzmann*Temperature/mass); + // Maxwell distribution velocities range to take in account in [m/s] + // there is almost zero probability for higher velocity p(4*v_av) = 3.3e-04 * p(0) + V_maxwell_min = -4*v_thermal_averaged; V_maxwell_max = -V_maxwell_min; + + // eta constant in the wave equation for Rabi frequency. Units are [1/(m s)] + eta = 3*lambda*lambda*Ndens*Gamma_super/8.0/M_PI; + ]]> + + + + + + + + + + + + + z + + + + + + + + + + E1 E2 E3 E4 + + + + + + + + probability_v + + + + + + + + probability_v_norm + + Maxwell_distribution_probabilities + + + + + + + + E1a E2a E3a E4a + + E_field Maxwell_distribution_probabilities Maxwell_distribution_probabilities_norm + + + + + + + r11a r22a r33a r12a r13a r14a r23a r24a r34a r44a + + density_matrix Maxwell_distribution_probabilities Maxwell_distribution_probabilities_norm + + + + + + + + + r11 r22 r33 r12 r13 r14 r23 r24 r34 r44 + + + + + + + E_field_avgd + + + + + + + + + + + + + + + + + + 100 100 + + + + + density_matrix + E_field_avgd + + + + + + + + + Lt + + + E_field + density_matrix + + + + + + + + + + + + E_field_avgd + I1_out I2_out I3_out I4_out + + + + + + + density_matrix_averaged + + r11_out r22_out r33_out r44_out + r12_re_out r12_im_out r13_re_out r13_im_out r14_re_out r14_im_out + r23_re_out r23_im_out r24_re_out r24_im_out + r34_re_out r34_im_out + + + + + + + + + + + + + -- cgit v1.2.3