Questions tagged [electromagnetism]
For questions about modeling phenomena related to electromagnetic fields.
124 questions
0
votes
0
answers
43
views
How to export a model (from e.g., Blender) to a finite difference grid?
Hoping we can get some help on this. We want to do electromagnetic simulations and need a regular finite difference mesh to do so. We want to be able to export a model (from e.g., Blender) to a finite ...
6
votes
1
answer
763
views
Electromagnetic Eigenvalue problem in FEM yielding spurious solutions
I have written an Electromagnetic FEM solver for waveguide Eigenvalue problems. I already wrote it in two different libraries, sparselizard and dolfinx. The relevant scripts are available here for ...
2
votes
0
answers
60
views
Field profiles using Transfer Matrix Method
I am using the Transfer Matrix Method to compute optical properties such as reflectivity, transmittance as well as to obtain guided modes for multilayer structures. Following the formalist presented ...
0
votes
0
answers
64
views
FDTD boundary condition that replicates an infinitely thin mirror
I'm currently running a 1-D FDTD simulation where I want to model a dielectric mirror (with an anti-reflection coating on one side but let's keep it simple for now). For my purposes, the mirror can be ...
1
vote
1
answer
103
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
61
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 ...
0
votes
0
answers
33
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 ...
3
votes
0
answers
185
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 ...
4
votes
1
answer
687
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 ...
2
votes
0
answers
69
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
44
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 ...
1
vote
1
answer
314
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
46
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 ...
1
vote
0
answers
37
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
64
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 ...
1
vote
0
answers
226
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 ...
0
votes
1
answer
208
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
votes
1
answer
92
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 ...
1
vote
1
answer
444
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) = +\...
0
votes
0
answers
176
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
40
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
99
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
220
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
44
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
127
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
132
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 ...
-1
votes
1
answer
742
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
685
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 $\...
5
votes
2
answers
290
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
360
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 ...
3
votes
1
answer
360
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 ...
1
vote
0
answers
60
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 ...
0
votes
0
answers
44
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\...
1
vote
1
answer
286
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
467
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
166
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
112
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
588
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
109
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 ...
0
votes
0
answers
235
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
86
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 ...
1
vote
0
answers
461
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 ...
1
vote
1
answer
131
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 ...
0
votes
0
answers
80
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],...
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 ...
0
votes
0
answers
336
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-...
0
votes
0
answers
144
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
911
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
75
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 ...