HiPhi boundary input from EStat
November 23rd, 2008Many improvements to our programs follow from user suggestions. My consulting projects often provide motivations for new features. I am presently working on a simulation of a large cylindrical vacuum insulator for a pulsed-electron-beam injector. The issue is whether non-symmetrical flaws in the insulator surface will cause substantial field perturbations. I started by creating a 2D EStat solution for the ideal insulator for the following reasons:
- I wanted to get a sense of the baseline electrical field magnitude in different regions and to check the sensitivity to changes in the dielectric properties of surrounding structures.
- I could use the DXF import capability of the Mesh drawing editor to create a set of outlines for the complex turnings. After testing, I moved them directly to the MetaMesh script.
- I wanted benchmark values to check that the 3D solution was set up correctly.
Because 2D solutions run quickly, I incorporated the entire injector assembly in the mesh. Extending this solution volume to three dimensions would have resulted in a huge mesh and many hours of run time. I feel that if a run takes more than one hour, there is probably a better way to solve the problem.
Since the flaws were relatively localized, it would be possible to get a good idea of their effect by limiting the axial extent of the solution to a space near the insulator. In this case, I could define a fixed-potential region on the solution volume boundaries in -z and +z and assign a spatial variation using data from the EStat solution. The existing version of HiPhi supported the definition of potential variations from mathematical functions using the command:
POTENTIAL NoReg > f(x,y,z)
Here, f(x,y,z) is any algebraic function of the Cartesian coordinates. In order to use the feature, it would have been necessary to take a radial scan of potential and then to fit the results with a power series in √[x^2 + y^2]. This approach seemed like it would be a lot of work, and I didn’t feel like doing it.
Instead, I took advantage of my unique position as deity of the HiPhi source code and added a new program feature. It is ideally suited to using a 2D solution as the basis of a 3D microscopic solution. Here is the corresponding script command
POTENTIAL NoReg TABLE [x,y,z,r] TabName
The string TabName is the name of a text file defining the potential variation along the specified direction (the variable r is interpreted as √[x^2+y^2]). It consists of a set of data lines:
r[n] phi(r[n])
For the project I prepared tables for the downstream and upstream boundaries directly from EStat scans, using ConText to remove unwanted columns. The process took only a few minutes.
The figure below shows a test solution for the potential inside a grounded cylinder. The bottom boundary in z is grounded and the potential on the top follows a tabular variation in r (a partial cosine function). The top picture shows equipotential lines in the plane x = 0.0 and the bottom shows lines in a plane normal to z near the defined fixed-potential boundary.
I modified the HiPhi instruction manual, describing how to use the new command forms. While I was at it, I decided to ex[and the existing commands for relative dielectric constant, conductivity and space-charge density to handle table input.
For more information on HiPhi, please use this link: http://www.fieldp.com/hiphi.html.


