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.

export mesh data for an explicit selection

Please login with a confirmed email address before reporting spam

Dear all,

I am a relatively new user COMSOL with a lot of Finite Element experience both on the programming and theory level. I started with COMSOL today which went actually quite fine and fast.

I would like to use that to interface assemled system matrices and mesh data to my own solvers. And it was successful for simple shell models.

At this point, I am also wondering if that is possible to export some selected node data or not. What I am directly interested is 'can I create node groups in COMSOL' which can be exported in some kind of text data file format or in binary file format?

Let me be more specific, lets say I have two fixed edges of a square plate and I would like know which nodes are associated with this selected fixed edges so that I can extract the constrained dof infornation myself. These kinds of information might give me more freedom for simple FRF analysis that I would like to conduct.

I learned that I can extract the matrices Kc and K, for instance, for the system stiffness matrix which represent the matrix on which the boundary conditions are applied and the full system matrix without any boundary conditions applied, respectively.

I would like to know or compute the fixed dof information by either getting it from COMSOL(which would be nice since no extra computations will be necessary.) or by iterating over the nodes myself.

Any ideas or pointers are appreciated on this matter.

Best regards,
Umut


3 Replies Last Post 2013年5月16日 GMT-4 10:01
Frank van Gool COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年5月16日 GMT-4 03:45
Dear Umut,

have you taken a look at the chapter in the LiveLink to MATLAB users guide on "Retrieving Xmesh Information"?
In the 4.3a version this is on page 159.

Best regards,
Frank
Dear Umut, have you taken a look at the chapter in the LiveLink to MATLAB users guide on "Retrieving Xmesh Information"? In the 4.3a version this is on page 159. Best regards, Frank

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年5月16日 GMT-4 04:45
Hi Frank,

Indeed, I am looking into that section.

From

info.elements.edg.nodes

I can get the list of nodes on the edges of a simple plate, where info is the structure returned from

info = mphxmeshinfo(model);

However, this is still not a direct answer to my question. What I am after is to really create a selection group under Definitions node(I guess this is called as an Explicit selection) and retrieve the node list associated to this selection. Later on, this selection groups can be extended to include certain surfaces of finite element model. However, there is a subtle difference here. Namely, when a finite element mesh is created, the geometry information is lost but I was guessing the kernel of COMSOL still knows which FE information is associated to which geometrical entities. Or somehow should keep pointers to this information internally.

The question is that is this information transparent to the user or not?

Best,
Umut

Hi Frank, Indeed, I am looking into that section. From info.elements.edg.nodes I can get the list of nodes on the edges of a simple plate, where info is the structure returned from info = mphxmeshinfo(model); However, this is still not a direct answer to my question. What I am after is to really create a selection group under Definitions node(I guess this is called as an Explicit selection) and retrieve the node list associated to this selection. Later on, this selection groups can be extended to include certain surfaces of finite element model. However, there is a subtle difference here. Namely, when a finite element mesh is created, the geometry information is lost but I was guessing the kernel of COMSOL still knows which FE information is associated to which geometrical entities. Or somehow should keep pointers to this information internally. The question is that is this information transparent to the user or not? Best, Umut

Reine Granström COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年5月16日 GMT-4 10:01
Dear Umut,

What I am after is to really create a selection group under Definitions node(I guess this is called as an Explicit selection) and retrieve the node list associated to this selection. Later on, this selection groups can be extended to include certain surfaces of finite element model.


You can either use explicit, ball, or box selections. Explicit selections can be created automatically by enabling the "Create selections" check-box for the geometric entity. model.selection(<tag>).entities(dim); can then be used to obtain the geometric entity indices included in the selection.


However, there is a subtle difference here. Namely, when a finite element mesh is created, the geometry information is lost but I was guessing the kernel of COMSOL still knows which FE information is associated to which geometrical entities. Or somehow should keep pointers to this information internally.

The question is that is this information transparent to the user or not?


When selections are defined, mphmeshstats can be used to obtain data on the nodes associated with these.

Best regards,
Reine Granström
Dear Umut, [QUOTE] What I am after is to really create a selection group under Definitions node(I guess this is called as an Explicit selection) and retrieve the node list associated to this selection. Later on, this selection groups can be extended to include certain surfaces of finite element model. [/QUOTE] You can either use explicit, ball, or box selections. Explicit selections can be created automatically by enabling the "Create selections" check-box for the geometric entity. model.selection().entities(dim); can then be used to obtain the geometric entity indices included in the selection. [QUOTE] However, there is a subtle difference here. Namely, when a finite element mesh is created, the geometry information is lost but I was guessing the kernel of COMSOL still knows which FE information is associated to which geometrical entities. Or somehow should keep pointers to this information internally. The question is that is this information transparent to the user or not? [/QUOTE] When selections are defined, mphmeshstats can be used to obtain data on the nodes associated with these. Best regards, Reine Granström

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.