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.

Problem with Neumann boundary condition definition

Please login with a confirmed email address before reporting spam




Hi,

I am simulating a Helmholtz equation (using the PDE mode module) with a Neumann boundary condition. Some days ago, we decided to update our Comsol version from 3.4 to 4.0. In the new version we saw a few changes about the definition of Neumann boundary condition (now called flux/source condition):

While in the older version the equation was:

n•(c?u)+qu=g

in the actual one it is:

-n•(-c?u-?u+?)=g

Does anyone know if both equations are equivalent?

I have been reading the documentation I have (modeling guide for both versions) but I did not find out any clue.

Besides, for the older version I realised that although in the manual it is said that Neumann equation is

n•(c?u+?u-?)+qu=g-h^T ?

the program interface only shows n•(c?u)+qu=g.

I do not think both equations are the same. I am trying to understand why the definition of the manual does not correspond to the equation shown in the program (when using Helmholtz PDE).

I would be very pleased if someone give me any idea about this topic.

Thank you very much,

Cristina

5 Replies Last Post Aug 8, 2013, 10:39 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 10, 2010, 4:14 a.m. EDT
Hi Cristina,
for what concerns your first question, i can say that the equations are the same if the absorption coefficient "a" in your original Helmholtz problem is zero.
I think the version of Neumann BC proposed by Comsol v4 is slightly more general than the one found in v3.5.
For what concerns instead your second question, you find some explanation in page range 248 - 256 of pdf file for the v3.5 modeling guide.
If you want to know what equation is currenlty implemented in your model, i think the best thing to do is to see the equation system (in v3.5) or activate the equation view (v4.0).
Another advice is to read carefully the chapter PDE, Energy and Weak formulation of reference guide of v4.0. This part didn't exist in previous versions and i think it is written in a very clear manner. You will find there the explanations about the inclusion of BCs in a model.
I hope this helps.
Hi!

Alessandro



Hi Cristina, for what concerns your first question, i can say that the equations are the same if the absorption coefficient "a" in your original Helmholtz problem is zero. I think the version of Neumann BC proposed by Comsol v4 is slightly more general than the one found in v3.5. For what concerns instead your second question, you find some explanation in page range 248 - 256 of pdf file for the v3.5 modeling guide. If you want to know what equation is currenlty implemented in your model, i think the best thing to do is to see the equation system (in v3.5) or activate the equation view (v4.0). Another advice is to read carefully the chapter PDE, Energy and Weak formulation of reference guide of v4.0. This part didn't exist in previous versions and i think it is written in a very clear manner. You will find there the explanations about the inclusion of BCs in a model. I hope this helps. Hi! Alessandro

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 14, 2010, 5:50 a.m. EDT

Hi,

First of all, thank you very much Alessando Ricci for your quick reply. As you suggested me I have been reading the manuals for both versions and I got some conclusions (lets see if I am right or not):

1) Regarding the Neumann boundary condition, the main difference between both versions (3.4 and 4.0) is that in 3.4 the Neumann boundary condition is more general because of the term qu (in fact, as it is said in the manual, this generalized Neumann condition is often called mixed boundary condition).

2) If we focus in 4.0 version, I think there should be a mistake in the way the boundary condition is shown in the "question tab" of the program interface.

The manual says the boundary condition (for a scalar coefficient PDE equation) is:
n•(cgradient(u)+ ?u-?)=g

We are using the predefined Helmholtz equation so ?= ?=0 and therefore the boundary condition should be:
n•(cgradient(u))=g

However, in the equation tab of the program it appears: -n•(-cgradient(u)-au+ ?)=g, so for the Helmholtz PDE we have (?= ?=0) :
-n•(-cgradient(u)-au)=g

with a=absorption coefficient (which should be defined in Helmholtz PDE).

I suppose there is a typo (it should be written ? instead of a), so I assume that the program is not considering the absorption coefficient in Neumann condition. Besides, the “dot product” would not be right because au is a scalar number not a vector. Does anyone agree with me?

I hope this time all the symbols in the equations are shown properly.

Regards,

