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.

Subdomain Settings bug?

Please login with a confirmed email address before reporting spam

Hi - I am terribly sorry to ask so many questions in the last few weeks...

I imported about half of my 3D geometry and set the Subdomain settings (I assigend a material to every subdomain in emdc and ht).

Now I added more geometry (import a dxf in a workplane and extrude it) which seems to have rearranged the Subdomain numbering. Now some newly imported subdomains have already a material assigned!

An example: Subdomain 20 was assigned Gold and after adding the new geometry this domain is now numbered as 21. The subdomain of the added geometry that now becomes subdomain 20 has already Gold assigned, which is not true and which I don't like. It prevents me from selecting all added subdomains by selecting the subdomains with no material assigned (I am missing subdomain 20).

Two questions:

1) Can I rely on that the materials I have already assigned are still correct or can it happen that a subdomain becomes assigned a different material (what is the material of the new subdomain 21 if the material of the old subdomain 21 was, say, platinum)?

2) Wouldn't it be nice to have new subdomains 'initialized' with no material (or the default for that matter) rather than the material of the subdomain with the same number before the rearrangement? For me it would make sense, since the new subdomains are easier to select by selecting the group with no material assigned.

Thanks and best regards,
Kurt

2 Replies Last Post 15 août 2011, 10:40 UTC−4
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 6 janv. 2010, 02:44 UTC−5
Hi

I understand your trouble the way you are doing things, I have noticed that COMSOL is trying to respect the materials when you have a volume and you subdivide it, and mostly it works, but if you i.e. mirror it it will not always manage.

The rule is: when changing, adding etc the geometry, recheck all BC's

Normally if you add a new geometry, not interacting with the old one, there is no mix-up.

You should not forget that when you are in draw mode you have raw geometries, when you click the point/edge/boundary or subdomain mode you perform a geometrical analysis and decomposition (function geomanalyze see mlinterface.pdf). depending on what you have changed, this will renumber the elements and give problems for you if you have already defined several BC's.

Mostly, if you have defined "group" names, its rather quick to check and rebuild, as these settings remain, even if the group is empty

Cann't do better
good luck
Ivar
Hi I understand your trouble the way you are doing things, I have noticed that COMSOL is trying to respect the materials when you have a volume and you subdivide it, and mostly it works, but if you i.e. mirror it it will not always manage. The rule is: when changing, adding etc the geometry, recheck all BC's Normally if you add a new geometry, not interacting with the old one, there is no mix-up. You should not forget that when you are in draw mode you have raw geometries, when you click the point/edge/boundary or subdomain mode you perform a geometrical analysis and decomposition (function geomanalyze see mlinterface.pdf). depending on what you have changed, this will renumber the elements and give problems for you if you have already defined several BC's. Mostly, if you have defined "group" names, its rather quick to check and rebuild, as these settings remain, even if the group is empty Cann't do better good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 août 2011, 10:40 UTC−4
Dear All,

I have a problem of somewhat similar type. I am working in Matlab interfaced with Comsol (3.4 version). I have a 2D geometry consisting of several subdomains and boundaries. I know that the boundary groups and subdomain groups are defined by the following manner,

bnd.ind = [1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];

equ.ind = [2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ...
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];

Now the problem is, I want to set a specific condition (say refractive index) to a certain subdomain. And also I want to set a specific boundary condition to a certain boundary. But I dont know which is that subdomain or boundary.
For example, the 1st boundary in the above code belongs to group 1, 3rd one belongs to group2. But I cannot locate these in my geometry.

I hope I have succeeded to make u understand the problem. Please anybody provide the solution. It will be of great help.

Asif
Dear All, I have a problem of somewhat similar type. I am working in Matlab interfaced with Comsol (3.4 version). I have a 2D geometry consisting of several subdomains and boundaries. I know that the boundary groups and subdomain groups are defined by the following manner, bnd.ind = [1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]; equ.ind = [2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ... 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]; Now the problem is, I want to set a specific condition (say refractive index) to a certain subdomain. And also I want to set a specific boundary condition to a certain boundary. But I dont know which is that subdomain or boundary. For example, the 1st boundary in the above code belongs to group 1, 3rd one belongs to group2. But I cannot locate these in my geometry. I hope I have succeeded to make u understand the problem. Please anybody provide the solution. It will be of great help. Asif

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.