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.

Please help: applying fixed displacement to a point defined by mesh.

Please login with a confirmed email address before reporting spam

Is it possible to apply a displacement to a node (vertex) defined by a mesh?

I.e.,

1) Define a square.
2) Generate a mesh for square.
3) Retrieve nodes defined by the mesh.
4) Apply a displacement to a particular node.
5) Solve.

I would really appreciate any help with this. I created this thread because I think my last one was too confusing.





7 Replies Last Post 07.11.2010, 09:38 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.11.2010, 15:19 GMT-4
Please, if anyone knows if this is even possible, please say so.

In other software, I am able to select the vertex from the mesh, and apply a displacement. I don't see the option for doing this in COMSOL, since it is restricting me to points manually added when building the geometry.
Please, if anyone knows if this is even possible, please say so. In other software, I am able to select the vertex from the mesh, and apply a displacement. I don't see the option for doing this in COMSOL, since it is restricting me to points manually added when building the geometry.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.11.2010, 12:09 GMT-4
Perhaps another way to pose it:

After collecting the mesh vertices in simulink (using matlab), is it possible to displace them?

I am sorry if I am not wording it right, perhaps someone can point me in the right direction.

Thanks,
Matt
Perhaps another way to pose it: After collecting the mesh vertices in simulink (using matlab), is it possible to displace them? I am sorry if I am not wording it right, perhaps someone can point me in the right direction. Thanks, Matt

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.11.2010, 12:24 GMT-4
Hi Everyone,

I attached a sample model file.

As an example, I would like to apply a fixed displacement at the mesh vertex (point) close to (.2,.2), without manually adding a geometrical point there.

Can this be done?

Hi Everyone, I attached a sample model file. As an example, I would like to apply a fixed displacement at the mesh vertex (point) close to (.2,.2), without manually adding a geometrical point there. Can this be done?


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.11.2010, 14:15 GMT-4
Maybe you should use deformed mesh option ALE mode it can be helpful
Maybe you should use deformed mesh option ALE mode it can be helpful

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.11.2010, 20:25 GMT-4
Thanks for the tip. Does ALE mode allow you to specify a vertex in the mesh? All I have found is that it can be used to select new boundaries.

Thanks again.

Thanks for the tip. Does ALE mode allow you to specify a vertex in the mesh? All I have found is that it can be used to select new boundaries. Thanks again.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.11.2010, 03:54 GMT-5
How about with matlab you get the coordinates of the mesh points, and then use them in solid-mechanics module to apply point load?

model = ModelUtil.create('Model');
model.modelNode.create('mod1');
geom1 = model.geom.create('geom1', 2);
geom1.feature.create('sq1', 'Square');
geom1.run;
mesh1 = model.mesh.create('mesh1', 'geom1');
mesh1.feature.create('ftri1', 'FreeTri');
mesh1.run('ftri1');

To get the number of mesh vertices, you can use
NumVertex = mesh1.getNumVertex;

To get the coordinates of the mesh vertices as a matrix data where each column
corresponds to a vertex mesh, you can use
Vertex = mesh1.getVertex;



--
Comsol 4.0a
Ubuntu 10.04.1
How about with matlab you get the coordinates of the mesh points, and then use them in solid-mechanics module to apply point load? model = ModelUtil.create('Model'); model.modelNode.create('mod1'); geom1 = model.geom.create('geom1', 2); geom1.feature.create('sq1', 'Square'); geom1.run; mesh1 = model.mesh.create('mesh1', 'geom1'); mesh1.feature.create('ftri1', 'FreeTri'); mesh1.run('ftri1'); To get the number of mesh vertices, you can use NumVertex = mesh1.getNumVertex; To get the coordinates of the mesh vertices as a matrix data where each column corresponds to a vertex mesh, you can use Vertex = mesh1.getVertex; -- Comsol 4.0a Ubuntu 10.04.1

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.11.2010, 09:38 GMT-5
Danial,

That would be perfect, but I am not sure how to add the point load at a point, unless it is a part of the geometry.

i.e., I am trying to use the commands:

model.physics('solid').feature.create(dispname, 'Displacement0', 0);
model.physics('solid').feature(dispname).set('Direction', 1, '1');
model.physics('solid').feature(dispname).set('Direction', 2, '1');
model.physics('solid').feature(dispname).set('U0', 1, .2));
model.physics('solid').feature(dispname).set('U0', 2, .2));
model.physics('solid').feature(dispname).selection.set([point_id]);

However, the last step requires a geometrical point that has already been added (point_id).

Is there a different command that will let me specify the (x,y) coordinates, like you mentioned above, without it being a point that is a part of the geometry? I have all the vertices from the command you have shown. But I am stuck at actually displacing them.

Thanks a lot for your help!

Danial, That would be perfect, but I am not sure how to add the point load at a point, unless it is a part of the geometry. i.e., I am trying to use the commands: model.physics('solid').feature.create(dispname, 'Displacement0', 0); model.physics('solid').feature(dispname).set('Direction', 1, '1'); model.physics('solid').feature(dispname).set('Direction', 2, '1'); model.physics('solid').feature(dispname).set('U0', 1, .2)); model.physics('solid').feature(dispname).set('U0', 2, .2)); model.physics('solid').feature(dispname).selection.set([point_id]); However, the last step requires a geometrical point that has already been added (point_id). Is there a different command that will let me specify the (x,y) coordinates, like you mentioned above, without it being a point that is a part of the geometry? I have all the vertices from the command you have shown. But I am stuck at actually displacing them. Thanks a lot for your help!

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.