Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

I wrote a few lines that numerically solve Maxwell's equations.

The result is a moving wave that looks like a single pulse.

This looks strange to me because I expect waves to move in oscillator fashion, perhaps like cos(x).

Why doesn't the wave appear to oscillate?

How does this kind of Gaussian wave work? Can it be broken into solutions?

Do similar solutions exist in 2D? Are they still Gaussian?

%%Super basic FDTD
clear all;
gsz=100;
ez=zeros(gsz);hy=zeros(gsz);
imp=377.0;
%
steps = 100;
for i=1:steps
    for j=1:(gsz-1)
        hy(j)=hy(j)+(ez(j+1)-ez(j))/imp;
    end
    for j=2:gsz
        ez(j)=ez(j)+(hy(j)-hy(j-1))*imp;
    end
    ez(gsz)= ez(gsz)+exp(-((i-30)^2) /100);
    subplot(2,1,1);
    plot(ez);
    subplot(2,1,2);
    plot(hy);
    M(i)=getframe;
end
share|improve this question
    
If you're asking if there are errors in the code that you've posted, it's probably better suited to StackOverflow. But if you're wondering about how these kinds of solutions come from Maxwell's equations, then I suggest you reframe your question with the equations you used. In this form, your question isn't strictly relevant. :) –  Kitchi Mar 13 '13 at 11:06
    
@Kitchi, I am confident there are no errors in the code. I want to know if a pulse like solution should have oscillations as it travels. If I didn't make this clear please rephrase my question. –  Mikhail Mar 13 '13 at 14:01
1  
@Mikhail your question isn't bad as is, but it would probably help if you remove the code to make it clear that you're not asking coding questions. You could put an animated image of the solution you found instead. –  David Z Mar 13 '13 at 17:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.