There are two issues here.
- The first one is the discretization
- The second one is the distance of the sphere from the gnd plane
Discretization, part 1:
FastCap2 is NOT able to automatically refine the discretization. This is completely different from FasterCap, that can refine the discretization in an intelligent way until convergence of the results is reached.
So with the 'basic' cubegen.exe output
cubegen.exe –o –xh3 –yh50 –zh50 –t –b –pfr –pbl –pbr > plane.txt
you get an almost NON-refined plane. Therefore the first results from FastCap2 are almost not meaningful.
You already understood this point and started to refine the ground plane. However you made the gnd plane so large w.r.t. the sphere that the dimension of the panels composing the plan is still large if compared with the panels composing the sphere when you use the '-n20' option in cubegen.exe.
You may remember from FastCap2 documentation that you should go on refining the discretization until the difference between the results converge within 1%, which is the declared solver accuracy.
So you correctly go on refining the plane and you observe that the capacity increase, however the relative difference between the results is converging: even looking at the single element and at the Frobenius norm of the matrix, you see the convergent sequence 130.5 pf -> 148.2 pF -> 154.8 -> 156.6, where the relative difference is 12% -> 4.2% -> 1.1%
So why the result is still not what you expect?
Distance:
The cubegen.exe option you used include the '-o' parameter. This means that the generated parallelepiped is centered at zero; therefore, the plane is displaced along the x-axis of 1.5 m, not 3.0 m
The sphere is generated around the origin.
Since I reverse-engineer from the FastCap2 results that the list file you used was like the following one:
* Sphere over GND plane
*
C sphere.txt 1.0 0.0 0.0 0.0
C plane.txt 1.0 0.0 0.0 0.0
the actual distance of the center of the sphere from the plane is 1.5 m, not 3 m
If you correct the list file to:
* Sphere over GND plane
*
C sphere.txt 1.0 -1.5 0.0 0.0
C plane.txt 1.0 0.0 0.0 0.0
you get the following result:
CAPACITANCE MATRIX, nanofarads 1 2
sphere%GROUP1 1 0.1258 -0.1176
1%GROUP2 2 -0.1176 2.147
getting closer, but still not there.
Discretization, part 2:
You have addressed so far only an increase in the discretization of the gnd plane. Consider however that also the sphere discretization is very crude. Let's re-create the sphere with an additional level of discretization:
spheregen.exe –r1 -d2 > sphere.txt
Now FastCap2 gives:
CAPACITANCE MATRIX, nanofarads
1 2
sphere%GROUP1 1 0.1316 -0.123
1%GROUP2 2 -0.123 2.152
Which is quite close to the theorical value (by the way, the value I get for the problem is about 133.6 pF, unless I am mistaken)
Now if you use FasterCap, you can direclty start with the non-refined gnd plane and the additionally-refined sphere to get (setting the '-d' parameter to 1 or lower, since the geometrical ratios with so large a gnd plane are high):
Capacitance matrix is:
Dimension 2 x 2
g1_sphere 1.32894e-010 -1.28555e-010
g2_1 -1.24708e-010 2.08375e-009
You can also see in the following picture the refinement produced by FasterCap:
