Questions tagged [electromagnetism]

For questions about modeling phenomena related to electromagnetic fields.

Filter by
Sorted by
Tagged with
2 votes
0 answers
55 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
0 votes
0 answers
72 views

Book recommendation on multiphysics

I want to learn multiphysics such as fluid-structure interaction where the simulation is performed for heat transfer, fluid dynamics, and electrodynamics. Could you please recommend some books about ...
  • 21
0 votes
0 answers
42 views

Unstable FDTD for axisymmetrical wave propagation

I am writing a 2.5D axisymmetric FDTD solver for Maxwell equations. It operates on three fields on staggered grids ($E_r$, $E_z$, $B_\varphi$). As a test problem, I am considering a cylindrical ...
1 vote
0 answers
132 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
0 answers
51 views

How to define a stretched coordinate perfectly matched layer (PML) parameters for maximum absorbtion?

I have written a MATLAB code for solving Maxwell's equations (electromagnetic wave propagation) in 3D with perfectly matched layer (PML) boundaries. I am using a stretched coordinate PML, but I see ...
0 votes
1 answer
125 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
82 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
369 views

Integral of the Poisson Kernel

I am trying to solve the following integral: $$ I (r,\theta) = \frac{1}{2\pi}\int_0^{2\pi}\frac{f(\phi)(1-r^2)}{1+r^2-2r \cos(\theta-\phi)}d\phi$$ where $0\le r<1$ and, $$f(0\le\phi<\pi/2) = +\...
  • 195
0 votes
0 answers
145 views

Finite difference solver for the 2D Poisson's equation with an integral boundary condition

I wanted to attempt an implementation of a finite-difference-based solver for the 2D elctrostatic Poisson equation when metallic objects are present. Also, I hope to take as input, the location of ...
1 vote
0 answers
37 views

Can I build an electrostatic simulation of conductive objects using just the method of images?

I wish to build a simulation of self-assembling wires. Think lots of ball bearings in a 20KV electric field and they form emergent structures. If I use the method of images to figure out what the ...
-1 votes
1 answer
77 views

Meep C++ interface benchmark

I am having trouble getting a good parallelization with FDTD simulations in Meep. Originally, I tried to use the Python interface on a rather big computing cluster, but the runtime of my simulations ...
0 votes
0 answers
147 views

2D axisymmetric Magnetostatics Finite Element Method solver

I am new to the field of magnetostatics. I wish to write a 2D finite element code for obtaining the magnetic field inside a solenoid coil. I have started with a 2D code and have followed the method as ...
1 vote
0 answers
42 views

Digital beamforming: how payload manipulation can change beam direction without manipulating the carrier?

I'm interested in how digital beamforming works and I can not find an answer for a lot of time. I googled, asked teammates, and couldn't get it. Let me describe my question. From my understanding, the ...
0 votes
0 answers
101 views

Plotting the motion of a positive charge in a cylindrically symmetric magnetic field

I want to plot the motion of a positive charge in a cylindrically symmetric magnetic field. I am assuming a cylinder around the z-axis, with the magnetic field going in clockwise direction. The B-...
0 votes
1 answer
90 views

How to Calculate magnetic and electric field in 2D Magnetotelluric using Edge based Finite Element

I calculate 2D Model of Magnetotelluric responses which are apparent resistivity and phase. I do the calculation for Transverse Electric (TE) mode. Then I used edge based finite element with ...
  • 9
-1 votes
1 answer
465 views

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

My Problem: A positively charged particle (mass = 2 * 10-27 kg) is moving along the x-axis. It is travelling in a homogenous magnetic field such that the field axis in z-direction. The energy of the ...
4 votes
1 answer
369 views

Weak Formulation of Poisson's Equation for Electrostatics with Surface Charge

I am currently attempting to use FEnICS to solve an electrostatic problem with two materials of different permittivity $\varepsilon_1$ and $\varepsilon_2$ forming an interface: Consider a domain $\...
  • 43
5 votes
2 answers
211 views

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

I set out to solve the time harmonic Maxwell equation numerically which was discritzed using FEM and with the use of Nedelec elements as basis and test functions. The equation reads: $$ \nabla \times \...
0 votes
0 answers
162 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
249 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
53 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
40 views

Calculating magnetic flux density

I have a geometry where current density distribution is constant. I can calculate the $z$ component of magnetic flux density according to Biot-Savart law as following: $$B_z(x,y,z) = \int\limits_x\int\...
  • 11
1 vote
1 answer
163 views

Electrostatic Force - Simulate Trajectory of Test Particle using Runge Kutta - Force always Repels

In the center of a 2D-Plane a positive static charge Q is placed with position r_prime. This charge creates a static electrical Field E. Now i want to place a test particle with charge Q and position ...
2 votes
0 answers
273 views

Numerical simulation of magnetic dipole in a inhomogeneous magnetic field

