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.

Coefficient Form PDE and periodic boundary conditions

Please login with a confirmed email address before reporting spam

Hi,

I'm new to COMSOL so I would like some help regarding the following -

I'm trying to perform a phononic crystal simulation using coefficient form pde. I have a hexagon with a circular hole shape removed - this is my geometry.

I want to apply a zero flux boundary condition at the circular shape and periodic boundary conditions at opposing edges of the hexagon.

So I end up using 3 periodic boundary conditions, for the 3 pairs of opposing sides of the hexagon. Unfortunately COMSOL sets up zero flux boundary conditions by default on all the boundaries and I don't see how I can remove this boundary condition on the hexagon's edges on which I only want the periodic boundary conditions.

Any help would be greatly appreciated!

Kartiek.
I'm using COMSOL 4.0a

10 Replies Last Post 14 gen 2015, 02:10 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 ago 2011, 13:37 GMT-4
I have now attached the .mph file that I have been working on.

Please can someone explain how I may not have the zero flux boundary condition on the hexagon's 6 edges?

Thanks,
Kartiek
I have now attached the .mph file that I have been working on. Please can someone explain how I may not have the zero flux boundary condition on the hexagon's 6 edges? Thanks, Kartiek


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 ago 2011, 18:02 GMT-4
I don't have access to COMSOL right now, but I think it would help if you defined a material "air" (with the acoustic properties of air) and then filled the holes with that.
I don't have access to COMSOL right now, but I think it would help if you defined a material "air" (with the acoustic properties of air) and then filled the holes with that.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 ago 2011, 20:32 GMT-4
Hi Brian,

Thank you for your suggestion but unfortunately it doesn't help me. I tried changing the geometry to defining the a hexagon with a hole with air and the rest with the material. Unfortunately, now I cannot even implement the zero flux boundary condition on the hole.

In any case, I should be able to find a solution of a pde on the given shape without thinking of any physics at all and applying the boundary conditions that I require.

I find using the coefficient form the simplest because I can accordingly reduce my 3D problem to a 2D problem knowing the specifics of the problem and then defining the equations I need accordingly in the coefficient form.


The Periodic Boundary Conditions, if they are to work, should be able to override the zero flux boundary condition but this isn't happening.

Any more inputs would be greatly appreciated. I really need to get this simulation to work!

Thanks,
Kartiek.
Hi Brian, Thank you for your suggestion but unfortunately it doesn't help me. I tried changing the geometry to defining the a hexagon with a hole with air and the rest with the material. Unfortunately, now I cannot even implement the zero flux boundary condition on the hole. In any case, I should be able to find a solution of a pde on the given shape without thinking of any physics at all and applying the boundary conditions that I require. I find using the coefficient form the simplest because I can accordingly reduce my 3D problem to a 2D problem knowing the specifics of the problem and then defining the equations I need accordingly in the coefficient form. The Periodic Boundary Conditions, if they are to work, should be able to override the zero flux boundary condition but this isn't happening. Any more inputs would be greatly appreciated. I really need to get this simulation to work! Thanks, Kartiek.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 ago 2011, 12:57 GMT-4
In fact, the problem is completely general!

As per a model example given in the help in comsol 4.1, we make a plane rectangle and solve the simplest of pde equations on it after applying periodic boundary conditions on the rectangle's two opposing edges.

If you follow this through, it STILL shows that the zero flux boundary condition is applied on the 4 edges.

So there are 2 possibilities -

1) the GUI interface shows it wrong, but the internal workings of COMSOL assume that the zero flux boundary condition is overriden by the periodic boundary condition (not shown in the GUI which still shows that zero flux BC is implemented).

2) COMSOL cannot implement Periodic Boundary Conditions in Coefficient Form PDE interface.

Please inform me about which is the the true case?

Kartiek.
In fact, the problem is completely general! As per a model example given in the help in comsol 4.1, we make a plane rectangle and solve the simplest of pde equations on it after applying periodic boundary conditions on the rectangle's two opposing edges. If you follow this through, it STILL shows that the zero flux boundary condition is applied on the 4 edges. So there are 2 possibilities - 1) the GUI interface shows it wrong, but the internal workings of COMSOL assume that the zero flux boundary condition is overriden by the periodic boundary condition (not shown in the GUI which still shows that zero flux BC is implemented). 2) COMSOL cannot implement Periodic Boundary Conditions in Coefficient Form PDE interface. Please inform me about which is the the true case? Kartiek.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 ago 2011, 14:44 GMT-4
Update : It seems that it's more of a case of the former - case 1.

COMSOL does seem to implement the boundary conditions properly and the zero flux condition is overrided as it should be.

The reason I believe this to be true is because of the following quick test I did -

I wrote down the basic wave equation using coefficient form PDE interface. I took a rectangle, and applied periodic BC to opposing edges. Then I did an eigenfrequency study.

Then, I made one small change to the equation - I put the gamma term in the equation to a non zero value in the x direction. I did the eigenfrequency study again.

