Dear MEEP users,
I'm trying to get the transmission of EM waves in a waveguide (WR284) filled
with plasma. For this I have a CW source at 2.45 GHz. I want to add the
polarizability in such a way that epsilon(omega) = 1 - (omega_plasma/omega)^2
where omega is the fixed source frequency and omega_plasma is the plasma
frequency. I want the transmission for different omega_plasma's. So I let
omega_plasma/omega = some factor. So I just varied the factor and found the
flux at flux planes in the waveguide.
The parameters of the polarizability I used were:-
omega_n = 1e-20
gamma = 0
delta_eps = 1e40*omega_source*omega_source*factor*factor
where omega_source is 2.45Ghz and factor is the same I've defined earlier and
this is what I change externelly to change the polarization.
The above resemble the drude model.
Now there seems to be something wrong with the way the polarization is being
handled for my parameters:-
1)The flux in the cases when the factor is between 0 to around 0.6 comes out to
be greater than the flux when there is no polarization indicating a
transmission of greater than 1 in these cases. How can this be? Since epsilon
is actually less than 1 when the factor is greater than 0, a lower value of
flux is expected ,right?
2)Also the flux seems to increase with the distance from the source! which is
definitely absurd. Are the parameters I used correct for the desired way I want
to change epsilon?
I've attached my code and the following lines might be the ones you might want
to look at:-
double resolution = 1;
volume vol = vol2d( 1400, 112, resolution );
structure s( vol, eps, pml( 300.0, X ) );
fields f( &s );
// 's' is the empty structure and 'f' is the fields object related to this
structure
double omega_source = 0.008166;
continuous_src_time source( omega_source );
vec position_of_source = vec( 600, 56 );
f.add_point_source( Ez, source, position_of_source, 1e3 );
while ( f.time() < 20000 ) {
f.step();
}
double flux1 = fvol1->flux();
double flux_1;
//flux1 is the flux of the empty structure and flux_1 is the flux of the
structure //I'm interested in.
double factor = 0;
// I basically create a new structure for every 'factor' at the start of the
loop //and delete it at the end of the loop.
while ( factor < 2 ) {
structure *s1 = new structure( vol, eps, pml( 300.0, X ) );
s1->add_polarizability( one, 1e-20, 0,
1e40*omega_source*omega_source*factor*factor );
fields *f1 = new fields( s1 );
f1->add_point_source( Ez, source, position_of_source, 1e3 );
flux_vol *fvol_1 = new flux_vol( f1, X, flux_line1 ) ;
fvol_1 = f1->add_flux_plane( flux_line1 );
while ( f1->time() < 20000 ) {
f1->step();
}
flux_1 = fvol_1->flux();
delete fvol_1, f1, s1;
factor = factor + 0.1;
}
Thanking you,
Mani chandra
Best Jokes, Best Friends, Best Food and more. Go to
http://in.promos.yahoo.com/groups/bestofyahoo/#include <meep.hpp>
using namespace meep;
using std::FILE;
using std::fopen;
using std::fclose;
using std::fprintf;
using std::fflush;
double eps( const vec &v );
double one( const vec &v );
int main( int argv, char **argc )
{
initialize mpi( argv, argc );
FILE *fp = fopen( "diagnostics.dat", "w" );
master_printf( "File created\n" );
if ( fp == NULL )
{
master_printf( "Error in creating file!\n" );
return 1;
}
double resolution = 1;
volume vol = vol2d( 1400, 112, resolution );
structure s( vol, eps, pml( 300.0, X ) );
fields f( &s );
f.output_hdf5( Dielectric, vol.surroundings() );
// 's' is the empty structure and 'f' is the fields object related to this structure
double omega_source = 0.008166;
continuous_src_time source( omega_source );
vec position_of_source = vec( 600, 56 );
f.add_point_source( Ez, source, position_of_source, 1e3 );
geometric_volume flux_line0( vec ( 605, 0 ), vec( 605, 112 ) );
geometric_volume flux_line1( vec ( 610, 0 ), vec( 610, 112 ) );
geometric_volume flux_line2( vec ( 620, 0 ), vec( 620, 112 ) );
geometric_volume flux_line3( vec ( 630, 0 ), vec( 630, 112 ) );
geometric_volume flux_line4( vec ( 800, 0 ), vec( 800, 112 ) );
geometric_volume flux_line5( vec ( 900, 0 ), vec( 900, 112 ) );
geometric_volume flux_line6( vec ( 1000, 0 ), vec( 1000, 112 ) );
fprintf(fp,"#factor flux605 flux_605 flux610 flux_610 flux620 flux_620 flux630 flux_630 flux800 flux_800 flux900 flux_900 flux1000 flux_1000\n");
flux_vol *fvol0 = f.add_flux_plane( flux_line0 );
flux_vol *fvol1 = f.add_flux_plane( flux_line1 );
flux_vol *fvol2 = f.add_flux_plane( flux_line2 );
flux_vol *fvol3 = f.add_flux_plane( flux_line3 );
flux_vol *fvol4 = f.add_flux_plane( flux_line4 );
flux_vol *fvol5 = f.add_flux_plane( flux_line5 );
flux_vol *fvol6 = f.add_flux_plane( flux_line6 );
while ( f.time() < 20000 ) {
f.step();
}
//'flux'es are the fluxes of the empty structure and 'flux_'es are the fluxes of the structure I'm interested in.
double flux0 = fvol0->flux();
double flux1 = fvol1->flux();
double flux2 = fvol2->flux();
double flux3 = fvol3->flux();
double flux4 = fvol4->flux();
double flux5 = fvol5->flux();
double flux6 = fvol6->flux();
double flux_0;
double flux_1;
double flux_2;
double flux_3;
double flux_4;
double flux_5;
double flux_6;
double factor = 0;
// I basically create a new structure for every 'factor' at the start of the loop and delete it at the end of the loop.
while ( factor < 2 ) {
structure *s1 = new structure( vol, eps, pml( 300.0, X ) );
s1->add_polarizability( one, 1e-20, 0, 1e40*omega_source*omega_source*factor*factor );
fields *f1 = new fields( s1 );
f1->add_point_source( Ez, source, position_of_source, 1e3 );
flux_vol *fvol_0 = new flux_vol( f1, X, flux_line0 ) ;
fvol_0 = f1->add_flux_plane( flux_line0 );
flux_vol *fvol_1 = new flux_vol( f1, X, flux_line1 ) ;
fvol_1 = f1->add_flux_plane( flux_line1 );
flux_vol *fvol_2 = new flux_vol( f1, X, flux_line2 ) ;
fvol_2 = f1->add_flux_plane( flux_line2 );
flux_vol *fvol_3 = new flux_vol( f1, X, flux_line3 ) ;
fvol_3 = f1->add_flux_plane( flux_line3 );
flux_vol *fvol_4 = new flux_vol( f1, X, flux_line4 ) ;
fvol_4 = f1->add_flux_plane( flux_line4 );
flux_vol *fvol_5 = new flux_vol( f1, X, flux_line5 ) ;
fvol_5 = f1->add_flux_plane( flux_line5 );
flux_vol *fvol_6 = new flux_vol( f1, X, flux_line6 ) ;
fvol_6 = f1->add_flux_plane( flux_line6 );
while ( f1->time() < 20000 ) {
f1->step();
}
flux_0 = fvol_0->flux();
flux_1 = fvol_1->flux();
flux_2 = fvol_2->flux();
flux_3 = fvol_3->flux();
flux_4 = fvol_4->flux();
flux_5 = fvol_5->flux();
flux_6 = fvol_6->flux();
fprintf(fp,"%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n", factor, flux0, flux_0, flux1, flux_1, flux2, flux_2, flux3, flux_3, flux4, flux_4, flux5, flux_5, flux6, flux_6);
fflush(fp);
master_printf("%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n", factor, flux0, flux_0, flux1, flux_1, flux2, flux_2, flux3, flux_3, flux4, flux_4, flux5, flux_5, flux6, flux_6);
delete fvol_0, fvol_1, fvol_2, fvol_3, fvol_4, fvol_5, fvol_6, f1, s1;
factor = factor + 0.1;
}
return 0;
}
double eps( const vec &v )
{
if ( v.y() < 18 || v.y() > 94 ) return -1e20;
return 1;
}
double one( const vec &v )
{
if ( v.y() > 18 && v.y() < 94 ) return 1;
return 0;
}
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss