Konrad,

> I tried to give some additional constrains for electirc field E (I must admit 
> that it wasn't good idea) to avoid another unphysical results. General 
> physical poin of view is that I should have this kind of a situation:
> 
> str.png
> 
> 
> The Ex in the middle should go from 0 to -1e7 or -1e6 in the middle of device 
> and then go back to zero
> but my results (for Ex) look rather like this:
> 
> results.png
> 
> 
> Where all Ex values, over all domain is almost -9e7 and it drops a little in 
> the middle (as it should, but not from such a big value).

What is it that you show in your figure? The x-component of the electrical 
field? Can you also show the potential? Recall that the x-component of the 
electrical field is something like the x-derivative of the potential Phi, so 
it seems to me like you should have a linearly decreasing potential with a 
large gradient. Does the potential satisfy the boundary conditions you impose?


> I couldn't find any mistake in my implementation so I've dicided to change 
> boundary condition to enforce electric filed E to be 0.
This is some more general advice: If you get to a situation that you don't 
understand (electric field looks wrong) and you "fix" it by adding conditions 
you have no idea whether they are correct/physical/mathematically allowed 
(adding boundary conditions for E), then in all likelihood you've just added a 
second bug to the first one. You really should get in the habit of 
investigating and *understanding* what is going wrong when when something 
looks odd, rather than *papering over* the issue. In the long run, this will 
save you time; it will also make you a better programmer and computational 
scientists if you build a mental toolbox for how to debug problems.

Best
  W.

-- 
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                            www: http://www.math.colostate.edu/~bangerth/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/8d286503-10c7-9a06-ab9f-46c198fbe564%40colostate.edu.

Reply via email to