Hi @ all,

I'm trying to simulate fiber modes in cylindrical coordinates (code excerpt below). Everything seems to work fine except that the output has only 3 dimensions instead of 4:
h5ls HE11_E.h5
ep.i                     Dataset {750, 126, 50/Inf}
ep.r                     Dataset {750, 126, 50/Inf}
er.i                     Dataset {750, 126, 50/Inf}
er.r                     Dataset {750, 126, 50/Inf}
ez.i                     Dataset {750, 126, 50/Inf}
ez.r                     Dataset {750, 126, 50/Inf}
What happens to the phi-component?

Best regards
Christian

rmax = 2.5;
zmax = 15;
....
int radiating_3D(const double a = 50.0) {
  grid_volume v = volcyl(rmax,zmax,a);
  structure s(v, eps_fiber, pml(Dpml));
  fields f(&s);
  double w = d/wavelength; //omega
  continuous_src_time src(w); //add continuous source
  volume src_plane(veccyl(rmax,Dpml+1.)); //source volume
f.add_volume_source(Er, src, src_plane, HE11Er, 1.0);
  f.add_volume_source(Ep, src, src_plane, HE11Ep, 1.0);
  f.add_volume_source(Ez, src, src_plane, HE11Ez, 1.0);
h5file * outputfile_Ex = f.open_h5file("HE11_E"); // open output file

  double next_output_step = 30.;//60
  double max_output_step = 35;//63
master_printf("Times: %3.1lf < t < %3.1lf\n", next_output_step, max_output_step);
  double increment = .1;
  while (f.time() < max_output_step){
     f.step();
     //hdf5 output
     if ((f.time() < max_output_step) && (f.time() >= next_output_step)){
        f.output_hdf5(Er, v.surroundings(), outputfile_Ex, true, true);
        f.output_hdf5(Ep, v.surroundings(), outputfile_Ex, true, true);
        f.output_hdf5(Ez, v.surroundings(), outputfile_Ex, true, true);
        next_output_step+=increment;
}
  }
  h5file * h5_eps_total = f.open_h5file("eps_fiber_total");
  f.output_hdf5(Dielectric, v.surroundings(), h5_eps_total);
  delete h5_eps_total;
return 1;
}

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to