Re: [Meep-discuss] 来自杨辉,201021050219的邮件
Hi Yanghui, I am not sure if this one works. But you can try it. - (set! sources (append (list (make source (src (make continuous-src (frequency XXX))) (component XX) (center XX XX XX)) (make source (src (make continuous-src (frequency XXX))) (component XX) (center XX XX XX) - Thanks! Yan 2011/11/7 杨辉,201021050219 > Hi, > Can meep set two sources?What should I do? > Thanks very much! > > > yanghui > > > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > -- Thanks! Yan Liu Department of Electrical and Computer Engineering, Univ. of Houston Room W301, Engr Bldg 2 Houston, TX, 77204-4005 ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] : Monopole antenna simulation
Dear Steven and Meep Users, I am now simulate a monopole antenna in MEEP. But I do not know how to set the source to generate a 600mW power? I have read the instructions in Units and Nonlinearity in MEEP. But I still have trouble understanding the procedures. I have monitor the power but it decrease by time. I don't know what goes wrong with my simulation. Does anyone know how to modeling a monopole antenna with 600mW power? Thanks! ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] : Output only the real part
Hi, The matter is that I have limited space to store several .hdf files with both imaginary and real part. I need to know how to get the result with only real part by C++. Thanks! On Mon, Mar 9, 2009 at 8:53 PM, Paweł Smoliński wrote: > Hi, > > > > > I would like to get the real part of the fields in HDF5 format. > > > > Currently we use "f.output_hdf5(Ez, v.surroundings())" to get the Ez > > field. I wonder how to revise this sentence to get only the real part of > Ez? > > > > In HDF5 file which you have real and imaginary part of Ez field are > stored in two separated streams and you can easily get real part with > programs from h5utils package (e.g. h5totxt ez-000100.00.h5:ez.r > > only_real.txt) > > -- > Regards, > Pawel Smolinski > Faculty of the Fundamental Problems of Technology > Wroclaw University of Technology, Poland > > ___ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] : Output only the real part
Dear Steven and Meep users, I would like to get the real part of the fields in HDF5 format. Currently we use "f.output_hdf5(Ez, v.surroundings())" to get the Ez field. I wonder how to revise this sentence to get only the real part of Ez? Regards! -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] : Question on using meep-mpi
Dear meep users and Dr. Johnson, Our group is trying to do some calculation by meep-mpi with a computing space of 300*300*300. The resolution is setting to 1. We installed OpenMPI which is very easy to to use. But the calculation is about 900s/step when we use 8 processors. We need 1500 steps to finish our simulation, which means that we wait it for 10 days. I wonder if this phenomenon is normal or there is still something we need to do in order to speed up the calculation? Best Regards! ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] How to make a specific power flux density?
Hello everyone, In my calculation I need to make sure that the power flux density is 20W/m2 before the FDTD simulation. But I do not know how to deal with it. Does anybody know how to set the source to make the power flux density to a specific value. I need to do it by C++ interface. Best Regards! ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] : To get the value of E-field by SI
Hi Rand, Thanks for your reply. In fact, I ask this question since I am not sure whether the result 'ex.XX.XX.h5' is in SI unit since I have to use the result to calculate the SAR value. I guess you are doing the similar work as me, do you? >Actually I noticed your email and I just want to verify if it is state anywhere in Meep That e->field Is converted to the formula stated in your email? And do you mean that they multiply the >answer of the e-field with sqrt(epsilon-0/mu-0)? No, I did not mean that it is stated that e-field is converted to the formula. Here I describe my question again specifically. The first step I want to do is described here: http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00386.html, since we need to know the E-field exposure (W/m2) before we start the FDTD simulation. When I use the electric-energy-in-box function by C++. I found the value became smaller and smaller from 2000 to 0.005. And this electric-energy value came to stable status only after 1 time steps. According to Steven's answer, I guess that I need to set the amplitude of E-field to sqrt(10/0.005) if I need the E-field exposure to be 10W/m2. But I am still curious about the result of electric-energy-in-box. How can it decrease from about 2000 to 0.005. Is there any conceptions that I misunderstand? Best Regards! 2009/1/16 rand mouradi > Hello Yan > I think you asked about my university and I was too busy during the last > period. I'm from Cleveland State University. > Actually I noticed your email and I just want to varify if it is state > anywhere in Meep That e-field Is converted to the formula stated in your > email? And do you mean that they multiply the answer of the e-field with > sqrt(epsilon-0/mu-0)? > Thanks > > -- > *From:* Yan Liu > *To:* meep-discuss@ab-initio.mit.edu > *Sent:* Tuesday, January 13, 2009 1:28:19 AM > *Subject:* [Meep-discuss] : To get the value of E-field by SI > > Hello! everyone, > First, I am not very sure of the specific way to generate E-field in MEEP. > In FDTD method, the E-field is converted to > sqrt(epsilon_0/mu_0) where epsilon_0 = 8.85e-12, mu_0 = 1.2566e-6. I > wonder how to transfer the result of E-field to the SI value (V/m). > > Second, in this link > http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00386.html > Steven said that we need to calculate the 'amplitude' by the following > step: > > >Suppose you want to input 5W of power into a waveguide (or whatever). What > you should do is to put >a source with some amplitude "A" and measure the > power P that you get in >your waveguide (using one of Meep's flux functions). > Then to make the power >5, you should scale A by sqrt(5/P). > > I wonder how I can deal with it under C++ interface? > > Best Regards! > -- > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] : To get the value of E-field by SI
Hello! everyone, First, I am not very sure of the specific way to generate E-field in MEEP. In FDTD method, the E-field is converted to sqrt(epsilon_0/mu_0) where epsilon_0 = 8.85e-12, mu_0 = 1.2566e-6. I wonder how to transfer the result of E-field to the SI value (V/m). Second, in this link http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00386.html Steven said that we need to calculate the 'amplitude' by the following step: >Suppose you want to input 5W of power into a waveguide (or whatever). What you should do is to put >a source with some amplitude "A" and measure the power P that you get in >your waveguide (using one of Meep's flux functions). Then to make the power >5, you should scale A by sqrt(5/P). I wonder how I can deal with it under C++ interface? Best Regards! -- ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ interface
Hi, But when I use f.output_hdf5(Dx,A.surroundings()) and read the file 'Dx-00.00.h5'; the hdf5 files is all of zeros which seems as if the conductivity value of 1.0 is not passed to the final structure. Best Regards! 2008/12/31 Zheng Li > Yan Liu wrote: > > Hi, > has_conductivity is still not called. Attached was my code and maybe you > can have a look at it: > > > / > #include > #include > #include > #include > #include > using namespace meep; > using namespace std; > const int I = 150, J = 150, K = 150; > class head:public material_function { > > bool has_conducitivity(component c) { > cout<<"bool"< if(c == Dx) > return true; > else > return false; > } > double eps(const vec &p) { > > int x=(int)p.x()+1; > int y=(int)p.y()+1; > int z=(int)p.z()+1; > > > > if(p.x()>=(x-1)&&p.x()=(y-1)&&p.y()=(z-1)&&p.z()=0&&x<=150&&y>=0&&y<=150&&z>=0&&z<=150) > return 1.0; > > } > > double conductivity(component c, const vec &r) { > c = Dx; > //cout<<"conductivity"< int x = (int)r.x()+1; > int y = (int)r.y()+1; > int z = (int)r.z()+1; > if(y>=25&&y<=26&&((x-75)/20)*((x-75)/20)+((z-75)/20)*((z-75)/20)<=1) > { > return 1.0; > } > return 0.0; > } > }; > int main(int argc, char **argv) { > initialize mpi(argc, argv); > ifstream fin; > ofstream fout; > head VCH_head; > double resolution = 1; > volume v = vol3d(I,J,K, resolution); > structure s(v, VCH_head, pml(5.0)); > fields f(&s); > > f.output_hdf5(Dielectric, v.surroundings()); > f.output_hdf5(Dx, v.surroundings()); > > > double freq = 0.002, fwidth = 0.0; > continuous_src_time src(freq, fwidth); > f.add_point_source(Ex, src, vec(100, 15, 100)); > while (f.time() <= 200) > { > f.step(); > if (int(f.time()*2)%2 == 0 && f.time()>=198) > f.output_hdf5(Ex, v.surroundings()); > } > > f.output_hdf5(Ex, v.surroundings()); > > return 0; > } > > > > Thanks! > 2008/12/30 Zheng Li > > Yan Liu wrote: > > Hi, > I have indeed tested it and found that 'has_conductivity' and > 'conductivity' were not called. > > Also, I think structure::set_conductivity(component c, double f(const vec > &)) can only work when 'has_conductivity' has the value "true". > > My question is how to set 'has_conductivity' in order to successfully set > my conductivity value. > > By the way, it is worth noticing that > when using structure::set_conductivity(componenet c, double f(const vec &)), > the second parameter was converted by simple_material_function conductivity > and passed to structure::set_conductivity(component c, material_function > &C). > > > 2008/12/30 李政 > > > > > -Original Message- > > From: "Yan Liu" > > Date: Tue, 30 Dec 2008 16:49:12 +0800 > > To: meep-discuss@ab-initio.mit.edu > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ > > > > Hi, > > in class *structure*, the conductivity is set by has_conductivity and > set_conductivity > > I have written a subclass of *material_function* but the it seems as if > only *eps* is passed to *structure* > > ; > > ;My code is as follows: > > // > > ... > > class sch:public material_function { > > ; > > double eps(const vec &p) { > > ;.. ;here I ;define the epsilon value > > . > > } > > ; > > bool has_conductivity(component c) { > > ; ; ; ; c = Dx; > > ; ; ; ; return true; > > } > > ; > > double conductivity(component c, const vec &p) { > > ; ; ; c = Dx; > > ; ..here I define the conductivity value > > . > > } > > ; > > }; > > ; > > int main(int argc, char **argv) { > > ... > > sch mat; > > structure s(v,mat,pml(5.0)); > > .. > > f.output_hdf5(Dx,v.surroundings()); > > ; > > > > } > > ; > > > / > &
Re: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ interface
Hi, has_conductivity is still not called. Attached was my code and maybe you can have a look at it: / #include #include #include #include #include using namespace meep; using namespace std; const int I = 150, J = 150, K = 150; class head:public material_function { bool has_conducitivity(component c) { cout<<"bool"<=(x-1)&&p.x()=(y-1)&&p.y()=(z-1)&&p.z()=0&&x<=150&&y>=0&&y<=150&&z>=0&&z<=150) return 1.0; } double conductivity(component c, const vec &r) { c = Dx; //cout<<"conductivity"<=25&&y<=26&&((x-75)/20)*((x-75)/20)+((z-75)/20)*((z-75)/20)<=1) { return 1.0; } return 0.0; } }; int main(int argc, char **argv) { initialize mpi(argc, argv); ifstream fin; ofstream fout; head VCH_head; double resolution = 1; volume v = vol3d(I,J,K, resolution); structure s(v, VCH_head, pml(5.0)); fields f(&s); f.output_hdf5(Dielectric, v.surroundings()); f.output_hdf5(Dx, v.surroundings()); double freq = 0.002, fwidth = 0.0; continuous_src_time src(freq, fwidth); f.add_point_source(Ex, src, vec(100, 15, 100)); while (f.time() <= 200) { f.step(); if (int(f.time()*2)%2 == 0 && f.time()>=198) f.output_hdf5(Ex, v.surroundings()); } f.output_hdf5(Ex, v.surroundings()); return 0; } Thanks! 2008/12/30 Zheng Li > Yan Liu wrote: > > Hi, > I have indeed tested it and found that 'has_conductivity' and > 'conductivity' were not called. > > Also, I think structure::set_conductivity(component c, double f(const vec > &)) can only work when 'has_conductivity' has the value "true". > > My question is how to set 'has_conductivity' in order to successfully set > my conductivity value. > > By the way, it is worth noticing that > when using structure::set_conductivity(componenet c, double f(const vec &)), > the second parameter was converted by simple_material_function conductivity > and passed to structure::set_conductivity(component c, material_function > &C). > > > 2008/12/30 李政 > > > > > -Original Message- > > From: "Yan Liu" > > Date: Tue, 30 Dec 2008 16:49:12 +0800 > > To: meep-discuss@ab-initio.mit.edu > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ > > > > Hi, > > in class *structure*, the conductivity is set by has_conductivity and > set_conductivity > > I have written a subclass of *material_function* but the it seems as if > only *eps* is passed to *structure* > > ; > > ;My code is as follows: > > // > > ... > > class sch:public material_function { > > ; > > double eps(const vec &p) { > > ;.. ;here I ;define the epsilon value > > . > > } > > ; > > bool has_conductivity(component c) { > > ; ; ; ; c = Dx; > > ; ; ; ; return true; > > } > > ; > > double conductivity(component c, const vec &p) { > > ; ; ; c = Dx; > > ; ..here I define the conductivity value > > . > > } > > ; > > }; > > ; > > int main(int argc, char **argv) { > > ... > > sch mat; > > structure s(v,mat,pml(5.0)); > > .. > > f.output_hdf5(Dx,v.surroundings()); > > ; > > > > } > > ; > > > / > > ; > > However, there is no such sentence output > > ; ; "time for set_Conductivity = " > > > > What's wrong with my code? > > ; > > Thanks! > > ; > > 2008/12/26 李政 > > > > > -Original Message- > > > From: "Yan Liu" > > > Date: Fri, 26 Dec 2008 13:49:04 +0800 > > > To: meep-discuss@ab-initio.mit.edu > > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in > MEEP-C++ > > > Hi, everyone: > > > I want to know how to set the conductivity parameter in MEEP by C++ > interface. > > > We can set epsilon by just setting data in "double eps" > > > ;; > > > It seems as if conductivity is more difficult to set. I wonder what is > the specific procedure to do it? > > > Best Regards! > > > > > > Thanks! > > >
Re: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ interface
Hi, I have indeed tested it and found that 'has_conductivity' and 'conductivity' were not called. Also, I think structure::set_conductivity(component c, double f(const vec &)) can only work when 'has_conductivity' has the value "true". My question is how to set 'has_conductivity' in order to successfully set my conductivity value. By the way, it is worth noticing that when using structure::set_conductivity(componenet c, double f(const vec &)), the second parameter was converted by simple_material_function conductivity and passed to structure::set_conductivity(component c, material_function &C). 2008/12/30 李政 > > > > -Original Message- > > From: "Yan Liu" > > Date: Tue, 30 Dec 2008 16:49:12 +0800 > > To: meep-discuss@ab-initio.mit.edu > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ > > > > Hi, > > in class *structure*, the conductivity is set by has_conductivity and > set_conductivity > > I have written a subclass of *material_function* but the it seems as if > only *eps* is passed to *structure* > > ; > > ;My code is as follows: > > // > > ... > > class sch:public material_function { > > ; > > double eps(const vec &p) { > > ;.. ;here I ;define the epsilon value > > . > > } > > ; > > bool has_conductivity(component c) { > > ; ; ; ; c = Dx; > > ; ; ; ; return true; > > } > > ; > > double conductivity(component c, const vec &p) { > > ; ; ; c = Dx; > > ; ..here I define the conductivity value > > . > > } > > ; > > }; > > ; > > int main(int argc, char **argv) { > > ... > > sch mat; > > structure s(v,mat,pml(5.0)); > > .. > > f.output_hdf5(Dx,v.surroundings()); > > ; > > > > } > > ; > > > / > > ; > > However, there is no such sentence output > > ; ; "time for set_Conductivity = " > > > > What's wrong with my code? > > ; > > Thanks! > > ; > > 2008/12/26 李政 > > > > > -Original Message- > > > From: "Yan Liu" > > > Date: Fri, 26 Dec 2008 13:49:04 +0800 > > > To: meep-discuss@ab-initio.mit.edu > > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in > MEEP-C++ > > > Hi, everyone: > > > I want to know how to set the conductivity parameter in MEEP by C++ > interface. > > > We can set epsilon by just setting data in "double eps" > > > ;; > > > It seems as if conductivity is more difficult to set. I wonder what is > the specific procedure to do it? > > > Best Regards! > > > > > > Thanks! > > > Yan Liu > > > Department of Biomedical Engineering, Huazhong University of Science > and Technology > > > > > > Phone: (86)-130-7129-6471 > > > Personal Website: sites.google.com/site/yanliurf > > > > > > > > Hi, > > I suggest you should realize one subclass of *material_function* or > *simple_material_fuction*, and pass its instance to *structure*. > > Zheng > > 2008-12-26 > > > > -- > > > > Thanks! > > Yan Liu > > Department of Biomedical Engineering, Huazhong University of Science and > Technology > > > > Phone: (86)-130-7129-6471 > > Personal Website: sites.google.com/site/yanliurf > > > > -- > > Thanks! > > Yan Liu > > Department of Biomedical Engineering, Huazhong University of Science and > Technology > > > > Phone: (86)-130-7129-6471 > > Personal Website: sites.google.com/site/yanliurf > > > Hi, > First, "c=Dx" does not make sense, do you mean if(c==Dx) return true, or > something. > Second, to test whether your functions are called, put a simple > "printf("");" in your functions, is it OK? > Third, structure::set_conductivity(componenet c, double f(const vec &)) > also works for you. > > Yours, > Zheng > 2008-12-30 > > > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ interface
Hi, in class *structure*, the conductivity is set by has_conductivity and set_conductivity I have written a subclass of *material_function* but the it seems as if only *eps* is passed to *structure* My code is as follows: // ... class sch:public material_function { double eps(const vec &p) { .. here I define the epsilon value . } bool has_conductivity(component c) { c = Dx; return true; } double conductivity(component c, const vec &p) { c = Dx; ..here I define the conductivity value . } }; int main(int argc, char **argv) { ... sch mat; structure s(v,mat,pml(5.0)); .. f.output_hdf5(Dx,v.surroundings()); } / However, there is no such sentence output "time for set_Conductivity = " What's wrong with my code? Thanks! 2008/12/26 李政 > > > -Original Message- > > From: "Yan Liu" > > Date: Fri, 26 Dec 2008 13:49:04 +0800 > > To: meep-discuss@ab-initio.mit.edu > > Subject: [Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ > > Hi, everyone: > > I want to know how to set the conductivity parameter in MEEP by C++ > interface. > > We can set epsilon by just setting data in "double eps" > > ; > > It seems as if conductivity is more difficult to set. I wonder what is > the specific procedure to do it? > > Best Regards! > > > > Thanks! > > Yan Liu > > Department of Biomedical Engineering, Huazhong University of Science and > Technology > > > > Phone: (86)-130-7129-6471 > > Personal Website: sites.google.com/site/yanliurf > > > > > Hi, > I suggest you should realize one subclass of *material_function* or > *simple_material_fuction*, and pass its instance to *structure*. > Zheng > 2008-12-26 > > > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] [MEEP-Discuss]: Setting Conductivity in MEEP-C++ interface
Hi, everyone: I want to know how to set the conductivity parameter in MEEP by C++ interface. We can set epsilon by just setting data in "double eps" It seems as if conductivity is more difficult to set. I wonder what is the specific procedure to do it? Best Regards! Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] :How to use meep-mpi under C++ interface
Dear steven and meep users: I am using meep-mpi to calculate the E-field. I want to know how to change this sentence initialize mpi(argc, argv); // do this even for non-MPI Meep in order to use 8 cores to do the calculation? Also, how to compile my .cpp file (is it the same as non-MPI meep?) Best Regards! -- Thanks! Yan Liu ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] : What is the most efficient way to import data to meep?
Dear Steven and meep users, I have a matrix of dielectric data of 200*200*200. And I need to import them to definite the epsilon value. However, I have tried two different methods: 1) by using map to do loops in MEEP, it takes more than 4 days to read the data. 2) by writing a very long .ctl file which contains 200*200*200 "make blocks", it takes also a very long time. Since the size of this dielectric data file is going to extend even larger. I wonder if there is an more efficient way to import the data to meep? -- Thanks! Y. Liu ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] Asking for the approximate calculation time
Dear Steven and meep users: I have write a program in C++ to generated a .ctl file which contains more than 200 lines of code. Most of the lines is writtten for setting geometry in MEEP. And the whole computational area is about 300*200*200 whith a resolution of 1. What will be the approximate calculation time? PS: most of the lines are as follows: (make block (center ) (size 1 1 1) (material (make dielectric (epsilon .. . . . . 2008-11-21 Yan Liu ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] How to use user-defined eps function
Dear Steven and meep users: I have a .dat file which contains the epsilon value of all the blocks. I want to read the .dat file by c plus plus in Meep. The dielectric value is defined in function eps. I wonder how to deal with it? Best Regards! 2008-11-21 Yan Liu ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] [Meep discuss] Get the maximum value and another question
Dr. Steven and Ian Buss, Thanks for your explaination on the second question! I am sorry to mispresent my need. What I meant to do in my first question is : How can I get the peak value of the sinusoidal E-field in each unit (The cell), under CW source. 2008/10/30 Steven G. Johnson <[EMAIL PROTECTED]> > On Oct 29, 2008, at 2:15 AM, Yan Liu wrote: > > 1) How can I get the maximum value of E-field of CW source > > Analytically, it is impossible in general because it depends on the > geometry. (This is a FAQ.) > > Numerically, obviously you can just output the field and take the > maximum. You can also use the built-in max-abs-field-function routine > (see the reference manual) to compute the maximum of any arbitrary > function of the fields. > > > 2) When I run the time step to 2000, I only want to get the output > > of 1800-2000. How to deal with it? > > Use after-time. For example: > > (run-until 2000 (after-time 1800 output-efield)) > > > ___ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] [Meep discuss] Get the maximum value and another question
Hello everyone: 1) How can I get the maximum value of E-field of CW source 2) When I run the time step to 2000, I only want to get the output of 1800-2000. How to deal with it? Thanks! ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] [meep-discuss]:PML setting in human EM dosimetry calculating by using meep
Hi, everyone: I heard that there are several paper on PML reflection by using MEEP. How can I find them? -- ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] A program error when I use meep
Dear Dr. Johnson and every meep user: I am sorry that I am not very familiar with Scheme Programming. I have tried to make the change as you described but the loop would not return a list of materials. There is some other explanations on the using of "map" on mailing list. But that seems different with my 2D data reading case. I know that scheme is based on lisp(list processing). But I feel confused with my problem. I think my program is still with the questions you mentioned before. I have tried two ways: 1) (define loopinside (lambda(y ymax x) (if (< y ymax) (begin (set! geometry(make block (center (+ 0.5 x) (+ 0.5 y)) (size 1 1 infinity) (material (make dielectric(epsilon 12) (set! y(+ y 1)) (loopinside y ymax x) (define loopoutside (lambda (x xmax y ymax) (if (< x xmax) (begin (loopinside y ymax x) (set! x (+ x 1)) (loopoutside x xmax y ymax) when I use (loopoutside -110 110 -65 65) the it seems there is still nothing returns Backtrace: In current input: 46: 0* [run-until 200 # #] ?: 1* (if (null? fields) (init-fields)) ?: 2 [init-fields] ?: 3* (if (null? structure) (init-structure k-point)) ?: 4 [init-structure #f] ... ?: 5 (set! structure (make-structure (infer-dimensions k) s ...)) ?: 6* [make-structure 2 #(222 132 1.0e-20) #(0 0 0) 1 #t 1.0e-4 10 #f ...] I have tried to use map, same problem occurs : In procedure vector-ref in expression (make-structure (infer-dimensions k) s ...): : Wrong type argument in position 1: #f ABORT: (wrong-type-arg) I am not very clear on how to use 'cons and set!' or 'map' to finish my 2D data reading task in meep Would you please describe it more clearly? Thanks very much! Best Regards! 2008/10/2 Steven G. Johnson <[EMAIL PROTECTED]> > On Oct 1, 2008, at 8:22 AM, Yan Liu wrote: > > > (define loopinside > > (lambda(y ymax x) > > (if (< y ymax) > > (begin (make block (center (+ 0.5 x) (+ 0.5 y)) (size 1 1 infinity) > > (material (make dielectric (epsilon (read i) > > (set! y(+ y 1)) > > This does not return a list of materials. In fact, it does not return > anything useful. The problem is that your loop body doesn't *do* > anything with the block it creates. > > Let me make an analogy. Suppose you wanted to sum n numbers i=1 to n, > in a C program. The analogue of your loop above would be to write: >for (i = 1; i <= n; ++i) >i; > This is a perfectly valid C program, but it doesn't compute the sum. > The command "i;" just evaluates i but doesn't do anything with the > result. Your code has the same problem. > > If you want to do it in a traditional, imperative style (which is what > the "do" loop construct is for), then you need to have some variable > that will hold your list of objects, and then on each iteration of the > loop add your object to the list with "cons" and "set!" > > A more natural style (for Scheme) is to use "map": > >(map (lambda (y) (make block )) > (arith-sequence y-min y-step num-y)) > > "map" returns a list and is a basic tool in Scheme to create one list > from another. > > Steven > > ___ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] A program error when I use meep
Hi! Everyone! I met a problem in using meep. I got the following information when using meep: ERROR: In procedure cdr: ERROR: Wrong type argument in position 1: # And the Backtrace is as follow: In current input: 85: 0* [run-until 200 # #] ?: 1* (if (null? fields) (init-fields)) ?: 2 [init-fields] ?: 3* (if (null? structure) (init-structure k-point)) ?: 4 [init-structure #f] ... ?: 5 (set! structure (make-structure (infer-dimensions k) s ...)) ?: 6* [make-structure 2 #(222 132 1.0e-20) #(0 0 0) 1 #t 1.0e-4 10 #f ...] ?: 7* [object-property-value # material] ?: 8* [assoc-ref ... ?: 9* [object-property-values #] ?: 10 [cdr #] I think it may be a result of using my self-define loop in my program: (define read-file (lambda (path) (read-file-to-string "" (open-input-file path (define read-file-to-string (lambda (str f) (let ((c (read-char f))) (if (eof-object? c) str (read-file-to-string (string-append str (string c)) f) (define i (open-input-string (read-file "/home/administrator/scheme-program/data"))) (define loopinside (lambda(y ymax x) (if (< y ymax) (begin (make block (center (+ 0.5 x) (+ 0.5 y)) (size 1 1 infinity) (material (make dielectric (epsilon (read i) (set! y(+ y 1)) (loopinside y ymax x) (define loopoutside (lambda (x xmax y ymax) (if (< x xmax) (begin (loopinside y ymax x) (set! x (+ x 1)) (loopoutside x xmax y ymax) (define-param lx 222) (define-param ly 132) (define-param bx -110) (define-param by -65) (define-param ex 110) (define-param ey 65) (set! geometry-lattice (make lattice (size lx ly no-size))) (set! geometry(list (loopoutside -110 110 -65 65))) (set! sources (list (make source (src (make continuous-src (frequency 0.15))) (component Ez) (center -110 0 (set! pml-layers (list (make pml (thickness 1.0 (set! resolution 1) (run-until 200 (at-beginning output-epsilon) (at-end output-efield-z)) Could you please help me to find out what the wrong is? Thanks a lot Best Regards! -- Thanks! Yan Liu Department of Biomedical Engineering, Huazhong University of Science and Technology Phone: (86)-130-7129-6471 Personal Website: sites.google.com/site/yanliurf ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] enhanced field
Hi Meep community I am interested in simulating the field enhancement using Meep. I do not know if Meep can output the field enhancement |E|/|E0|, where |E|,and |E0| is the electronic field after and before enhanced. Could anyone give some ideas please? Best, Yan ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] no-bend? in bend-flux.ctl
Hi Andreas, Thanks for the suggestion. I tried other tutorials such as meep ring.ctl >& ring.out. I do not have the any problem. I wonder if that problem comes from no-bend? itself. I installed meep in my home directory meep/bin/ since i am not the system adminstrater. Ctl files are also installed in $HOME/meep/bin. Best, Yan On Sat, Jun 28, 2008 at 2:06 AM, Andreas Erbe <[EMAIL PROTECTED]> wrote: >> when I run tutorial bend-flux.ctl using the following command, >> >> meep no-bend?=true bend-flux.ctl | tee bend-flux.out >> >> >> >> I have an error message: >> >> meep: No match >> >> >> >> Could anyone suggest how to correct this mistake? >> > > It probably means meep is not installed in a directory which is in your PATH. > You will probably have the same error when you type > > meep > > into the command line. So, check where meep is installed and either add its > path to the PATH variable or call it with theee full path > > - > Andreas Erbe > Interface Spectroscopy Group > Department of Interface Chemistry and Surface Engineering > Max Planck Institute for Iron Research GmbH > PO Box 140444 > 40074 Düsseldorf > Germany > > Tel: +49(0)/211/6792-890 > > --- > Max-Planck-Institut für Eisenforschung GmbH > Max-Planck-Straße 1 > D-40237 Düsseldorf > > Handelsregister B 2533 > Amtsgericht Düsseldorf > > Geschäftsführung > Prof. Dr. Jörg Neugebauer > Prof. Dr. Anke R. Pyzalla > Prof. Dr. Dierk Raabe > Prof. Dr. Martin Stratmann > Dipl.-Kfm. Herbert Wilk > > Ust.-Id.-Nr.: DE 11 93 58 514 > Steuernummer: 105 5891 1000 > - > > ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] meep documentation
Hi, Mischa Thanks for you advice. Where did you get Meep doucmentation? Is that the Meep manual in the website (http://ab-initio.mit.edu/wiki/index.php/Meep_manual) or other separate document? Best, Yan ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] how to complie Harminv library with meep?
Hi, I ran ring.ctl, have the following error message. Please help me with How to compile meep with Harminv library? --- Initializing structure... Working in 2D dimensions. cylinder, center = (0,0,0) radius 2, height 1e+20, axis (0, 0, 1) dielectric constant epsilon = 11.56 cylinder, center = (0,0,0) radius 1, height 1e+20, axis (0, 0, 1) dielectric constant epsilon = 1 Halving computational cell along direction y time for set_epsilon = 0.0819781 s --- creating output file "./ring-eps-00.00.h5"... Meep progress: 277.95/300.0 = 92.6% done in 4.0s, 0.3s to go on time step 5599 (time=279.95), 0.000714472 s/step harminv0:, frequency, imag. freq., Q, |amp|, amplitude, error meep: compiled without Harminv library, required for do_harminv Best, Yan ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] no-bend? in bend-flux.ctl
when I run tutorial bend-flux.ctl using the following command, meep no-bend?=true bend-flux.ctl | tee bend-flux.out I have an error message: meep: No match Could anyone suggest how to correct this mistake? Thanks, Yan ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss