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.

mislabeling of periodic boundary conditions with changing geometry

Please login with a confirmed email address before reporting spam

Hi

Problem:

I have a unit cell of a periodic lattice structure. The unit cell has Floquet periodic boundary conditions [PBC], and I am doing a parametric sweep of the geometry features of the basis (the unit cell area doesn't change). The problem is that when the geometry changes become large enough, for example when a feature cross the unit cell boundary on the left it would then appear on the right to preserve the symmetry. But this obviously changes the numbering of the PBCs, and it is not practical to manually select those boundaries for each step in the geometry sweep. Anyone encountered such a problem?

thanks,
Chris

2 Replies Last Post 2013年1月15日 GMT-5 02:45
COMSOL Moderator

Hello Chris Layman

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月14日 GMT-5 17:09
Hi
I have done a very similar thing on Comsol 3.5 and it requires implementation via Matlab. Consider a simple domain and you arbitrarily number your geometry vertices. You know your geometry parameters so you have the (x,y,z) coordinates for each point.

In Matlab you can export your entire Comsol model. You have to write a Matlab function that takes a Comsol geometry, gets the coordinates of each vertex and compares them with your standard reference.

For example, say reference vertex number 4 is at (3,5,0) and it so happens that the Comsol numbering for this vertex is 16. Then your function would output '16' when '4' is input, and so on. In this way you can map some arbitrary Comsol geometry ordering to your standard reference.

Notes:
1. Recall numerical tolerance for the "vertex equality"
2. It is quite difficult (I feel) to interpret Comsol's documentation to find the associated functions to get this geometry information.
3. I'm not sure what happens when your parameters are large enough such that geometry primitives converge. This procedure outlined assumes that for any set of geometry parameters, your Comsol geometry will always have some "similar" shape, such that this sorting will always work.
4. A similar technique can be done for the face normal vectors, and sorting the vertex ordering such that you can get the Comsol geometry face normal vector to agree with your analytic/reference normal vector.
Hi I have done a very similar thing on Comsol 3.5 and it requires implementation via Matlab. Consider a simple domain and you arbitrarily number your geometry vertices. You know your geometry parameters so you have the (x,y,z) coordinates for each point. In Matlab you can export your entire Comsol model. You have to write a Matlab function that takes a Comsol geometry, gets the coordinates of each vertex and compares them with your standard reference. For example, say reference vertex number 4 is at (3,5,0) and it so happens that the Comsol numbering for this vertex is 16. Then your function would output '16' when '4' is input, and so on. In this way you can map some arbitrary Comsol geometry ordering to your standard reference. Notes: 1. Recall numerical tolerance for the "vertex equality" 2. It is quite difficult (I feel) to interpret Comsol's documentation to find the associated functions to get this geometry information. 3. I'm not sure what happens when your parameters are large enough such that geometry primitives converge. This procedure outlined assumes that for any set of geometry parameters, your Comsol geometry will always have some "similar" shape, such that this sorting will always work. 4. A similar technique can be done for the face normal vectors, and sorting the vertex ordering such that you can get the Comsol geometry face normal vector to agree with your analytic/reference normal vector.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月15日 GMT-5 02:45
Hi Chris,

maybe you can use the "Selection" mechanism in Comsol. There you can select entities
also by geometric criteria: inside boxes, cylinders and spheres. Also there are Boolean
operations and adjacency. Maybe you can select the boundary entities "automatically".
Later in the physics section you can use these selection instead of explicitly selection
entiities

Look for

Model > Definitions > Selections

Regards

Jens
Hi Chris, maybe you can use the "Selection" mechanism in Comsol. There you can select entities also by geometric criteria: inside boxes, cylinders and spheres. Also there are Boolean operations and adjacency. Maybe you can select the boundary entities "automatically". Later in the physics section you can use these selection instead of explicitly selection entiities Look for Model > Definitions > Selections Regards Jens

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.