krei, If your emission current boundary conditions do not depend linearly on the electric field, the whole problem becomes non-linear and hence you can't solve the whole problem directly. What you can do is to first solve for the electric field and afterwards for the metal part. In particular, this means to neglect in the first assembly all the cells that a related to the metal part. After solving you would then loop over the interface to find out which dofs on the metal part you want to constrain. For this you would initialize a Quadrature object with the unit support_points [1]. At the same time you can use FEValues::get_function_* to evaluate the electric field on the locations of these dofs. This should be much faster than VectorTools::PointGradient. Finally, assemble and solve for the metal part taking the computed constraints into account.
Does this make sense to you? Best, Daniel [1] https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-to-get-the-mapped-position-of-support-points-of-my-element Am Dienstag, 9. August 2016 16:06:04 UTC+2 schrieb krei: > > Hello, > > I mostly implemented the hp-vector finite element approach (according to > step-46), but alas, I think it might not be applicable. (I simplified the > boundary condition in original post a bit.) In my case I need to apply an > emission current boundary condition to the electric currents in copper > based on the electric field in vacuum. The emission currents are not > expressed through the electric field by a simple manner, more specifically, > J ~ E^2, J ~ 1/E and J ~ exp(a*E) and I might want to use interpolation > from a grid to evaluate J(E). (J - emission current density, E - electric > field at the surface). > > If I want to solve everything in one big system (as is done in step-46), > then I don't have access to the electric field values during the system > assembly, I can access shape functions but I can't evaluate the emission > current through them. > > Perhaps I have misunderstood and I can somehow evaluate the boundary > conditions? Or what would a better approach be? > > On Saturday, July 30, 2016 at 1:38:06 PM UTC+3, Daniel Arndt wrote: >> >> krei, >> >> If you want to solve different PDEs on different domains that can be >> discretized by a common mesh, the preferred approach is to use a hp-vector >> finite element. >> This means that on each of your subdomains all blocks of your finite >> element but one are of type FENothing. >> You might want to have a look into step-46 for how to do this. >> >> Best, >> Daniel >> > -- 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 dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.