The results were the same. The reason to try a non zero gamma term is the following - It is a constant, and doesn't affect the wave equation. However, it affects the zero flux boundary condition. Since no changes were registered in the two studies, the zero flux boundary condition does seem to be overrided, but this is not confirmed by the GUI and is a source of confusion.

Can one of the forum moderators please confirm or deny if what I'm doing is correct? It would be a great clarification.
A file is again attached.

Regards,
Kartiek.
Update : It seems that it's more of a case of the former - case 1. COMSOL does seem to implement the boundary conditions properly and the zero flux condition is overrided as it should be. The reason I believe this to be true is because of the following quick test I did - I wrote down the basic wave equation using coefficient form PDE interface. I took a rectangle, and applied periodic BC to opposing edges. Then I did an eigenfrequency study. Then, I made one small change to the equation - I put the gamma term in the equation to a non zero value in the x direction. I did the eigenfrequency study again. The results were the same. The reason to try a non zero gamma term is the following - It is a constant, and doesn't affect the wave equation. However, it affects the zero flux boundary condition. Since no changes were registered in the two studies, the zero flux boundary condition does seem to be overrided, but this is not confirmed by the GUI and is a source of confusion. Can one of the forum moderators please confirm or deny if what I'm doing is correct? It would be a great clarification. A file is again attached. Regards, Kartiek.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 gen 2013, 06:23 GMT-5

Update : It seems that it's more of a case of the former - case 1.

COMSOL does seem to implement the boundary conditions properly and the zero flux condition is overrided as it should be.

The reason I believe this to be true is because of the following quick test I did -

I wrote down the basic wave equation using coefficient form PDE interface. I took a rectangle, and applied periodic BC to opposing edges. Then I did an eigenfrequency study.

Then, I made one small change to the equation - I put the gamma term in the equation to a non zero value in the x direction. I did the eigenfrequency study again.

The results were the same. The reason to try a non zero gamma term is the following - It is a constant, and doesn't affect the wave equation. However, it affects the zero flux boundary condition. Since no changes were registered in the two studies, the zero flux boundary condition does seem to be overrided, but this is not confirmed by the GUI and is a source of confusion.

Can one of the forum moderators please confirm or deny if what I'm doing is correct? It would be a great clarification.
A file is again attached.

Regards,
Kartiek.


[QUOTE] Update : It seems that it's more of a case of the former - case 1. COMSOL does seem to implement the boundary conditions properly and the zero flux condition is overrided as it should be. The reason I believe this to be true is because of the following quick test I did - I wrote down the basic wave equation using coefficient form PDE interface. I took a rectangle, and applied periodic BC to opposing edges. Then I did an eigenfrequency study. Then, I made one small change to the equation - I put the gamma term in the equation to a non zero value in the x direction. I did the eigenfrequency study again. The results were the same. The reason to try a non zero gamma term is the following - It is a constant, and doesn't affect the wave equation. However, it affects the zero flux boundary condition. Since no changes were registered in the two studies, the zero flux boundary condition does seem to be overrided, but this is not confirmed by the GUI and is a source of confusion. Can one of the forum moderators please confirm or deny if what I'm doing is correct? It would be a great clarification. A file is again attached. Regards, Kartiek. [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 gen 2013, 06:58 GMT-5

Hi Kartiek,

I also confronted the same problem as you did. When using the periodic condition in the Weak form PDE Module, I found the zero flux setting is defined by default, and cannot be cancelled when setting the periodic boundary condition.

I want to ask that whether you have solved such a problem.

Many thanks for your reply.

Best regards,
Jia

PS: I am using COMSOL 4.3.
Hi Kartiek, I also confronted the same problem as you did. When using the periodic condition in the Weak form PDE Module, I found the zero flux setting is defined by default, and cannot be cancelled when setting the periodic boundary condition. I want to ask that whether you have solved such a problem. Many thanks for your reply. Best regards, Jia PS: I am using COMSOL 4.3.

Mohammad Amin Faghihi Zarandi

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 set 2014, 12:36 GMT-4
Hi
I am going to solve Richard's Equation using COMSOl which is so similar to Heat Equation

I have a problem with Coefficient "c" because my coefficient is not constant is a function of dependent parameter what should I do with that?

u_t = K* u_xx
K is a function of u

How can I define it for COMSOL

Thanks a lot
Hi I am going to solve Richard's Equation using COMSOl which is so similar to Heat Equation I have a problem with Coefficient "c" because my coefficient is not constant is a function of dependent parameter what should I do with that? u_t = K* u_xx K is a function of u How can I define it for COMSOL Thanks a lot

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 9 gen 2015, 09:10 GMT-5
Did you solve it? I am facing the same limitation
Thanks
Did you solve it? I am facing the same limitation Thanks

Mohammad Amin Faghihi Zarandi

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 14 gen 2015, 02:10 GMT-5
Hi
Unfortunately, no the COMSOL can not define this constant.
try Wolfram Mathmatica it is so better
Hi Unfortunately, no the COMSOL can not define this constant. try Wolfram Mathmatica it is so better

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.