I want to simulate capacitor with Comsol by using Poisson's equation in genaral and weak form. How can I specify boundary condition for this case?
You can use PDE module and add Dirichlet Boundary Condition (in this section choose the value on the boundary. It may be zero value or another function which you want to use). For more details see http://www.youtube.com/watch?v=sMJTWa-Z9Ho