Dear NGSolve developers;
I am trying to understand how NGSolve solves the problems with boundary conditions defined on surface that is symmetric about a coordinate plane. When solving
[tex]-\Delta u -k^2 u = 0 \quad {\rm{\in}} \quad \Omega \\
\frac{\partial u}{\partial n} = 1.0 \quad {\rm{on}} \quad \Gamma_1\\
\frac{\partial u}{\partial n} -\beta u = 0 \quad {\rm{on}} \quad \Gamma_2[/tex]
with \Gamma_1 (symmetric_srf) and \Gamma_2 (outer) nonintersecting, \Omega a sphere of given dimensions, and \Gamma_1 is symmetric about one of the coordinate planes. Taking advantage of the symmetry of \Gamma_1 when the problem is divided in half, I see the solution is scaled by a factor of 2 compared to the original problem. This is a bit surprising because in the original problem the pressure field is symmetric, i.e., du/dn = 0 on the symmetry plane. Hence I should have been able to take any subset of the full problem, and apply either Dirichlet or Neumann boundary conditions, taken from the full problem, at the boundary of the subset, and be able to compute the solution correctly, using the boundary conditions and sources internal to the subset. Note that when the full model is sliced into half to take advantage of the symmetry, i don't specify any condition on the newly created surface (thus a natural bc is imposed there which i believe is already from the subset of the original problem). Could you comment on what i could be doing wrong here?
Below the relevant snippet
Code:
mesh = Mesh(ngmesh)
fes = H1(mesh, complex=True, order=2)
u = fes.TrialFunction()
v = fes.TestFunction()
g = 1;
beta = 1j*waveno
a = BilinearForm (fes, symmetric=True)
a += SymbolicBFI (grad(u)*grad(v) )
a += SymbolicBFI (-waveno*waveno*u*v)
a += SymbolicBFI(beta*u*v, definedon=mesh.Boundaries("outer"))
f = LinearForm (fes)
f += v * g * ds("symmetric_srf")
gfu = GridFunction (fes)
a.Assemble()
f.Assemble()