Boundary specification
Greetings
I have a problem when specifying boundary conditions for a simple coupled pde system. Essentially Po is equal to Pw and Pw is the Poisson example. Po is as I expect it but Pw looks wrong. Am I specifying the boundary conditions incorrectly? Please advise. Many thanks in advance.
from cbc.pdesys import *
from dolfin import parameters as dolfin_parameters
mesh = UnitSquare(10, 10)
# Change desired items in the problem_parameters dict from cbc.pdesys
problem_
problem = Problem(mesh, problem_parameters)
solver_
solver_
coupled = PDESystem([['Pw', 'Po']], problem, solver_parameters) # Creates FunctionSpace, Functions etc.
coupled.f = Constant(1.)
class Coupled(
def form(self, Pw, v_Pw, Pw_, Po, v_Po, Po_, f, **kwargs): # v_u is the TestFunction
FPw = inner(grad(Pw), grad(v_Pw))*dx + f*v_Pw*dx
FPo = Po*v_Po*dx - Pw_*v_Po*dx
return FPw + FPo
bcs = [DirichletBC(
coupled.
problem.solve()
plot(problem.
plot(problem.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- CBC.PDESys Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Yaakoub El Khamra
- Solved:
- Last query:
- Last reply: