<span style="font-size:11.0pt;color:#1F497D" lang="EN-US"></span>As for seeing what is wrong: me neither.<br><br>I don't think Gauss' theorem poses any difficulty with fixing both charge and flux, since as you note the theorem applies only to closed surfaces. I am only attempting to fix the flux at one end-cap of my cylinder. An externally applied field (what my Eimposed is meant to simulate) causes flux to flow in through one endcap and out the other. It makes no net contribution to the total flux, which is therefore still free to be whatever it needs to be to satisfy Gauss.<br>
<br>If I knew what additional details might serve, Lars, I would supply them. You have been generous with your time already.<br><br>In case anyone else might be willing to give the matter consideration, I am attaching a graph of the potential along the axis of my cylinder. This is the "observation" I mentioned in the previous email, which led me to wonder whether my formulation were actually requiring the flux to equal Eimposed + (flux from charges) instead of only Eimposed as I had at first thought.<br>
<br>There are two curves in the attached graph, a blue one and a red one. The horizontal axis is z. z=0 is my bottom endcap, with V=0 by Dirichlet constraint. z=10000 is the top endcap, with Neumann constraint dictated by the formulation previously given. All of the source terms are in z<=500, which is a dielectric medium. z>500 is vacuum. The blue curve corresponds to those charges mainly limited to z=500 nm and rectangular 1400 nm x 1400 nm area, centered on (x,y)=(0,0), i.e., the axis. The red curve is the same except that the rectangular area is a factor of 10 larger, 1400 nm x 1400 nm.<br>
<br>At z=10000, the slope of the blue curve is very close to 2 x 10^6 V/m, which is the value I used for Eimposed. The red curve's slope at z=10000, as you can plainly see, is much smaller (less than Eimposed/3 in fact), despite that I used the <i>identical </i>formulation.<br>
<br>Getting Eimposed/3 instead of Eimposed is not consistent with answer A, that the formulation constrained the field there to be the supplied value (unless there was some other mistake in my input files). <br><br>On the other hand, it <i>is </i>consistent with answer B, that the formulation constrained the flux there to be the combined flux from Eimposed + charges. (The field contributed by the charges is expected to be nearly constant for z/s << 1 and fall as 1/z^3 once z/s >> 1, where s is the size of the rectangle. The blue curve corresponds to s = 1400 and the red one to s = 14000 (note extra 0). z=10000 is in the far-field region for the blue curve, which is therefore expected to have negligible field, but not for the red curve.) Thus, if flux from charges adds to Eimposed, we would hardly notice in the case of the blue curve but it would be quite significant for the red one. The graph is consistent with this.<br>
<br>So from this I have <i>guessed </i>answer B. Still, guessing (or experimentally deducing) the function of a program is not the most reliable procedure. Surely someone (one of the developers maybe) <i>knows </i>whether this is what it is supposed to do. If that knowledgeable someone--who would speak the truth and not just what I want to hear--would say, "But of course you $%^&! That's how it's <i>supposed </i>to behave," I would be very happy. <img goomoji="330" style="margin: 0pt 0.2ex; vertical-align: middle;" src="cid:330@goomoji.gmail"><br>
<br>John<br><br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 2:32 AM, Lars Rindorf <span dir="ltr"><<a href="mailto:lrf@teknologisk.dk">lrf@teknologisk.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div link="blue" vlink="purple" lang="DA">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi John<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">The short answer is that from you brief description I cannot see what is wrong.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">According to Gauss’ theorem the flux through a closed surface equals the sources inside the surface. So I guess you cannot fix both charge and
 flux in your problem.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">KR Lars<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt">Fra:</span></b><span style="font-size:10.0pt"> John_V [mailto:<a href="mailto:jvillar.john@gmail.com" target="_blank">jvillar.john@gmail.com</a>]
<br>
<b>Sendt:</b> 6. august 2011 20:12<br>
<b>Til:</b> Lars Rindorf<br>
<b>Cc:</b> <a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a><br>
<b>Emne:</b> Re: [Getdp] Von Neumann misconception?<u></u><u></u></span></p><div><div></div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks Lars. If I understand you, you're telling me that my answer A was the right one. (Eimposed was a very simple function in my case. It was constant.) But in my solution, the field at UpperEndCap is much
 different from Eimposed. Why is that?<br>
<br>
I am suspecting the real answer is B. This suspicion is, however, based only on observation. I don't know whether this makes sense in terms of how the program is supposed to operate. Domain_Ele does not exclude UpperEndCap. That is, the nodes on UpperEndCap
 (a surface) are also nodes of Domain_Ele, which is the entire mesh. Does that offer a way to explain why the field is not what I expected?<br>
<span style="color:#888888"><br>
John</span><u></u><u></u></p>
<div>
<p class="MsoNormal">On Thu, Aug 4, 2011 at 2:23 AM, Lars Rindorf <<a href="mailto:lrf@teknologisk.dk" target="_blank">lrf@teknologisk.dk</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Hi John</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">The Neumann (von Neumann is a different mathematician) boundary condition fixes the ‘influx’ grad(V) normal to the boundary,
 and it arises when grad(V) = -E is known and can be replaced by a function, such as Eimposed. A dirichlet boundary condition, e.g. V=0, fixes the magnitude.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Be aware that in the formulation the ‘Eimposed’ is the normal component of the incoming field/flux and it is thus a scalar
 not a vector.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">KR Lars</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt">Fra:</span></b><span style="font-size:10.0pt">
<a href="mailto:getdp-bounces@ace20.montefiore.ulg.ac.be" target="_blank">getdp-bounces@ace20.montefiore.ulg.ac.be</a> [mailto:<a href="mailto:getdp-bounces@ace20.montefiore.ulg.ac.be" target="_blank">getdp-bounces@ace20.montefiore.ulg.ac.be</a>]
<b>På vegne af </b>John_V<br>
<b>Sendt:</b> 3. august 2011 14:21<br>
<b>Til:</b> <a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a><br>
<b>Emne:</b> [Getdp] Von Neumann misconception?</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Consider an electrostatic problem in a cylindrical volume, bottom end cap (surface) constrained to V=0, source terms in some volume elements, and top end cap with a von Neumann constraint
 implemented as shown in the formulation below. Does the 3rd Galerkin term (the von Neumann term)<u></u><u></u></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">a) Require that the electric field through the upper end cap be equal to Eimposed?<br>
b) Require that the electric field through the upper end cap be equal to the sum: field produced by charges in SourceDomain + Eimposed?<br>
c) Something else?<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Formulation { <br>
  { Name Electrostatics_v; Type FemEquation;<br>
    Quantity {<br>
      { Name v; Type Local; NameOfSpace Hgrad_v_Ele; }<br>
    }<br>
    Equation {<br>
      Galerkin { [ epsr[] * Dof{d v} , {d v} ]; In Domain_Ele; <br>
                 Jacobian Vol; Integration GradGrad; }<br>
      Galerkin { [ -q[]*chargeUnit/eps0/ElementVol[] , {v} ]; In SourceDomain; <br>
                 Jacobian Vol; Integration GradGrad; }<br>
      Galerkin { [ Eimposed , {v} ]; In UpperEndCap; <br>
                 Jacobian Sur; Integration GradGrad; }<br>
    }<br>
  }<br>
}<br>
<br>
The mesh is a cylindrical volume oriented along z. Domain_Ele refers to all volume elements of my mesh. SourceDomain is a set of volume elements in which there are charges. (These are near the lower end cap of the cylindrical mesh.) The 3rd term was meant to
 impose my von Neumann condition. When I wrote it I thought I was doing (a) above, but the result suggests otherwise.
<br>
<br>
John<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div></div></div>
</div>

</blockquote></div><br>