Re: [Meep-discuss] bragg structure with kerr effect ....

2015-06-16 Thread Mohammad alshikh
Filip Dominec filip.dominec@... writes:

 
 Hi, Alshikh,
 from what I understand, you shall introduce another callback function
 like your  eps_bragg(const vec pt), which will return the value of
 the Kerr coefficient. It should be called in a similar manner as e.g.
 the susceptibilities are.
 
 I always found it useful to test out the Kerr nonlinearity in a
 homogeneous medium first; when I got an obvious anharmonic wave
 distortion after a while, I could be sure the nonlinearity is well
 defined.
 
 Hope this helps a bit,
 Filip
 

Thank you Dominec very much for the prompt reply,

The problem solved. I have to define two functions one for the linear 
material eps() and the other implement the nonlinear effect e.g. alpha().  

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] bragg structure with kerr effect ....

2015-06-15 Thread alshikh

Hello,


I have a bragg structure like the one defined in the example 
bragg_transmission.cpp



double eps_bragg(const vec pt) {

  double z = pt.z() - zsize * 0.5;



  if (fabs(z)*2  Nperiods)

return nlo*nlo;

  else {

double zi;

double zf = modf(z, zi);

if (zf  0) zf += 1;

if (zf  wlo)

  return (nlo*nlo);

else

  return (nhi*nhi);

  }

}



how can I add (kerr) nonlinear property to the material which have high 
refrective index? so I can do s.chi3_set(value)...



Thank you .




___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] bragg structure with kerr effect ....

2015-06-15 Thread Mohammad alshikh
Hello,

I have a bragg structure like the one defined in the meep example 
bragg_transmission.cpp

double eps_bragg(const vec pt) {
  double z = pt.z() - zsize * 0.5;

  if (fabs(z)*2  Nperiods)
return nlo*nlo;
  else {
double zi;
double zf = modf(z, zi);
if (zf  0) zf += 1;
if (zf  wlo)
  return (nlo*nlo);
else
  return (nhi*nhi);
  }
}

how can I add (kerr) nonlinear property to the material which have high 
refrective index? so I can do s.chi3_set(value)...

Thank you .



___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] bragg structure with kerr effect ....

2015-06-15 Thread Filip Dominec
Hi, Alshikh,
from what I understand, you shall introduce another callback function
like your  eps_bragg(const vec pt), which will return the value of
the Kerr coefficient. It should be called in a similar manner as e.g.
the susceptibilities are.

I always found it useful to test out the Kerr nonlinearity in a
homogeneous medium first; when I got an obvious anharmonic wave
distortion after a while, I could be sure the nonlinearity is well
defined.

Hope this helps a bit,
Filip

2015-06-15 16:02 GMT+02:00, alsh...@netcourrier.com alsh...@netcourrier.com:

 Hello,


 I have a bragg structure like the one defined in the
 example bragg_transmission.cpp



 double eps_bragg(const vec pt) {

   double z = pt.z() - zsize * 0.5;



   if (fabs(z)*2  Nperiods)

 return nlo*nlo;

   else {

 double zi;

 double zf = modf(z, zi);

 if (zf  0) zf += 1;

 if (zf  wlo)

   return (nlo*nlo);

 else

   return (nhi*nhi);

   }

 }



 how can I add (kerr) nonlinear property to the material which have high
 refrective index? so I can do s.chi3_set(value)...



 Thank you .






___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss