Skip to main content
Share Your Experience: Take the 2024 Developer Survey

# Questions tagged [electromagnetism]

For questions about modeling phenomena related to electromagnetic fields.

120 questions
Filter by
Sorted by
Tagged with
1 vote
1 answer
67 views

### How to Implement Analytical Magnetic Field Equations into a Physics-Informed Neural Network (PINN) in PyTorch?

I'm working on a project that involves modeling the magnetic field around Europa, one of Jupiter's moons, using a Physics-Informed Neural Network (PINN) in PyTorch. My goal is to implement analytical ...
0 votes
0 answers
50 views

### Calculating a 2D Ewald sum for a multipolar expansion

I am attempting to calculate the potential of a particle at the center of an infinite two-dimensional lattice as per the following reference: Reference: Lambin, PH & Senet, P. Ewald Summation of ...
• 33
0 votes
0 answers
30 views

### Problems performing 1D-FDTD for dispersive dielectric uisng lorentz model in Julia

So I am trying to model a dispersive dielectric using the Lorentz model in Julia, more specifically I am trying to obtain the frequency-dependent reflectivity of the material. I am ultimately trying ...
2 votes
0 answers
87 views

### Numerical integration in Fourier space over 3D grid

I am attempting to implement a model outlined in this paper: General magnetostatic shape–shape interactions Background This model allows the calculation of magnetostatic interaction energies between ...
• 33
4 votes
1 answer
662 views

### Is my differential equation solving code wrong?

I am trying to simulate LLG equation without damping. The equation is $$\frac{d\vec{m}}{dt} = \vec{m}\times\vec{H}$$ I am solving in spherical coordinates as LLG equation is known to have problems in ...
• 141
2 votes
0 answers
49 views

### In electromagnetic simulation, how much does the feed model impact an antenna's directivity performance and E-field phase readings?

Question: How much would a simplified feed model in an EM simulation alter an antenna's directivity and the E-field phase reading when compared to using a more complicated/realistic feed model? I am ...
1 vote
0 answers
42 views

### Spectral Intensity of complex signal

I'm simulating an electromagnetic wave that has a real and imaginary part. Something like: $$E(x,t) = A(x,t) e^{-i(\omega t - k x)}$$ Where $A(x,t)$ is some complex amplitude. Then taking the ...
• 11
1 vote
1 answer
302 views

### Euler's Method for fast moving particle trajectory

I'm trying to figure out how a magnet affects the trajectory of a particle travelling near the speed of light downwards toward the ground. The equation for the force of the magnetic field is pretty ...
1 vote
0 answers
41 views

### Stress and periodic boundary conditions

In the textbook definition of the stress tensor it is defined at each point in space and therefore position dependant. When three dimensional periodic boundary conditions are used, I have seen it ...
• 11
1 vote
0 answers
30 views

### How can the current-voltage relationship of a series of tunneling junctions be most easily computed?

I'm working on a research project with my professor where we're trying to figure out how to determine the necessary semiconductor composition for a solar cell to have a particular bandgap in order to ...
2 votes
0 answers
62 views

### Symplectic (or alike) integrator for system with Coulomb singularity and time-dependent potentials

I am trying to calculate classical trajectories for a single positive ion and a single electron inside an RF trap. Therefore, I am dealing with a two-body system that possesses: Coulomb potential ...
• 21
1 vote
0 answers
206 views

### Magnetic field simulation for "quasi-solenoid" - Where to start?

I would kindly ask you which (preferably free) programs / codes do you suggest for the numerical simulation of the problem described below. I am not asking for the full solution, but just want to ...
• 11
0 votes
1 answer
175 views

### Modeling ferromagnetic materials in a primitive python FEA

I am working on a primitive 2D DIY magnetic "FEA" solver for a class project. It's really just a big NumPy array where each element in the array can be one of the following: Air Current ...
• 1
-1 votes
1 answer
84 views

### Billiard reflection inside a triangular mesh

I am currently interested in billiards and their trajectories. I would like to simulate a billiard inside a water-tight mesh. A mesh basically consists of a list of points in 3D space (vectors with 3 ...
• 113
1 vote
1 answer
418 views

• 446
0 votes
0 answers
275 views

### FEM port Boundary definition for electromagnetics and wave guides

We are currently in the process of implementing ports in our EM FEM simulation SW. We have come across the definition of boundary conditions for the ports, and we do not understand the equation for ...
• 33
3 votes
1 answer
315 views

### Finite element method for high-frequency electromagnetics

I am writing a project about the Finite element method for use in high-frequency solutions of Maxwell's equations. This could be for use in antenna design and similar. I have some trouble ...
• 33
1 vote
0 answers
57 views

### Results blow up when number of intervals is increases (Yee algorithm FDTD, dielectric sphere)

I have been trying to write a program that analyses EM wave scattering by a dielectric sphere for a project. The reference is Sadiku's book Numerical Methods in electromagnetics Edition 3. Now the ...
• 41
0 votes
0 answers
43 views

• 219
4 votes
1 answer
4k views

### Finite difference methods in cylindrical and spherical co-ordinate systems

I am quite familiar with finite difference schemes in cartesian coordinates. The key point here is that every point in the cartesian grid is treated equally as the spacing between consecutive points ...
• 195
0 votes
0 answers
301 views

### COMSOL Circularl polarization

I'm having some problems trying to implement circularly polarized light in COMSOL Muliphysics. For a isotropic homogenous media, I've obtained without problems the TE and TM reflectance curves. ...
4 votes
2 answers
2k views

### Kronecker product representation of the finite difference laplacian

The laplacian equation when discretized gives a system of linear equations that can then be solved. See the answer to this question: https://math.stackexchange.com/questions/3120948/discretization-...
• 195
0 votes
0 answers
125 views

### Discretisation by FVM with triangulare mesh

I work on electromagnetic modeling, and I use the finite volume method as a tool, so I want to develop code by the modified finite volume method (with triangular mesh), my problem studied is in a ...
1 vote
1 answer
829 views

### Simple particle-in-cell examples

I am studying about the 1D EM-PIC (Electro Magnetics using particle-in-cell) simulation. I want to have a simultaneous time-integration of the electric/magnetic fields plus the motion of free charges ...
3 votes
0 answers
70 views

### Spectral solver on em-pic

I'm recently studying for the spectral solver to implement EM-PIC code. I read an article and have some questions. Many PIC codes uses spectral solver to overcome numerical artifacts on FDTD. In the ...
3 votes
2 answers
1k views

### Minimum number of elements (mesh size) for electromagnetic simulation

Does someone have a reference for the minimum number of elements (or maximum mesh size) for electromagnetic simulations where a mathematical or numerical explanation is given? I have found several ...
• 570
0 votes
0 answers
688 views

### Parallel plate capacitor as simple superposition of Coulomb-fields

I am trying to calculate and visualize the electric field inside and outside of a parallel plate capacitor by assuming a uniform distribution of point charges on each plate and by adding up the ...
• 11
2 votes
1 answer
407 views

### MATLAB's ode45 not dealing with initial conditions well [RESOLVED]

*Concern highlighted in yellow *Solution at bottom I have a differential equation to solve for the motion of an electron:  \frac{d^2v}{dt^2} = \frac{1}{\gamma^6}\left( \frac{eE}{\tau m} - \left( \...
2 votes
1 answer
92 views

### Is there any method to incorporate minor changes into solved meshes to speed convergence in particle-in-cell solvers?

I'm trying to perform a $10^6$ timestep electrostatic particle-in-cell simulation on a rather large mesh, with very limited computational resources (a single GPU). Because of the large number of ...
• 123