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

  • Thread starter lemoz
  • Start date
In summary, the article discusses common reasons why a Debye medium wave simulation may not yield expected results. It highlights potential issues such as incorrect parameter settings, improper boundary conditions, insufficient resolution in the simulation grid, and inaccuracies in the physical model being used. The article emphasizes the importance of verifying input data, examining the simulation setup, and conducting sensitivity analyses to identify and resolve discrepancies for improved accuracy in simulation outcomes.
  • #1
lemoz
2
0
Frequency dependant material simulation
 
Engineering news on Phys.org
  • #2
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?
 
  • #3
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

  • Freqdep.docx
    23.9 KB · Views: 72
Last edited by a moderator:

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

What programming language should I use to simulate a wave impinging on a frequency dependent material in one dimension?

The choice of programming language depends on your familiarity and the specific requirements of your simulation. Commonly used languages for such simulations include Python, MATLAB, and C++. Python is user-friendly and has powerful libraries like NumPy and SciPy. MATLAB is excellent for matrix computations and has built-in functions for wave simulations. C++ is highly efficient for computationally intensive tasks.

What are the basic equations governing wave propagation in a frequency dependent material?

The basic equations include the wave equation, which is typically a second-order partial differential equation (PDE). For a frequency dependent material, the material properties such as permittivity, permeability, and conductivity can vary with frequency, leading to a modified wave equation. The general form of the wave equation is ∂²u/∂t² = c²∇²u, where c is the wave speed. For frequency dependent materials, c can be a function of frequency.

How do I implement boundary conditions for the simulation?

Boundary conditions are crucial for accurately simulating wave propagation. Common boundary conditions include Dirichlet (fixed value) and Neumann (fixed gradient) conditions. For a one-dimensional simulation, you can set these at the edges of your simulation domain. For example, u(0,t) = A for a Dirichlet condition at the start, or ∂u/∂x|_(x=0) = B for a Neumann condition. Absorbing boundary conditions like Perfectly Matched Layer (PML) can also be used to minimize reflections.

How can I account for the frequency dependence of the material properties in the simulation?

To account for frequency dependence, you can use a Fourier Transform approach. Transform the wave equation into the frequency domain using the Fourier Transform, solve the equation for each frequency component, and then transform the solution back to the time domain using the Inverse Fourier Transform. This allows you to handle the frequency-dependent material properties effectively.

Are there any libraries or tools that can help with wave simulation in one dimension?

Yes, there are several libraries and tools that can assist in wave simulation. For Python, libraries like NumPy, SciPy, and FiPy are useful. MATLAB has built-in functions for solving PDEs and wave equations. For more specialized tasks, you might consider using finite element method (FEM) libraries such as FEniCS or MOOSE. These tools can simplify the implementation and help with numerical stability and accuracy.

Back
Top