示例#1
0
sys.path.append('./writer-hdf5/')

import pymbsolvelib as mb
import pysolveropenmp
import pywriterhdf5

import numpy as np
import math
import time

# vacuum
mat_vac = mb.material("Vacuum")
mb.material.add_to_library(mat_vac)

# Ziolkowski active region material
qm = mb.qm_desc_2lvl(1e24, 2 * math.pi * 2e14, 6.24e-11, 1.0e10, 1.0e10, -1.0)
mat_ar = mb.material("AR_Ziolkowski", qm)
mb.material.add_to_library(mat_ar)

# Ziolkowski setup
dev = mb.device("Ziolkowski")
dev.add_region(mb.region("Vacuum left", mat_vac, 0, 7.5e-6))
dev.add_region(mb.region("Active region", mat_ar, 7.5e-6, 142.5e-6))
dev.add_region(mb.region("Vacuum right", mat_vac, 142.5e-6, 150e-6))

# initial density matrix
rho_init = mb.qm_operator([ 1, 0 ])

# scenario
sce = mb.scenario("Basic", 32768, 200e-15, rho_init)
sce.add_record(mb.record("inv12", 2.5e-15))
示例#2
0
sys.path.append(os.environ['PYTHON_SUPPORT'])

import pymbsolvelib as mb
import pysolvercpu
import pywriterhdf5

import numpy as np
import math
import time

# vacuum
mat_vac = mb.material("Vacuum", None)
mb.material.add_to_library(mat_vac)

# Ziolkowski active region material
qm = mb.qm_desc_2lvl(1e24, 2 * math.pi * 2e14, 6.24e-11, 1.0e10, 1.0e10, -1.0)
mat_ar = mb.material("AR_Ziolkowski", qm)
mb.material.add_to_library(mat_ar)

# Ziolkowski setup
dev = mb.device("Ziolkowski")
dev.add_region(mb.region("Vacuum left", mat_vac, 0, 7.5e-6))
dev.add_region(mb.region("Active region", mat_ar, 7.5e-6, 142.5e-6))
dev.add_region(mb.region("Vacuum right", mat_vac, 142.5e-6, 150e-6))

# initial density matrix
rho_init = mb.qm_operator([1, 0])

# scenario
sce = mb.scenario("Basic", 32768, 200e-15, rho_init)
sce.add_record(mb.record("inv12", 2.5e-15))
示例#3
0
    # cavity length 1.5mm
    L = 1.5e-3
    # total loss 11/cm
    loss = 1100.0
else:
    # cavity length 3mm
    L = 3.0e-3
    # total loss 7/cm
    loss = 700

print(L)
print(loss)
# Freeman 2013 active region
# varies gain recovery time T1
T1 = 20e-12
qm = mb.qm_desc_2lvl(3.7e20, 2 * math.pi * 2.45e12, 6.2e-9, 1 / T1,
                     1 / 2.35e-12, 1.0)
# background rel permittivity 12.9
# overlap factor 1
mat_ar = mb.material("AR_Freeman", qm, 12.9, 1, loss)
mb.material.add_to_library(mat_ar)

L_abs = 0.25e-3

dev = mb.device("Freeman")
dev.add_region(mb.region("Vacuum left", mat_abs, 0, L_abs))
dev.add_region(mb.region("Active region", mat_ar, L_abs, L_abs + L))
dev.add_region(mb.region("Vacuum right", mat_abs, L_abs + L, 2 * L_abs + L))

# scenario
# approx 14000 grid points -> choose 16k?
# rather set d_x directly