Here's the electric potential and field overlaid for a uniform cylindrical charge distribution created using FEniCS, an opensource finite element solver. Although this is a simple analytical problem, this technique can be used for much more complicated geometries.
Next up: linear dielectrics, I've tested in both 2D and 3D and I'm ready to write it up =] surprisingly easy!
New post: electrostatic problems with charge densities in FEniCS. A domain is specified within the mesh to have a uniform charge density, the fields both inside and outside the region are then solved. The finite element solution is then compared with the analytical result. All materials available as a repo. https://wp.me/p8Kvfs-cX #physics #electromagnetism #python #opensource #rf
After a couple of months without a new post I've started writing about simulating charge distributions, rather than just boundary value problems. I'll explain how #FEniCS can calculate the electrostatic fields of arbitrarily shaped charge densities, which are specified with mesh subdomains. These will have hard edges for now but I want to look into having more general charge distributions.
I've also run 3D simulations for calculating capacitances between arbitrarily shaped conductors and 2D linear dielectrics. I need to do some more testing & comparison with other FEA tools/ analytical methods before I publish any posts. Seems to be going well though!
I was reading the help files of a well-known commercial microwave FEA package and it suggested calculating characteristic impedance from the power and voltage rather than finding the current directly.
This way doesn't require surface normals or line integrals which my previous methods did, so it's probably better (easier to do anyway). I've added this into my TEM mode post - https://comphysblog.wordpress.com/2018/09/06/tem-mode-analysis-with-fenics/
Just made a bow tie, surprisingly easy. Actually putting it on is another matter.
I've just finished my new post: TEM mode analysis with #FEniCS an #opensource finite element differential equation solver. https://comphysblog.wordpress.com/2018/09/06/tem-mode-analysis-with-fenics/
In this post I calculate the electric and magnetic fields on a coaxial cable, characteristic impedance of the line, the Poynting vector, the conductor and dielectric loss, an estimated loss coefficient, Q-factor and s-parameter for a given length of cable.
Coax has been a useful example for comparisons with analytical results but the methods are very general. TEM modes of systems with different geometries can also be analysed with the exact same techniques!
Very happy to hear any comments, corrections or suggestions.
Starting my next post which will be about the TEM mode on a two-conductor transmission line. Specifically I'll be looking at a coaxial geometry and using #FEniCS to calculate the field distributions, the characteristic impedance and the Poynting vector. Just had a go and it all seems to be working.
While I'll focus on a coaxial geometry the method can be extended to more complicated geometries just by changing the mesh & boundaries. I've just had a go at an odd mode impedance and it came out just right!
The best thing about this post will be how easy it is.
Does the \LaTeX support work?
I use wxmaxima as a mathematica alternative. I don't consider it to be as polished as mathematica but in general it's pretty amazing.
The syntax of sympy puts me off (too much like programming) and I find sage to be a bit too huge and clunky.
What computer algebra systems does everybody else use?
3D electrostatics example using #FEniCS. In this example I solve the Laplace equation for two concentric spheres to obtain an electric potential and take the gradient to find the electric field. The results are then compared with an analytical solution.
The geometry is produced in FreeCAD and the mesh/ boundaries produced with Gmsh.
Please let me know if you have comments or corrections!