The equations of patchwork.solvers.nodal_poisson, declared on the code that implements them and checked by the tests.
Solve −∇2ϕ=f on the nodes of a patch hierarchy.
- problem
- −∇2ϕ=f in Ω,ϕ=ϕD or ∂nϕ=g on faces,ϕ=Uk in bodies Bk
- stencil
- App+=g, Aqq+=g, Apq=Aqp−=gper leaf-cell edge pq along a,g=2hah⊥ (2D), h1 (1D)
- uniform
- App=hx2hy+hy2hx,Ap,x±=−hxhy,Ap,y±=−hyhx
- reduced
- (T⊤AT)FFϕF=T⊤Vf−(T⊤AT)FDϕD+T⊤bN+WU,V=diag(Vp)
- charge
- T⊤Vf→T⊤q(solve(charge=q))
- consistent
- A=T⊤G⊤M1GT,V→M0(consistent mass: the Q1 elements; lumped M1 and V: the stencil above)
- neumann
- bN,p+=21∣e∣gfor each end p of a boundary edge e
- cut edge
- App+=θg,bp+=θgUk,θ=max(θfound,θmin)
- shortley weller
- App=hxhyaxes∑(a−(a−+a+)2+a+(a−+a+)2),Ap,±=−hxhya±(a−+a+)2
- cylindrical
- g=2πrˉ2hah⊥,rˉ=21(re+rK),Vp=K∋p∑2π21(rp+rK)4∣K∣,Ap,r±=−Vp(a±(a−+a+)2±rp(a−+a+)1)
- reaction
- (A+T⊤diag(Vc)T)ϕ=…
- Order
- 2
- Assumes
- unlisted faces are grounded; no permittivity: for a charge pass ρ/ε0
- lumped and consistent mass share one assembly from the edge mass blocks (
patchwork.spaces.mass); the consistent one takes no bodies and keeps the lumped Neumann load - Cartesian control volumes and conductances by default, also on an (r,z) hierarchy;
metric='cylindrical' weights each conductance by 2π times the mean radius of its half cell and each control volume by 2π times that of its quarter cells (the finite volumes of −r1∂r(r∂rϕ)−∂z2ϕ, lumped), with the r1∂rϕ term in the Shortley-Weller rows - a reaction cϕ (
set_reaction) adds the lumped Vpcp to the diagonal, e.g. a Newton Jacobian - the Shortley-Weller rows at regular cut nodes (four equal cells, not hanging), the diagonal-only cut elsewhere; they make the matrix unsymmetric
- θ by 48 bisections of
inside, or the body's fraction; θmin = min_fraction (10−3) - the order is in the volume-weighted L2 norm; in the maximum norm about 1.86 on nested patches (an O(1) truncation error on the interface nodes)
- References
- Built from