Why Isn't My Debye Medium Wave Simulation Producing Expected Results?

  • Thread starter Thread starter lemoz
  • Start date Start date
AI Thread Summary
The discussion focuses on troubleshooting a simulation of electromagnetic wave propagation in a Debye medium, highlighting issues with expected results. Participants inquire about the frequency range, the meaning of "one dimension," and the user's familiarity with simulation software like ANSYS and COMSOL. The user shares their code, indicating potential problems with the absorbing boundary conditions. The conversation emphasizes the importance of clarifying the setup and ensuring proper implementation of simulation parameters for accurate results.
lemoz
Messages
2
Reaction score
0
Frequency dependant material simulation
 
Engineering news on Phys.org
Welcome to PF.

What have you found in your Google searching so far? What frequency range do you need to simulate? What do you mean by "one dimension"? Can you show a sketch of the setup that you want to simulate?

Have you looked at standard simulation packages like ANSYS and COMSOL? Are you a university student currently? If so, do you have access to student versions of those simulation packages?



If you are not a student, what is this project for?
 
Ok. I will try to be more explicit. I try to simulate a debye the propagation of electromagnetic wave in a debye medium with this code below. But i have trouble, i don’t have expected result and i don’t wich is the problem. I think that the absorbing boundary condition don’t work correct lu.

[Mentor Note: pasted your Word document code into the code box below]
Code:
Program debyeformulation;
Const
    size=200;
Var
     dz: array[0..size-1] of real;
     ez: array[0..size-1] of real;
     hx: array[0..size-2] of real;
     ga: array[0..size-1] of real;
     gb: array[0..size-1] of real;
     gc: array[0..size-1] of real;
     ix: array[0..size-1] of real;
     sx: array[0..size-1] of real;
     Time,maxTime,i:integer;
     dx,dt,epsz,epsilon,sigma:real;
     t0, spread, pulse:real;
     tau,hi ;
     ezl1,ezl2,ezh1, ezh2:real;
     monfichier:text;
begin
     assign(monfichier,'debyeformul100.txt');
     rewrite(monfichier);
     dx :=0.01; dt:=dx/6e8; epsz:=8.8e-12;
     for i:=0 to size-1 do
     begin
            ga[i]:=1.0; gb[i]:=0.0; gc[i]:=0.0; dz[i]:=0.0; ez[i]:=0.0; hx[i]:=0.0; ix[i]:=0.0; sx[i]:=0.0;
     end;
     
     ezl1:=0.0;  ezl2:=0.0; ezh1:=0.0; ezh2:=0.0;
     epsilon:=2.0; sigma:=0.01; hi:=2.0; tau:=0.001;
     for i:=100 to size-1 do
     begin
            ga[i]:=1.0/(epsilon+sigma*dt/epsz+hi*dt/tau);
            gb[i]:= sigma*dt/epsz;
            gc[i]:= hi*dt/tau;
     end;
     for i:=0 to size-1 do
     begin
           writeln(i,'',ga[i]:6:2,'',gb[i]:6:2,'',gc[i]:6:2);
     end;
    maxTime:=100; t0:=50.0; spread:=10.0;
    for Time:=0 to maxTime-1 do
    begin
          for i:=1 to size-2 do
          begin
                dz[i]:=dz[i]+0.5*(hx[i-1]-hx[i]);
          end;
              pulse:=exp(-0.5*(Time-t0)*(Time-t0)/spread);
              dz[5]:=dz[5]+pulse;
          for i:=1 to size-2 do
              begin
                     ez[i]:=ga[i]*(dz[i]-ix[i]-sx[i]);
                     ix[i]:=ix[i]+gb[i]*ez[i];
                     sx[i]:= exp(-dt/tau) *sx[i]+gc[i]*ez[i];

              end;
             ez[0]:= ezl2;
             ezl2:= ezl1;
             ezl1:= ez[1];
             ez[size-1]:= ezh2;
             ezh2 :=ezh1
             ezh1 :=ez[size-2] ;
             for i:=0 to size-1 do
             begin
                  hx[i]:=hx[i]+0.5*(ez[i]-ez[i+1]);
             end;

      end;
      for i:=0 to size-1 do
      begin
            write(monfichier,i,' ',ez[i]:1:3);
            writeln(monfichier);
      end;
         close(monfichier);
      readln;
end.
 

Attachments

Last edited by a moderator:
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top