Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
6 votes
Accepted

Finite difference methods in cylindrical and spherical co-ordinate systems

There are basically two methods: You can disrectize the angular part via grid points, or you can discretize it via basis expansion. I will focus on spherical symmetry here, the cylindrical case is ...
6 votes
Accepted

How to create a good preconditioner for a system of linear equations that is created with FEM applied on the time harming Maxwell eqution?

As a preamble, I would not expect that splitting $E$ into real/imaginary parts is very profitable. Normally, block 2x2 systems are motivated because one block of unknowns is "easier" to ...
rchilton1980's user avatar
  • 4,896
5 votes

Minimum number of elements (mesh size) for electromagnetic simulation

The Maxwell system is a wave equation at heart, so your ansatz (the space where you seek solutions, the combination of your mesh and basis functions) must be able to faithfully represent waves. The ...
rchilton1980's user avatar
  • 4,896
5 votes

Calculation of the EFIE integral

A classic paper for evaluation of the integrals commonly present in computational electromagnetics (EM) is: D. R. Wilton, S. M. Rao, A. W. Glisson, D. H. Schaubert, O. M. Al-Bundak, and C. M. Butler, ...
Anton Menshov's user avatar
  • 8,672
5 votes

Is my differential equation solving code wrong?

The cross product with $H$ acts like a complex unit in the plane that has $H$ as normal, especially if you select $H$ to be a unit vector. Components parallel to $H$ remain unchanged. What you should ...
Lutz Lehmann's user avatar
  • 6,109
4 votes
Accepted

How to force potential boundary conditions in the Yee scheme for solving Maxwell's equations?

Interesting question. I would expect the Yee scheme to be indifferent to static (bias) fields induced by constant potentials. In the electrostatic case, if you have a constant electric potential $\...
rchilton1980's user avatar
  • 4,896
4 votes
Accepted

Integral of the Poisson Kernel

The tangent has periodic singularities, poles where it jumps from $+\infty$ to $-\infty$. At these points the inverse tangent will jump from $+\frac\pi2$ to $-\frac\pi2$. This is of course not ...
Lutz Lehmann's user avatar
  • 6,109
4 votes

Euler's Method for fast moving particle trajectory

I tried to modify your code as little as possible and include the comments by @lightxbulb. I changed the indices in the time stepping loop and modified $F$ and $B$ so that they are being updated in ...
Julian Roth's user avatar
3 votes
Accepted

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

Every iterative solver -- Jacobi, SSOR, CG, etc -- starts with an initial approximation. One often just uses the zero vector, but there is nothing wrong with using the solution of the previous time ...
Wolfgang Bangerth's user avatar
3 votes
Accepted

Graphing electric potential of a ring of charge using MATLAB help

You don't need symbolic variables to compute the approximated potential for your Riemann sums. You can just use meshgrid to evaluate the potential in each point of ...
nicoguaro's user avatar
  • 8,515
3 votes

Graphing electric potential of a ring of charge using MATLAB help

I received a solution to this question from MATLAB's community. Essentially, I need to specify which contour lines to plot using the 'levels' spot on the 'contour()' command. Levels allows you to ...
Andrew's user avatar
  • 163
3 votes
Accepted

Magnetic field simulation and visualization on Mac OS X?

For this purpose you need to use a simulation software. One of the most common methods in Electromagnetics would be Finite element method, but you can also find Boundary Element Methods or Finite ...
nicoguaro's user avatar
  • 8,515
3 votes
Accepted

Poincare map for Arnold-Beltrami-Childress Magnetic Field in Python

One first observation is that as $x,y,z$ are angles, one should take their values mod $2\pi$. Without that, the trajectory of the initial point $[0,0,0]$ exhibits this interesting pattern ...
Lutz Lehmann's user avatar
  • 6,109
3 votes
Accepted

Combine Hydrodynamics and Electromagnetics

Regarding simulation: There are several commercial solvers that might be helpful. A very popular FDTD Maxwell equation solvers for nanophotonics is Lumerical. It features opto-thermal and liquid ...
Anton Menshov's user avatar
  • 8,672
3 votes
Accepted

Introducing EigenModes from 2D FEM into 3D FEM

