Extending ex13 / divergence theorem / interfacial resistance #883
Replies: 2 comments 29 replies
-
G'day. I'm quite unwell at the moment (yep, covid) but I'll see if I can set you in the right direction. First, can we split this? It sounds like two separate problems. I'll treat the divergence theorem here.
ex13 does use this divergence theorem idea: scikit-fem/docs/examples/ex13.py Line 51 in 4084c41 for an explanation, see ‘Three ways to compute multiport inertance’; this is the third way.
Well, depends on what you mean by best. The second of the three ways is slightly more accurate but the third is so much simpler that I pretty much always use the third.
Yep, this is covered in the paper. It does involve solving N − 1 boundary value problems (which reduces to 2 − 1 = 1 in the two-port case of ex13). Basically charge one port and earth the rest in each run.
I don't think this should matter, but I'm a little befogged today. Could you provide a sketch? Is it like you've got a plane region with holes in it except that the holes are filled with highly conductive stuff? What's on the outer boundary? Insulated or earthed? Say earthed. The idea then is to solve a b.v.p. for each hole with the interior set to one and the interior of all the other holes set to zero. (Here I'm approximating the highly conductive stuff as perfect; is that a reasonable simplification to get you going?) You'll find that the matrix for all N problems is the same, only the r.h.s. varies. Combine the solutions using that matrix as a bilinear form, like U.T @ A @ U, where the columns of U are the solutions of the individual BVPs. The result is the overall conductance matrix between the N ports; the diagonals are the driving-point conductance, the offs minus the transfer-conductances. |
Beta Was this translation helpful? Give feedback.
-
So I'm still quite struggling with getting accurate flux measurements out of skfem. Context is still Poisson equation with a variable coefficient. I'm using some output from COMSOL solving a toy problem as a reference. I get extremely poor accuracy using what I now call the "naïve" method of first solving for I tried to extend your paper @gdmcbain to handle the variable coef, but without any success so far. I also tried to tinker with ex13.py, but got nowhere when the coefficient was non-constant. Googling harder, I found this four year old post on scicomp which I could have written word-for-word That led me right into ex37.py which seemed promising, but also doesn't include variable coefficients. I did successfully extend the example though, but then discovered that Dirichlet boundary conditions are somehow hardcoded in... I can't figure by what mechanism though. So i kept digging.... From a 2012 book by Dhatt, I found I'm really beating my head against the wall at this point, because this seems like a well-solved, much discussed problem (calculating accurate fluxes) and I just can't get it to work. I also must admit to being very much a "user" of FEM and not well versed on its guts, or some of the seemingly important math concepts (like notation that reads H(div, Omega) or the concept of H-div conforming). I have no idea how I would extend ElementTriRT0 to ElementTriRT1 or why ElementTriRT0 and ElementTriP2 can't work together. At the moment, all these questions make a deep, deep rabbit hole. What i really need to do first is specify a P0 sigma in the domain, specify a voltage on a subset of the external boundary facets, specify ground on some other disjoint subset of the boundary, and require zero normal flux everywhere else on the external boundary. Then I need an accurate calculation of the total flux between the two "electrodes" by any practical means. The potential solution inside the domain is irrelevant to me, except to sanity check things. |
Beta Was this translation helpful? Give feedback.
-
There's been several previous discussions about calculating integrated flux, and in particular that it would be more stable/accurate to use the divergence theorem to replace the integral over facets with an integral over cells. The previous conversations were in the context of flux in/out of a subdomain. This discussion is a little different (I think) because I'm working with a subset of the exterior boundary facets instead of a subset of the cells.
Is it possible to change ex13 to use this divergence theorem idea when it is calculating port flux? I can't see how to do that. Is ex13 the best way to do ex13?
I'm also interested in how I might introduce an interfacial resistivity between the "port" and the interior. This would cause the value on the facet to be different than the value just inside the domain (a discontinuity at the facet). This is perhaps part of #867, but I'm asking exactly in the context of ex13.
My application has more than 2 ports, but I assume that if I can get this working for the 2 ports in ex13, I can do it for N ports.
Beta Was this translation helpful? Give feedback.
All reactions