[Getdp] Specifying a detailed charge distribution: what's the best way?

John_V jvillar.john at gmail.com
Thu Sep 2 17:31:48 CEST 2010


Must GetDP functions be specified only by using the mesh file's region
number (the first of the tags given for each mesh element in the mesh file)?
Or is it also possible to specify a function by reference to other tags or
even the element number?

I ask because in my problem I do not know the charge distribution at the
time I mesh the geometry. What I want to do is this:

   1. Mesh my geometry
   2. Use the mesh as input to an independent calculation that determines
   the charge density that results from exposure of this sample to a beam of
   charged particles. (The charge density will be approximated as the total
   charge within each mesh element divided by that element's volume.)
   3. Write GetDP's .pro file, including its definition of the "rho"
   function that defines the charge density.
   4. Run GetDP to solve for the potentials.

The problem, as you can see, is that when the mesher assigns region numbers
in step 1 it must so so without knowledge of the charge distribution, since
the latter is not determined until step 2.

If necessary, I can have my step 2 calculation include rewriting the mesh
file with each mesh element, or at least those with non-zero charge,
assigned a unique region number. That is what I am presently thinking I will
need to do. --But this unnecessarily makes other function definitions more
of a kludge. (Imagine I have a geometric region that is all the same
dielectric constant but is divided into thousands of mesh elements each with
different charge density. Possibly there is no escaping having thousands of
rho[regionxxx] = *.*** lines in the .pro file, but must there also be a
separate thousands of epsr[regionxxx] = sameDielectricConstantValue lines
for the permittivity definition?) Is there a better way?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20100902/4135c4bb/attachment.html>