You're looking for waveguide port boundary conditions. I think the most accessible treatment is within Jin & Riley's Finite Element Analysis of Antennas and Arrays, Chapter 5. It's available on ...
rchilton1980's user avatar
  • 4,896
3 votes
Accepted

Questions about implementing an electromagnetism/photonics solver package

Your questions suggest that you are new to implementing solvers for PDEs, and that you are not familiar with the usual data structures and algorithms used in this field. It would probably be very ...
Wolfgang Bangerth's user avatar
3 votes
Accepted

Is this a proper implementation of point charge dynamics with ODEs

It's an interesting question - how does a dipole actually move? It seems to me you're not entirely sure what to expect, so we need to get a solid test case where we understand what's actually going on....
Dominik Stańczak's user avatar
3 votes
Accepted

Edge and Nodal finite element methods in MATLAB for Magnetic induction tomography

The paper: I. Anjam, J. Valdman, "Fast MATLAB assembly of FEM matrices in 2D and 3D: Edge elements", Applied Mathematics and Computation, 267, (2015), 252–263; states the following. http://www....
Brendan Darrer's user avatar
3 votes

Minimum number of elements (mesh size) for electromagnetic simulation

It sounds like you are interested in a finite-element analysis, which is out of my area of expertise. But I can hopefully provide some insight from the perspective of finite-difference methods which ...
Superbee's user avatar
  • 211
3 votes

Kronecker product representation of the finite difference laplacian

This is my attempt at providing some intuition. Everything I state might be obvious, moreover it doesn't have much to do with physics, so this could be a non-answer. I will ignore boundary conditions. ...
Eman Yalpsid's user avatar
3 votes
Accepted

Kronecker product representation of the finite difference laplacian

Maybe this isn't a helpful response but the reason this happens for the matrix form of Laplacians is because this actually happens for the true infinite-dimensional Laplacians in some settings. In ...
whpowell96's user avatar
  • 2,478
3 votes

Simple reference problems for time harmonic Maxwell equations

That depends a lot on the specific numerical method in use, 2D/3D, and application. Common reference problems are likely to have an analytical solution or be verifiable qualitatively by some ...
Anton Menshov's user avatar
  • 8,672
3 votes
Accepted

Finite element method for high-frequency electromagnetics

Using the typical expansion functions (1-forms/edge-elements for E, and 2-forms/facet-elements for B) the formulations are basically the same after spatial discretization and you'd expect more or less ...
rchilton1980's user avatar
  • 4,896
3 votes

Using ODE to plot particle-motion with scipy.integrate.solve_ivp

Your particle is a rounded proton (mass m = 2e-27 kg instead of 1.672e-27 kg). The equation of motion is $$ \dot x=v,~~~ m\dot v ...
Lutz Lehmann's user avatar
  • 6,109
3 votes
Accepted

Billiard reflection inside a triangular mesh

Funnily enough, determining the relationship between a point and a triangle is a big part of the work I'm doing right now on supersonic panel methods (check out https://github.com/usuaero/MachLine). ...
byl's user avatar
  • 64
2 votes
Accepted

Why FEM electric analysis gives only access to current density?

They are saying the same thing, at a fundamental level - it's just that the implementation is a bit different. The first equation you noted is valid throughout the system because it solves for the ...
cbcoutinho's user avatar
2 votes
Accepted

FEM or FD eigenvalue equation to get wave number instead of cutoff frequency

Assuming that you have scalar permitivity and permeability, you can relate your wavenumber with your angular frequency by $$\omega = kc$$ where $c = 1/\sqrt{\epsilon_0 \mu_0}$ is the speed of the wave ...
nicoguaro's user avatar
  • 8,515
2 votes

Data analysis of a magnetic hysteresis loop

First, you can replace the hysteresis plot with either smooth or piecewise-linear model presented in the article “An improved parametric model for hysteresis loop approximation” (R. V. Lapshin, Review ...
Rostislav V. Lapshin's user avatar
2 votes
Accepted

How to deal with numerical errors in electrostatic field calculations

I will try to answer the part of the question regarding the accuracy of the calculation, which certainly affects all the other things. Integrals of the type ($T_j$ denoting the $j$th triangle in the ...
Anton Menshov's user avatar
  • 8,672

Only top scored, non community-wiki answers of a minimum length are eligible