summaryrefslogtreecommitdiff
path: root/MOR_simple_thin_layer_model
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2016-04-27 11:10:12 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2016-04-27 11:10:12 -0400
commit0319b091d55e3764e167ec19d5aa59bcf8a81816 (patch)
treeaa474a56544e0d0985902ac5aefacc24c2a03820 /MOR_simple_thin_layer_model
parentef2a5247db0bf0c5c2ca3368bbd36153e7c00032 (diff)
downloadnoisy_eit_xmds-0319b091d55e3764e167ec19d5aa59bcf8a81816.tar.gz
noisy_eit_xmds-0319b091d55e3764e167ec19d5aa59bcf8a81816.zip
more descriptive name for the simple MOR directory
Diffstat (limited to 'MOR_simple_thin_layer_model')
-rw-r--r--MOR_simple_thin_layer_model/Makefile37
-rw-r--r--MOR_simple_thin_layer_model/delta_2photon_noise.xmds148
-rw-r--r--MOR_simple_thin_layer_model/pp.m21
3 files changed, 206 insertions, 0 deletions
diff --git a/MOR_simple_thin_layer_model/Makefile b/MOR_simple_thin_layer_model/Makefile
new file mode 100644
index 0000000..83877ee
--- /dev/null
+++ b/MOR_simple_thin_layer_model/Makefile
@@ -0,0 +1,37 @@
+### -*- 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 = delta_2photon_noise.xsil
+M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES))
+
+XMDS = xmds2
+XSIL2GRAPHICS = xsil2graphics2
+
+all: $(M_FILES)
+
+%.run: %.xmds
+ $(XMDS) $<
+ mv $(patsubst %.xmds,%,$<) $@
+
+$(XSIL_FILES): %.xsil: $(RUN_FILES)
+ ./$<
+
+$(M_FILES): %.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
+
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean
diff --git a/MOR_simple_thin_layer_model/delta_2photon_noise.xmds b/MOR_simple_thin_layer_model/delta_2photon_noise.xmds
new file mode 100644
index 0000000..2cb3a52
--- /dev/null
+++ b/MOR_simple_thin_layer_model/delta_2photon_noise.xmds
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+<simulation xmds-version="2">
+
+ <name>delta_2photon_noise</name>
+
+ <author>E. Mikhailov, M. Guidry</author>
+ <description>
+ Solving 3 level atom in lambda field configuration,
+ no field propagation included. Noise on delta_2photon.
+ </description>
+
+ <features>
+ <benchmark />
+ <bing />
+ <fftw plan="patient" />
+ <openmp />
+ <auto_vectorise />
+ <globals>
+ <![CDATA[
+ const complex g=10;
+ const complex gbc=.001;
+ const complex Split = .1;
+ const double tset=5;
+ const double alpha = 0.001;
+
+ complex Gab, Gca, Gcb, GCB;
+ complex Ep,Ed,Epc,Edc;
+ complex noise;
+ double delta_2photon, delta_d;
+ complex rba,rac,rbc;
+ complex rBA,rAC,rBC;
+ complex drive_field0=1, probe_field0=1;
+ ]]>
+ </globals>
+ </features>
+
+ <geometry>
+ <propagation_dimension> t </propagation_dimension>
+ <transverse_dimensions>
+ <dimension name="delta_2photon" lattice="256" domain="(-2, 2)" />
+ </transverse_dimensions>
+ </geometry>
+
+ <driver name="multi-path" paths="16" />
+
+ <noise_vector name="drivingNoise" kind="wiener" type="real" method="dsfmt" >
+ <components>Eta</components>
+ </noise_vector>
+
+ <vector name="density_matrix" type="complex" dimensions="delta_2photon">
+ <components>raa rbb rcc rab rca rcb rAB rCA rCB</components>
+ <initialisation>
+ <![CDATA[
+ raa = 0;
+ rbb = 1;
+ rcc = 0;
+ rab = 0;
+ rca = 0;
+ rcb= 0;
+ rAB = 0;
+ rCA = 0;
+ rCB= 0;
+ ]]>
+ </initialisation>
+ </vector>
+
+ <sequence>
+ <integrate algorithm="ARK45" interval="13.0" tolerance="1e-7">
+ <samples>100</samples>
+ <operators>
+ <integration_vectors>density_matrix</integration_vectors>
+ <dependencies>drivingNoise</dependencies>
+ <![CDATA[
+ delta_d=0;
+
+ noise = Eta*alpha;
+ Ed=drive_field0;
+ Ep=probe_field0;
+
+ Epc = conj(Ep);
+ Edc = conj(Ed);
+
+ Gab=g+i*(delta_d+delta_2photon+1*noise);
+ Gca=g-i*(delta_d);
+ Gcb=gbc+i*(Split + delta_2photon+0*noise);
+ GCB=gbc+i*(-Split + delta_2photon+0*noise);
+
+
+ rba=conj(rab);
+ rac=conj(rca);
+ rbc=conj(rcb);
+ rBA=conj(rAB);
+ rAC=conj(rCA);
+ rBC=conj(rCB);
+
+ draa_dt = -i*Epc*rab+i*Ep*rba-i*Edc*rac+i*Ed*rca-2*g*raa
+ -i*Edc*rAB+i*Ed*rBA-i*Epc*rAC+i*Ep*rCA;
+ drbb_dt = i*Epc*rab-i*Ep*rba+g*raa-gbc*rbb+gbc*rcc
+ +i*Edc*rAB-i*Ed*rBA;
+ drcc_dt = i*Edc*rac-i*Ed*rca+g*raa-gbc*rcc+gbc*rbb
+ +i*Epc*rAC-i*Ep*rCA;
+
+ drab_dt = -Gab*rab+i*Ep*(rbb-raa)+i*Ed*rcb;
+ drca_dt = -Gca*rca+i*Edc*(raa-rcc)-i*Epc*rcb;
+ drcb_dt = -Gcb*rcb-i*Ep*rca+i*Edc*rab;
+
+ drAB_dt = -Gab*rAB+i*Ed*(rbb-raa)+i*Ep*rCB;
+ drCA_dt = -Gca*rCA+i*Epc*(raa-rcc)-i*Edc*rCB;
+ drCB_dt = -GCB*rCB-i*Ed*rCA+i*Epc*rAB;
+ ]]>
+ </operators>
+ </integrate>
+ </sequence>
+
+
+
+
+ <!-- The output to generate -->
+ <!--<output format="ascii" filename="delta_2photon_noise_alpha_1.xsil">-->
+ <output>
+ <group>
+ <sampling basis="delta_2photon" initial_sample="yes">
+ <dependencies>density_matrix </dependencies>
+ <moments>eit_signal mor_signal rab_rlOut rab_imOut rca_rlOut rca_imOut raaOut rbbOut rccOut noiseOut PDl PDr</moments>
+ <![CDATA[
+ rab_rlOut = rab.Re();
+ rab_imOut = rab.Im();
+ rca_rlOut = rca.Re();
+ rca_imOut = rca.Im();
+ raaOut = raa.Re();
+ rbbOut = rbb.Re();
+ rccOut = rcc.Re();
+ noiseOut = noise.Re();
+ PDl = norm( 1/sqrt(2)*(rab - rAB) + i/sqrt(2)*(rca + rCA) );
+ PDr = norm( 1/sqrt(2)*(rab - rAB) - i/sqrt(2)*(rca + rCA) );
+ eit_signal = PDl + PDr;
+ mor_signal = PDl - PDr;
+ ]]>
+ </sampling>
+ </group>
+ </output>
+
+ </simulation>
+
+<!--
+vim: ts=2 sw=2 foldmethod=indent:
+-->
+
diff --git a/MOR_simple_thin_layer_model/pp.m b/MOR_simple_thin_layer_model/pp.m
new file mode 100644
index 0000000..f59f19c
--- /dev/null
+++ b/MOR_simple_thin_layer_model/pp.m
@@ -0,0 +1,21 @@
+delta_2photon_noise
+
+figure(1)
+plot(delta_2photon_1, mean_mor_signal_1(end,:) )
+hold all
+plot(delta_2photon_1, mean_eit_signal_1(end,:) )
+
+legend( {'mor', 'eit'} )
+
+figure(2)
+plot(delta_2photon_1, stderr_mor_signal_1(end,:) )
+hold all
+plot(delta_2photon_1, stderr_eit_signal_1(end,:) )
+
+legend( {'mor', 'eit'} )
+
+figure(3)
+plot(delta_2photon_1, stderr_eit_signal_1(end,:)./stderr_mor_signal_1(end,:) )
+hold all
+
+legend( {'noise eit/mor'} )