How to implement variable boundary condition?
9 months ago by
Thanks to our community, and thanks to the experts here.
My new question comes again,
I want to solve the Poisson equation with variable boundary conditions. The problem can be expressed as follows.
for i in range(9):
$\Delta m^i=f^i$Δmi=ƒ i # in $\Omega$Ω
$m^i=u^i-\nabla\phi^i$mi=ui−∇ϕi # on $\partial\Omega$∂Ω
where $u^i,\quad\phi^i$ui, ϕi is functions defined in the domain and is known from the previous step.
My code related to this part is
bcs = DirichletBC(V, U_i - grad_phi_i, Boundary)
solve(a1 == L1, M_j, bcs)
Is my code right?
Community: FEniCS Project
Please login to add an answer/comment or follow this question.