long pulse SHG

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

long pulse SHG

tinolang
Administrator

Contents

function [E_ftfxfy_o,E_ftfxfy_e,obj]=fSHG()
% automaticly generated matlab script using chi2D (3d button) to simulate the second harmonic of a 10ps pulse with chi3D (C) T.Lang (tinolang@chi23d.com)

_____________create a new instance of class chi3D____________________________

obj = chi3D('tag','SHG');

_________________computational parameters_____________________________________

obj('Nx',32,'xWindow',0.006,...
     'Ny',32,  'yWindow',0.006,... %use Ny=1 for 2+1D, Ny=2^N for 3+1d
     'Nt',16384, 'tWindow',3.5e-11,'shiftFreqWindow',2.73e+14,...
     'Nz',200, 'propagationLength', 0.01,...
     'GPUOn',0, 'abortIntensity', inf,...
     'showResultEach',50, 'showProgress',1);

_________________material parameters__________________________________________

obj( 'material','LBO','theta',1.5708,'phi',0.217468,'plane','XY','temperature',20);

_________________effects to be included_________________________________________

obj( 'deff1',8.3e-13,'eoo',1,'oeo',0,'ooo',0,...
      'deff2',0,'oee',0,'eeo',0,'eee',0,...
      'n2',4e-20,'SPMOn',0,'selfFocusingOn',0,...
      'walkoffON',1,'noiseOn',0,'noiseFactor',1);

____________________________input pulse definition______________________________

obj({ 'pulse1','EorI',0.001,'polarization','o','centerWavelength',1.047e-06,...
                    'pulseDuration',1e-11,'GD',0,'GDD',0,'TOD',0,'Phase',0,'beamShape_t','gauss',...
                    'beamRadius_x',0.0016949,'beamRadius_y',0.0016949,...     %please choose a reasonable values in y
                    'shift_x',0,'shift_y',0,...
                    'alpha_x',0,'alpha_y',0,...
                    'slant_x',0,'slant_y',0,...
                    'radiusOfCurvature_x',0,'radiusOfCurvature_y',0,...
                    'beamShape_x',{'supergauss',2},'beamShape_y',{'supergauss',2}});

____________________________detector properties________________________________

obj.detectors = rmfield(obj.detectors,fieldnames(obj.detectors)); %delete default detectors

obj.detectors.obs1.plotIntegratedProfiles=1;
obj.detectors.obs1.logScale=0;
obj.detectors.obs1.polarization='o';
obj.detectors.obs1.ftlim=[2.7254e+14,7.406e+14];
obj.detectors.obs1.fxlim=[-5300,5166.7];
obj.detectors.obs1.fylim=[-inf,inf];
obj.detectors.obs1.spectralData=1;
obj.detectors.obs1.spacetimeData=1;
obj.detectors.obs1.peakpower=1;

obj.detectors.obs2.plotIntegratedProfiles=1;
obj.detectors.obs2.logScale=0;
obj.detectors.obs2.polarization='e';
obj.detectors.obs2.ftlim=[2.7254e+14,7.406e+14];
obj.detectors.obs2.fxlim=[-5300,5166.7];
obj.detectors.obs2.fylim=[-inf,inf];
obj.detectors.obs2.spectralData=1;
obj.detectors.obs2.spacetimeData=1;
obj.detectors.obs2.peakpower=1;

____________________________run simulation__________________________________

[E_ftfxfy_o,E_ftfxfy_e]=run(obj,{'pulse1'});

% Results=obj.simResults
% fprintf('pulse energy obs2 (J): %.2e \n',Results.obs2.PulseEnergy(end));

##### SOURCE BEGIN #####
function [E_ftfxfy_o,E_ftfxfy_e,obj]=fSHG()
% automaticly generated matlab script using chi2D (3d button) to simulate the second harmonic of a 10ps pulse with chi3D (C) T.Lang (tinolang@chi23d.com)

%% _______________create a new instance of class chi3D____________________________

obj = chi3D('tag','SHG');

%% ___________________computational parameters_____________________________________

obj('Nx',32,'xWindow',0.006,...
     'Ny',32,  'yWindow',0.006,... %use Ny=1 for 2+1D, Ny=2^N for 3+1d
     'Nt',16384, 'tWindow',3.5e-11,'shiftFreqWindow',2.73e+14,...
     'Nz',200, 'propagationLength', 0.01,...
     'GPUOn',0, 'abortIntensity', inf,...
     'showResultEach',50, 'showProgress',1);

%% ___________________material parameters__________________________________________

obj( 'material','LBO','theta',1.5708,'phi',0.217468,'plane','XY','temperature',20);

%% ___________________effects to be included_________________________________________

obj( 'deff1',8.3e-13,'eoo',1,'oeo',0,'ooo',0,...
      'deff2',0,'oee',0,'eeo',0,'eee',0,...
      'n2',4e-20,'SPMOn',0,'selfFocusingOn',0,...
      'walkoffON',1,'noiseOn',0,'noiseFactor',1);


%% ______________________________input pulse definition______________________________

obj({ 'pulse1','EorI',0.001,'polarization','o','centerWavelength',1.047e-06,...
                    'pulseDuration',1e-11,'GD',0,'GDD',0,'TOD',0,'Phase',0,'beamShape_t','gauss',...
                    'beamRadius_x',0.0016949,'beamRadius_y',0.0016949,...     %please choose a reasonable values in y
                    'shift_x',0,'shift_y',0,...
                    'alpha_x',0,'alpha_y',0,...
                    'slant_x',0,'slant_y',0,...
                    'radiusOfCurvature_x',0,'radiusOfCurvature_y',0,...
                    'beamShape_x',{'supergauss',2},'beamShape_y',{'supergauss',2}});

%% ______________________________detector properties________________________________

obj.detectors = rmfield(obj.detectors,fieldnames(obj.detectors)); %delete default detectors

obj.detectors.obs1.plotIntegratedProfiles=1;
obj.detectors.obs1.logScale=0;
obj.detectors.obs1.polarization='o';
obj.detectors.obs1.ftlim=[2.7254e+14,7.406e+14];
obj.detectors.obs1.fxlim=[-5300,5166.7];
obj.detectors.obs1.fylim=[-inf,inf];
obj.detectors.obs1.spectralData=1;
obj.detectors.obs1.spacetimeData=1;
obj.detectors.obs1.peakpower=1;

obj.detectors.obs2.plotIntegratedProfiles=1;
obj.detectors.obs2.logScale=0;
obj.detectors.obs2.polarization='e';
obj.detectors.obs2.ftlim=[2.7254e+14,7.406e+14];
obj.detectors.obs2.fxlim=[-5300,5166.7];
obj.detectors.obs2.fylim=[-inf,inf];
obj.detectors.obs2.spectralData=1;
obj.detectors.obs2.spacetimeData=1;
obj.detectors.obs2.peakpower=1;

%% ______________________________run simulation__________________________________




[E_ftfxfy_o,E_ftfxfy_e]=run(obj,{'pulse1'});

% Results=obj.simResults
% fprintf('pulse energy obs2 (J): %.2e \n',Results.obs2.PulseEnergy(end));
##### SOURCE END #####



	
	
	
Tino Lang