Wolfgang,

thank you very much once again! 
Yes, on the picture is Ex, and potential was exactly as you described. 
Today I was able to correct my calculations. I changed the right hand side 
boundary condition to be only E=0 (what is, I think, physically correct 
thing to do), and after I get the proper shape of a solution I was able to 
deduce where my mistake was. 

It looks like even the writing about a problem on forum is beneficial - it 
somehow structuring the problem. 

Thank you very much for your time! Your advises and answers really helped 
me!

Now I will start to test continuity equation so it is not excluded that I 
will ask for help in the near future on this forum (although I hope it 
won't be necessary :). 

best regards,
Konrad

W dniu czwartek, 5 września 2019 18:40:20 UTC+2 użytkownik Wolfgang 
Bangerth napisał:
>
>
> 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] 
> <javascript:> 
>                             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/07ef8e09-1c2c-435d-9ba9-d8d3e95af02b%40googlegroups.com.

Reply via email to