post processing/evaluation question

41 views
Skip to first unread message

Michael Harmon

unread,
May 10, 2016, 5:11:44 PM5/10/16
to deal.II User Group
Im working on a semiconductor physics problem and trying to obtain the flux through a boundary, but not quite sure how to go about to doing this. Heres the problem:

I obtain a vector-valued function for the current fluxes J on a domain [0,1] x [0,1] and want to compute the average of the normal component of J through the boundary x = 0 and x = 1.  

I'm thinking I should use VectorTools::Integrate_difference and the mean norm, does this sound right? Is there someway to restrict the integration to only occur on portions of the boundary?

Thanks,

Mike

Wolfgang Bangerth

unread,
May 11, 2016, 11:46:09 AM5/11/16
to dea...@googlegroups.com
No, not easily. But you can quite easily do something like this:

https://github.com/geodynamics/aspect/blob/master/source/postprocess/heat_flux_statistics.cc

(More code than you need, but the point is: create an FEFaveValues, loop over
all cells, loop over all faces, if at boundary integrate the normal component
of the gradient of the field over it (assuming the flux is the gradient).)

Cheers
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Michael Harmon

unread,
May 12, 2016, 9:23:31 AM5/12/16
to deal.II User Group
thanks!
Reply all
Reply to author
Forward
0 new messages