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