From: Paul
Date: Sat, 23 Dec 2000 19:52:44 +0000
Subject: Re: [TSSP] E-Tesla6.11
I wrote:
>>There is also a neat little thing that you can do with E-Tesla6 that
>>will give you Cee for almost no extra effort. Shall I send you
>>the code? Given Ces, Les (from Ldc via Lfac), and Cee, you then have
>>all you need to employ many of the formulae in pn2511.
Terry wrote:
> Sure! I would love to see such code and add it in. Try and keep is
> sort of simple so "I" can understand it ;-))
After you've calculated the field and worked out the shunt capacitance,
follow it with this piece of code,
//
// Calculate the stored energy in the entire field by summing
// the energy in all of the grid cells.
//
#define EPSILON 8.854188e-12
hr = 1/AcF * Mult/39.3700787402; // Radial size of cell - metres
hz = 1/AcF * Mult/39.3700787402; // Vertical size of cell - metres
energy = 0.0;
for(ypcnt = 1; ypcnt <= Ceil; ypcnt ++)
for(xpcnt = 1; xpcnt <= Wall; xpcnt++)
{
float er, ez; // The two field gradient components
float E; // The energy in this cell
er = (a[xpcnt][ypcnt] - a[xpcnt-1][ypcnt])/hr;
ez = (a[xpcnt][ypcnt] - a[xpcnt][ypcnt-1])/hz;
E = 0.5 * EPSILON * (er * er + ez * ez) *
2 * pi * xpcnt * xpcnt *
hr * hr * hr * hr;
energy += E; // Accumulate the total energy
}
//
// Calculate Cee to give the same stored energy when
// charged to TermV.
//
Cee = 2 * energy / (TermV * TermV);
See what sort of values you get for Cee. Around 17.55 pF perhaps?
I've not tried it so if it doesn't work, let me know!
Cheers,
--
Paul Nicholson,
Manchester, UK.
--
Maintainer Paul Nicholson, paul@abelian.demon.co.uk.