Cristina
Hi, First of all, thank you very much Alessando Ricci for your quick reply. As you suggested me I have been reading the manuals for both versions and I got some conclusions (lets see if I am right or not): 1) Regarding the Neumann boundary condition, the main difference between both versions (3.4 and 4.0) is that in 3.4 the Neumann boundary condition is more general because of the term qu (in fact, as it is said in the manual, this generalized Neumann condition is often called mixed boundary condition). 2) If we focus in 4.0 version, I think there should be a mistake in the way the boundary condition is shown in the "question tab" of the program interface. The manual says the boundary condition (for a scalar coefficient PDE equation) is: n•(cgradient(u)+ ?u-?)=g We are using the predefined Helmholtz equation so ?= ?=0 and therefore the boundary condition should be: n•(cgradient(u))=g However, in the equation tab of the program it appears: -n•(-cgradient(u)-au+ ?)=g, so for the Helmholtz PDE we have (?= ?=0) : -n•(-cgradient(u)-au)=g with a=absorption coefficient (which should be defined in Helmholtz PDE). I suppose there is a typo (it should be written ? instead of a), so I assume that the program is not considering the absorption coefficient in Neumann condition. Besides, the “dot product” would not be right because au is a scalar number not a vector. Does anyone agree with me? I hope this time all the symbols in the equations are shown properly. Regards, Cristina

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 14, 2010, 4:43 p.m. EDT
Hi

I do not believe the V4 Neumann conditions are less general, thay have been rewritten slightly differently (without te "h" matrix, but by rearranging the equations you should arrive to the same cases, and in many (all ?) physics there are a few new sub-node entries to help.

For the potential typo in the equations, I have problems to follow, as most of the special characters seem to end up as "?" on my screen and I'm not managing to differentiat all the ? from each other ;)

--
Good luck
Ivar
Hi I do not believe the V4 Neumann conditions are less general, thay have been rewritten slightly differently (without te "h" matrix, but by rearranging the equations you should arrive to the same cases, and in many (all ?) physics there are a few new sub-node entries to help. For the potential typo in the equations, I have problems to follow, as most of the special characters seem to end up as "?" on my screen and I'm not managing to differentiat all the ? from each other ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 15, 2010, 4:22 a.m. EDT
Hi Ivar,

I am really sorry about the problem with the special characters, to avoid that I use this time words instead of those characters. Just to make it clear:

alfa= conservative flux convection coefficient
gamma= conservative flux source term
c= diffusion coefficient
g= boundary source term
a= absorption coefficient
n= unit normal vector

The manual says the boundary condition (for a scalar coefficient PDE equation) is:
n•(cgradient(u)+ alfau-gamma)=g

We are using the predefined Helmholtz equation so alfa= gamma=0 and therefore the boundary condition should be:
n•(cgradient(u))=g

However, in the equation tab of the program it appears: -n•(-cgradient(u)-au+ gamma)=g, so for the Helmholtz PDE we have (alfa= gamma=0) :
-n•(-cgradient(u)-au)=g

I suppose there is a typo (it should be written alfa instead of a), so I assume that the program is not considering the absorption coefficient in Neumann condition. Besides, the “dot product” would not be right because au is a scalar number not a vector.
I would like to know if I am right or not because maybe there is something that I am missing or that I just do not understand.

Hopefully this time no “?” symbols appear.

Regards,

Cristina
Hi Ivar, I am really sorry about the problem with the special characters, to avoid that I use this time words instead of those characters. Just to make it clear: alfa= conservative flux convection coefficient gamma= conservative flux source term c= diffusion coefficient g= boundary source term a= absorption coefficient n= unit normal vector The manual says the boundary condition (for a scalar coefficient PDE equation) is: n•(cgradient(u)+ alfau-gamma)=g We are using the predefined Helmholtz equation so alfa= gamma=0 and therefore the boundary condition should be: n•(cgradient(u))=g However, in the equation tab of the program it appears: -n•(-cgradient(u)-au+ gamma)=g, so for the Helmholtz PDE we have (alfa= gamma=0) : -n•(-cgradient(u)-au)=g I suppose there is a typo (it should be written alfa instead of a), so I assume that the program is not considering the absorption coefficient in Neumann condition. Besides, the “dot product” would not be right because au is a scalar number not a vector. I would like to know if I am right or not because maybe there is something that I am missing or that I just do not understand. Hopefully this time no “?” symbols appear. Regards, Cristina

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 8, 2013, 10:39 a.m. EDT
Hi Cristina

This is Homa, I am building a model with Helmholtz equation and need to make Neumann boundary condition for a 3D situation with 3 variables, I do not how can I math the equation with what comsol has. I was wondering if I can take a look on your model if you have done this in 3D ! I really appreciate it

Regards
Homa
Hi Cristina This is Homa, I am building a model with Helmholtz equation and need to make Neumann boundary condition for a 3D situation with 3 variables, I do not how can I math the equation with what comsol has. I was wondering if I can take a look on your model if you have done this in 3D ! I really appreciate it Regards Homa

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.