Goal: I want to use Python to illustrate how a magnetic dipole with magnetic moment m2 moves in a non-homogeneous magnetic field in a 2D-Plane. This field is generated by another magnetic dipole with ...
-1 votes
1 answer
142 views

plotting $F=K \frac{q_1 q_2}{r^3}$ in python

I tryin to plot the position of electron in the hidrogen atom by Coulomb's law, $F=K \frac{q_1 q_2}{r^3}$ This is mi code ...
6 votes
0 answers
108 views

A Question About a Claim from 1991 Computational EM paper about the Cancellation of certain Boundary Terms

Please let me know if this is not the appropriate site for this question. I found questions regarding EFIE/MFIE/CFIE on this site, so I thought my question might fit. I am studying the paper by Putnam ...
2 votes
1 answer
369 views

Help with modified bessel functions

I'm trying to parse the following expression (Eq. 35 in The Magnetic Field in the Vicinity of Parallel and Twisted Three-Wire Cable Carrying Balanced Three-Phased Current) in Python and calculate its ...
1 vote
0 answers
79 views

How can I improve the accuracy of the calculation of the magnetic field in Gmsh/GetDP?

I need to calculate the magnetic field along a straight line in proximity of an array of 6 magnets. I used the tutorial files "magnets" included in Gmsh and I slightly modified the file in ...
  • 111
0 votes
0 answers
168 views

How to use FEniCS to calculate the electric field of an isolated charged sphere

Initially I thought that this is the kind of question which ought to have already been answered in the form of an example online, but so far I haven't found one. I will admit that I am very new to ...
0 votes
0 answers
79 views

How to calculate the interior value of triangular element in edge (vector) finite element?

I was using an edge (vector) finite element to solve electromagnetic diffusion (two-dimensional cases). The element that I used was a triangular element. I have got the result of the finite element in ...
  • 9
1 vote
0 answers
315 views

More efficient way to calculate magnetic field using Biot-Savart

I am writing a program in python that is supposed to calculate the magnetic field along a conducting coil that is made up of a bunch of points, and the magnetic field is generated by other conducting ...
  • 11
1 vote
1 answer
107 views

Simple reference problems for time harmonic Maxwell equations

For Navier-Stokes problems we can often choose a relatively simple verification problem such as the lid driven cavity, flow over a cylinder, or flow over a backward facing step to verify our ...
  • 66
0 votes
0 answers
79 views

Numerical scheme to calculate the normal mode of a set of hyperbolic PDEs?

I would like to solve the linearised, ideal, MHD equations, where the gas pressure is zero. $$\frac{\partial u_x}{\partial t}=v_A^2(x,z)\left[\nabla_{||}b_x - \frac{\partial b_{||}}{\partial x}\right],...
  • 219
4 votes
1 answer
2k 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
175 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
1k 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
65 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
639 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
68 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
855 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 ...
0 votes
0 answers
490 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
356 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
85 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
0 votes
0 answers
143 views

FEniCS implementation of Maxwell equations for a dipole antenna

someone knows where I can find a FEniCS implementation of Maxwell equations for a dipole or other type of antenna? I mean a dipole antenna with an arbitrary geometry of every 'leg' in the dipole.
1 vote
0 answers
45 views

Multipole expansion for magneticfield intesity (magnetization)

I'm using the Barnes Hut method to calculate the magnetic vector potential induced by an applied current. Given as: $\begin{equation} A(r) = \frac{\mu_0}{4\pi} \int_V\frac{\bf{J(r')}}{|r-r'|}dV(r') \...
  • 11
3 votes
2 answers
1k views

Electromagnetism FEM (FEniCS) interpolation - leakage effect

As for the background of what is going on: I'm using FEniCS that is dedicated FEM solver The problem I'm solving is magnetostatic problem where the governing PDE is $$ \bf{\nabla} \times \frac{1}{\mu}...
  • 41
3 votes
2 answers
2k views

Graphing electric potential of a ring of charge using MATLAB help

Here is a summary of what I am trying to do: Use MATLAB to compute the potential $V$ at any point $(x, y, z)$ in space due to a uniform ring of charge. Use a Riemann sum to compute the integral ...
  • 163
1 vote
1 answer
120 views

Demagnetizing field using scalar potential method

I want to calculate the stray magnetic field from a ferromagnet using the scalar potential method (1). The problem consists of a ferromagnetic cuboid divided into small cuboidal cells in which the ...
  • 11
-1 votes
1 answer
79 views

Simulating magnetic particles in a field free point generated by two opposing magnets

This is probably a long shot with such a short time, but I've been trying to get theoretical data for a project I'm working on. The project involves using a very simplified version of magnetic ...
0 votes
1 answer
308 views

TMZ TME modes, clarification

I'm refering here to Taflove's "computational electrodynamcis, 3rd ed." He says Let us assume that the structure being modeled extends to infinity in the z-direction with no change in the shape ...
  • 146