Save the result in Mathematica

Mathematica notebook is a powerful tool to save all the program and data together. Sometimes it is much better to save the result in a separated file for re-use. For example, there is a script to scan the parameters in a wide range. It may take a lot of time. The result is always a … Read more

Get the plot data in comsol application program

Comsol is good at post processing and visualization. However some special analysis is necessary in the comsol application program. For example, determine to mode number in special direction after a eigen mode analysis. The comsol can plot the electrical field along a line but it doesn’t tell the mode number. We have to write some … Read more

Transverse electric(TE) wave in circular waveguides

Circular waveguides offer implementation advantages over rectangular wave guide is that installation is much simpler when forming runs of turns and offsets. The uniform section in the gyrotron cavity is a circular waveguide. The working mode is usually a transverse electric mode in the cavity. Here is a calculator for the Transverse Electric mode in … Read more

Golang VScode debug config

Go is an open source programming language. It is usually called modern C language. I think it is suitable for scientific computation in electromagnetic because it is support the complex number computation. So I tried to use it to solve a complex ordinary differential equations. Development Environment VScode is a free and popular development IDE … Read more

Eigenmodes of the gyrotron cavity

Gyrotron is a microwave oscillators. It changes the DC energy to high power millimetre microwave. It has been successfully used in the magnetic confinement thermonuclear fusion research as the microwave source for the electron cyclotron resonance heating and current drive. A typical gyrotron cavity consists of a central section and one taper section at both … Read more

Weak form of Helmholtz equation

Weak form is an important tool for the analysis of electromagnetic problems. It is a bridge from the partial differential equations to the linear algebra. For example, the Helmholtz equation with wave number \(k_c\) is \(\nabla_t^2 \phi+k_c^2 \phi=0\) It is so-called “strong form”, in which the unknow is in the 2nd order differential operator. It … Read more

A way to memorize the boundary conditions

It is very important to specify boundary conditions at material interfaces and physical boundaries in order to get a full description of an electromagnetic problem. However the boundary conditions between two media is difficult to memorize. Here we present a way to memorize them. The maxwell’s equations are \(\nabla \times H=J+\partial_t D\) \(\nabla \times E=-\partial_t … Read more

Recognize the trigonometric functions again

We always learn the trigonometric functions from the geometry and use them to solve geometry problem. It it quite difficult to memorize some trigonometric identities. We re-define the sine and cosine function from the view of the solution of the ordinary differential equations in this article. It is similar with the Bessel functions. The Helmholtz … Read more

Dot product in cylindrical coordinates

The dot product of the two vectors in cartesian coordinates is defined as: Multiply corresponding components and the add the results. Thus \( \vec a \cdot \vec b=a_1b_1+a_2b_2+a_3b_3\) If there are two vectors in cylindrical coordinates, \(\vec{A} = A_r \hat{r} + A_\theta \hat{\theta} + A_z \hat{z}\) \(\vec{B} = B_r \hat{r} + B_\theta \hat{\theta} + B_z … Read more