diff --git a/DiffractionGratings/grating3D.pro b/DiffractionGratings/grating3D.pro index 19699c0cffa535b4f6481c1888ba853e309d7600..7525723d236270598f875eff1c82dce7d0d2e754 100644 --- a/DiffractionGratings/grating3D.pro +++ b/DiffractionGratings/grating3D.pro @@ -10,7 +10,6 @@ Include "grating3D_materials.pro" myDir = "run_results3D/"; Group { - // SubDomains PMLbot = Region[1]; L_6_temp = Region[2]; @@ -322,6 +321,7 @@ PostProcessing { Quantity { { Name u ; Value { Local { [ {u} ]; In Omega; Jacobian JVol; } } } { Name Etot ; Value { Local { [ {u}+E1[] ]; In Omega; Jacobian JVol; } } } + { Name Htot ; Value { Local { [ H1[]-I[]/(mur[]*mu0*om0)*{Curl u}]; In Omega; Jacobian JVol; } } } { Name Edif ; Value { Local { [ {u}+E1d[] ]; In Omega; Jacobian JVol; } } } { Name E1 ; Value { Local { [ E1[] ]; In Omega; Jacobian JVol; } } } { Name H1y ; Value { Local { [CompY[H1[]] ]; In Omega; Jacobian JVol; } } } @@ -329,7 +329,7 @@ PostProcessing { { Name source ; Value { Local { [ source[] ]; In Omega; Jacobian JVol; } } } { Name epsr_xx; Value { Local { [ CompXX[epsr[]] ]; In Omega; Jacobian JVol; } } } { Name Damp_pml_top; Value { Local { [Damp_pml_top[] ]; In Omega; Jacobian JVol; } } } - { Name Poy_tot; Value { Local { [ 0.5*Re[Cross[{u}+E1[] , Conj[ H1[]-I[]/(mur[]*mu0*om0)*{Curl u}]]] ]; In Omega; Jacobian JVol; } } } + { Name Poy_tot; Value { Local { [ 0.5*Re[Cross[{u}+E1[] , Conj[ H1[]-I[]/(mur[]*mu0*om0)*{Curl u}]]] ]; In Omega; Jacobian JVol; } } } For k In {2:6} { Name Abs_L~{k} ; Value { Integral { [ ep0*om0 * 0.5*Fabs[eps_im_L~{k}]*(SquNorm[{u}+E1[]]) / (Pinc*period_x*period_y) ] ; In L~{k} ; Integration I1 ; Jacobian JVol ; } } } @@ -364,9 +364,6 @@ PostProcessing { } } - - - PostOperation { { Name postop_helmholtz_vector; NameOfPostProcessing postpro_helmholtz_vector ; Operation { diff --git a/DiffractionGratings/grating3D_data_2Dlamellar.geo b/DiffractionGratings/grating3D_data_2Dlamellar.geo index bf7a3b89bd93845c30d974c85ef5390ec2f0dea5..0366ab6648490235cae82c602aecf72b8ff49ec6 100644 --- a/DiffractionGratings/grating3D_data_2Dlamellar.geo +++ b/DiffractionGratings/grating3D_data_2Dlamellar.geo @@ -46,10 +46,10 @@ DefineConstant[ eps_re_L_6 = {-44.9757 , Name StrCat[pp4,"/layer 6: real part of relative permittivity"]}, eps_im_L_6 = {2.9524 , Name StrCat[pp4,"/layer 6: imag part of relative permittivity"]}, - paramaille = {15 , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]}, + paramaille = {10 , Name StrCat[pp5,"/1Number of mesh elements per wavelength [-]"]}, lc_scat = {30 , Name StrCat[pp5,"/2Scatterer absolute mesh size [nm]"]}, PML_top = {lambda0 , Name StrCat[pp5,"/4PML top thickness [nm]"]}, - PML_bot = {lambda0 , Name StrCat[pp5,"/5PML bot thickness [nm]"]}, + PML_bot = {lambda0/5 , Name StrCat[pp5,"/5PML bot thickness [nm]"]}, Nmax = {1 , Name StrCat[pp5,"/6Number of non specular order to output [-]"]}, refine_mesh_L_1= {1 , Name StrCat[pp5,"/7refine layers/1refine mesh layer 1 [-]"]}, refine_mesh_L_2= {1 , Name StrCat[pp5,"/7refine layers/2refine mesh layer 2 [-]"]}, @@ -61,12 +61,12 @@ DefineConstant[ InterpSampling = { 30 , Name StrCat[pp6,"/0Interpolation grid step [nm]"]}, Flag_interp_cubic = { 0 , Name StrCat[pp6,"/1Interpolate on cubic grid?"], Choices {0,1} }, FlagOutEtotCuts = { 0 , Name StrCat[pp6,"/2Output Total Electric Field cuts?"] , Choices {0,1} }, - FlagOutHtotCuts = { 1 , Name StrCat[pp6,"/2Output Total Magnetic Field cuts?"] , Choices {0,1} }, - FlagOutEscaCuts = { 0 , Name StrCat[pp6,"/3Output Scattered Electric Field cuts?"] , Choices {0,1} }, - FlagOutPoyCut = { 0 , Name StrCat[pp6,"/4Output Poynting cuts?"] , Choices {0,1} }, - FlagOutEtotFull = { 0 , Name StrCat[pp6,"/5Total Electric Field Full Output?"] , Choices {0,1} }, - FlagOutEscaFull = { 0 , Name StrCat[pp6,"/6Scattered Electric Field Full Output?"] , Choices {0,1} }, - FlagOutPoyFull = { 0 , Name StrCat[pp6,"/7Poynting Full Output?"] , Choices {0,1} } + FlagOutHtotCuts = { 1 , Name StrCat[pp6,"/3Output Total Magnetic Field cuts?"] , Choices {0,1} }, + FlagOutEscaCuts = { 0 , Name StrCat[pp6,"/4Output Scattered Electric Field cuts?"] , Choices {0,1} }, + FlagOutPoyCut = { 0 , Name StrCat[pp6,"/5Output Poynting cuts?"] , Choices {0,1} }, + FlagOutEtotFull = { 1 , Name StrCat[pp6,"/6Total Electric Field Full Output?"] , Choices {0,1} }, + FlagOutEscaFull = { 0 , Name StrCat[pp6,"/7Scattered Electric Field Full Output?"] , Choices {0,1} }, + FlagOutPoyFull = { 0 , Name StrCat[pp6,"/8Poynting Full Output?"] , Choices {0,1} } ]; lambda_m = lambda0;