Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Integral Boundary Condition - Problem

Please login with a confirmed email address before reporting spam

For the sake of simplicity, I'll use an example of stationary heat transfer in a 2D geometry.

My goal was to create a boundary condition such that the total flow of a boundary in the z-direction had a value of 1, yet its local flux could be non-uniform. Furthermore, at the same boundary, the temperature distribution was at a single (but unspecified) uniform value. From reading these forums, this was my approach:

1. Create a constant temperature boundary condition at an undefined variable "T0"
2. Create a local integration model coupling along that boundary: "IntegBottom()"
3. Define a Global Equation: IntegBottom(-Tz)-1=0, where I define T0 as the state variable
4. Make sure the solver is using both the Heat Transfer model and Global Equation

When I check the Derived Value of a Line Integration of -Tz along the same surface, I get a value of - 0.353 instead of 1. I'm not rotating the integrals or taking the surface integrals. The solution is dependent on the Global Equation, yet I seem to be misinterpreting Step #3.

Any ideas what I'm doing wrong? Thanks.

2 Replies Last Post 14 gen 2014, 05:18 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 gen 2014, 13:26 GMT-5
Bump, any help greatly appreciated.
Bump, any help greatly appreciated.

Nils Malm COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 gen 2014, 05:18 GMT-5
The solution to your problem is (somewhat surprisingly) to exclude the integration coupling operator; you don't need it. In step 3, just define the global equation for variable T0 as "-1". This will, seemingly, lead to the inconsistent equation "-1=0", but that is before accounting for the symmetric reaction flux from the temperature condition hitting T0.

The standard constraint formulation in COMSOL Multiphysics enforces constraints in a symmetric way which is intended to guarantee total flux conservation. This means that when you set the condition T=T0 on every point at a boundary, the constraint is enforced such that the total reaction flux that is required for enforcing the constraint in the T equation is balanced by an equal (but opposite in sign) total flux in the T0 equation. This reaction flux is not visible in the equation displays inside the COMSOL desktop. The equation display for Global Equations really ought to read



which would at least partly explain the behavior. However, we have chosen not to show these terms since they would probably more often sidetrack and confuse users than help. There is quite a lot written about constraint enforcement in the chapter on equation based modeling in the latest version of the COMSOL Multiphysics Reference Manual.
The solution to your problem is (somewhat surprisingly) to exclude the integration coupling operator; you don't need it. In step 3, just define the global equation for variable T0 as "-1". This will, seemingly, lead to the inconsistent equation "-1=0", but that is before accounting for the symmetric reaction flux from the temperature condition hitting T0. The standard constraint formulation in COMSOL Multiphysics enforces constraints in a symmetric way which is intended to guarantee total flux conservation. This means that when you set the condition T=T0 on every point at a boundary, the constraint is enforced such that the total reaction flux that is required for enforcing the constraint in the T equation is balanced by an equal (but opposite in sign) total flux in the T0 equation. This reaction flux is not visible in the equation displays inside the COMSOL desktop. The equation display for Global Equations really ought to read [math]f(u,u_t,u_{tt},t) = \sum{\mathrm{(reaction \, terms)}}[/math] which would at least partly explain the behavior. However, we have chosen not to show these terms since they would probably more often sidetrack and confuse users than help. There is quite a lot written about constraint enforcement in the chapter on equation based modeling in the latest version of the COMSOL Multiphysics Reference Manual.

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.