How to implement variable boundary condition?

12 months ago by
Hi, all

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?

Best, Hamilton
Community: FEniCS Project
Please provide a minimal working example.
written 12 months ago by pf4d  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »