One basic physics concept is that of electric fields. Specifically, the fields of a point charge or point charge configurations. This example looks at the electric field and the electric potential for two static point charges.
The point charges are given equal values for the electric potential on their surfaces. VORPAL then uses an electrostatic solver to compute the static electric field and potential of the dipole system.
The simulation setup consists of an electrostatic solver and two arbitrarily sized spheres. The spheres are created as a “GridBoundary” and set to a potential of 15,000 Volts while the simulation domain walls are set to 0 Volts. The electrostatic solver uses the bi-conjugate gradient with stabilization method (bicgstab).
Start VorpalComposer and select File -> Clone Example. Highlight Solving Classical Physics Problems and then select Next. Highlight Dipole Like-Charge and then select Choose. Create a new folder and then select Choose.
Alternatively, save the VORPAL input file, dipoleLikeCharge.pre, and open in VorpalComposer.
The file should be displayed in the right pane of the Setup window. Click on the Save and Process Setup button in the lower right corner. Proceed to the run window as instructed. To run the file, click on the Run button in the lower left corner of the window. You can see the real time output of the run in the right pane.
Once instructed after the run has completed, proceed to the Visualize window to view the results. Load in the data files as instructed.
To view the fields, switch to the Field Analysis tab in the Controls pane. From the Field drop down menu, choose the desired component of the YeeStaticElecFldTrilinos. To view the potential, select YeeStaticElecFldTrilinosPotential. The results below are shown by setting the Slice Settings to a Z-intercept of zero. The 3D results below are shown by switching to the Data Overview tab and choosing the corresponding Scalar Field variable. Here you must select Clip All Plots and also set the Z-intercept to zero.
The output of the run shows the electric and potential fields for the dipole system after 20 nanoseconds. The line-out below the contour plot shows a slice of values for a set y position. At y=0.0, it is seen that the potential is set to +15,000 Volts on each of the spherical surfaces and decays to 0.0 at the edges.
In addition to like-charged dipole systems, it is worth investigating dipole systems with opposing charges.
To modify the current input file to be able to handle opposite charges requires changing only one block in the input file. The potential on the surface is currently defined by the following space-time function block.
$POTENTIAL1 = 15000.
.
.
.
<STFunc boundaryFunc>
function = constantFunc
amplitude = POTENTIAL1
</STFunc>
This block tells VORPAL to use a constant value of 15,000 Volts for the surface of the previously defined spheres grid boundary. In order to use different values for the 2 point charges, we will need to modify the block to allow for non-constant values and tell VORPAL where the potential should be set.
$ RADIUS = 0.25
$ XPOS1 = 4.
$ XPOS2 = 6.
$ POTENTIAL1 = 15000.
.
.
.
<STFunc boundaryFunc>
function = expression
expression = -POTENTIAL1*H(RADIUS^2-(x-XPOS1)^2-y^2-z^2)+POTENTIAL1*H(RADIUS^2-(x-XPOS2)^2-y^2-z^2)
</STFunc>
This modified block tells VORPAL that we want to use an expression to define the potential. The value of -15,000 Volts is assigned to the left sphere positioned at a value of 4 meters in the x direction with a radius of 0.25 meters. The value of +15,000 Volts is assigned to the right sphere positioned at a value of 6 meters in the x direction with a radius of 0.25 meters.
Now if we run the simulation again as above except with this new block in the input file, dipoleUnlikeCharge.pre, we get the following results.
The static electric field (left) and the electrostatic potential (right) of the dipole system with opposing charges at 20ns.
A similar method can be used to insert a third or even more charges into the simulation domain to investigate the fields of multi-point charge systems.