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.
Posted Nov 5, 2010, 11:26 a.m. EDT 7 Replies
Please login with a confirmed email address before reporting spam
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.
Please login with a confirmed email address before reporting spam
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
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
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?
Attachments:
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Thanks again.
Please login with a confirmed email address before reporting spam
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
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.