Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Boundary conditions in Equation-Based Modeling

Please login with a confirmed email address before reporting spam

I am trying to solve a set of three "Helmholtz-type" equations using the Equation-Based Modeling of Comsol. There are three independent variables, call them u1, u2, and u3. The equations are (with some constant coefficients in front of each term):

∇^2 u2 + u1 + u2 + u3 = 0
∇^2 (u1+u2+u3) + u1 +u2 + u3 = 0
u1 + u2 + u3 = 0

I know how to set up such a set of equations using either the Coefficient Form PDE Interface or the General Form PDE Interface. The problem is the boundary conditions, which apparently cannot be defined arbitrarily (?). I would like to use the following boundary conditions on all but one boundary:

n · ∇u1 = 0
n · ∇u2 = 0
n · ∇u3 = 0

and on the final boundary:

n · ∇u1 = 0
n · ∇u2 = const.
n · ∇u3 = 0

I don't know how to do this because if a set the zero-flux boundary condition, for example, it is of the form

n · (c∇u) = 0,

where c is the matrix used to mix the nabla-squares of the different independent variables and u is the transpose of [u1, u2, u3]. In my case

c = (1,0,0; 1,1,1; 0,0,0)

Thus the zero-flux boundary condition is not what I want. So is there a way to get the boundary conditions above?

I am also wondering, whether the boundary conditions I have actually make any sense. Perhaps what Comsol is suggesting is in fact right. Because zero-flux (independently for all three independent variables?) is what I am looking for. The equations at least are correct. Any thoughts on this? But since the last three elements of c are zeros, it would reduce the number of boundary conditions to 2. Is this OK?

1 Reply Last Post Dec 17, 2012, 11:13 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 17, 2012, 11:13 a.m. EST
Okay, let's rephrase my question. I'm now testing the various boundary condition options in Comsol with a simple Helmholtz equation. So I'm trying to solve



with the PDE Interface. I want to use two different kinds of boundary conditions (on different boundaries):


,

where n is the normal vector at the boundary.

How can I implement these without using the "Zero flux" or "Flux/source" boundary conditions? I tried using two "Constraint" BC's and in them I wrote for R:




Did not work.

In other words, how can I set an arbitrary boundary condition in Comsol?

Any ideas?
Okay, let's rephrase my question. I'm now testing the various boundary condition options in Comsol with a simple Helmholtz equation. So I'm trying to solve [math]\nabla ^2 u - u = 0[/math] with the PDE Interface. I want to use two different kinds of boundary conditions (on different boundaries): [math]\hat{n} \cdot \nabla u = 0[/math] [math]\hat{n} \cdot \nabla u = 1[/math], where n is the normal vector at the boundary. How can I implement these without using the "Zero flux" or "Flux/source" boundary conditions? I tried using two "Constraint" BC's and in them I wrote for R: [math]ux*nx + uy*ny + uz*nz[/math] [math]ux*nx + uy*ny + uz*nz - 1[/math] Did not work. In other words, how can I set an arbitrary boundary condition in Comsol? Any ideas?

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.