Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Introducing a mesh displacement

Please login with a confirmed email address before reporting spam

Hello,

I wonder if anyone knows whether it is possible to introduce a displacement in a node without using the deformed mesh physics.

What is mean is, for example:
1) Suppose I create a swept mesh, revolving a certain work plane. To my knowledge, in this case all my domains will be meshed according to the same axis of revolution.

2) Now I would like to introduce a very small displacement of one subdomain (all my study is based on this displacement), but I want, by all means, to avoid having to remesh using tetrahedral elements or using deformed mesh.

I know that this is easilly done in other preprocessing tools like Patran, but COMSOL doesn't seem to allow me to do so.

I can do so by manipulating the mesh file but, if possible, I would like to simplify my life and avoid doing so.

Any ideas?

Thanks a lot.

6 Replies Last Post Sep 25, 2012, 11:49 a.m. EDT
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 Sep 26, 2011, 10:21 a.m. EDT
Hi

if I read you correctly you want only to deform your mesh, and then run a simulation from scratch on the new mesh.

I believe this is possible by imposing a first stationary study with a described deformation. Then to save the geometry via old mesh) for a new simulation. This was possible in 3.5 so why not also v4 ?

If you keep it as 2 coupled solid solutions you have some stress buildup from the initial deformation that is probably not what you want. One would have to find back the "save mesh as geoemtry" command for the second run.

I cannot guaranty I'll find it back but will make it a try

--
Good luck
Ivar
Hi if I read you correctly you want only to deform your mesh, and then run a simulation from scratch on the new mesh. I believe this is possible by imposing a first stationary study with a described deformation. Then to save the geometry via old mesh) for a new simulation. This was possible in 3.5 so why not also v4 ? If you keep it as 2 coupled solid solutions you have some stress buildup from the initial deformation that is probably not what you want. One would have to find back the "save mesh as geoemtry" command for the second run. I cannot guaranty I'll find it back but will make it a try -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 29, 2011, 5:15 p.m. EDT
Thanks a lot Ivar.

For now I managed to do it by exporting the mesh file and runing a matlab script on it to introduce the displacement.

It seemed to be the most straight forward solution for me eventhough it took a bit of time to do it correctly. Fortunately the displacement I introduce is just a fraction of the element size and the distortion doesn't seem to be a problem for comsol so far.

Thanks again.
Thanks a lot Ivar. For now I managed to do it by exporting the mesh file and runing a matlab script on it to introduce the displacement. It seemed to be the most straight forward solution for me eventhough it took a bit of time to do it correctly. Fortunately the displacement I introduce is just a fraction of the element size and the distortion doesn't seem to be a problem for comsol so far. Thanks again.

José Mauricio Urbano Caguasango

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 24, 2012, 12:14 p.m. EDT
Hi! I am actually facing a similar problem. I am running a structural mechanics simulation on Matlab. I want to use the deformed mesh on the next iteration, could you help me to get the right code? I am trying with the commands getVertex and setVertex, but it seems that I am getting always the same output (This means that my script is not recognizing my new mesh).

Thanks!
Hi! I am actually facing a similar problem. I am running a structural mechanics simulation on Matlab. I want to use the deformed mesh on the next iteration, could you help me to get the right code? I am trying with the commands getVertex and setVertex, but it seems that I am getting always the same output (This means that my script is not recognizing my new mesh). Thanks!

José Mauricio Urbano Caguasango

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 24, 2012, 12:16 p.m. EDT
Hi! I am actually facing a similar problem. I am running a structural mechanics simulation on Matlab. I want to use the deformed mesh on the next iteration, could you help me to get the right code? I am trying with the commands getVertex and setVertex, but it seems that I am getting always the same output (This means that my script is not recognizing my new mesh).

Thanks!
Hi! I am actually facing a similar problem. I am running a structural mechanics simulation on Matlab. I want to use the deformed mesh on the next iteration, could you help me to get the right code? I am trying with the commands getVertex and setVertex, but it seems that I am getting always the same output (This means that my script is not recognizing my new mesh). Thanks!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 25, 2012, 11:16 a.m. EDT
Hi,

when I performed this I actually wrote a script in matlab to change the values of the coordinates of each node of the domain of interest. But I did it by exporting the COMSOL mesh in a txt file and running the script on it.

I admit it is not smartest choice. But it worked. If you want I can send you the script, maybe with an example, but if your model is big it might take long to run.

I believe it is possible to do this operation using the deformed mesh node. Probably you would have to tell COMSOL to apply the other physics with respect to the reference frame of the deformed mesh. I'll try it later and if I manage to make it work I let you know.

Regards
Hi, when I performed this I actually wrote a script in matlab to change the values of the coordinates of each node of the domain of interest. But I did it by exporting the COMSOL mesh in a txt file and running the script on it. I admit it is not smartest choice. But it worked. If you want I can send you the script, maybe with an example, but if your model is big it might take long to run. I believe it is possible to do this operation using the deformed mesh node. Probably you would have to tell COMSOL to apply the other physics with respect to the reference frame of the deformed mesh. I'll try it later and if I manage to make it work I let you know. Regards

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 25, 2012, 11:49 a.m. EDT
Hi again,

I tryied it in an extremelly simple fashion, just add the 'moving mesh' node to the simulation, impose a mesh displacement, and solve. No changes in any equation or anything. It works. The solution is clearly calculated for the deformed geometry, as it is expected.

I also tryied the node 'deformed geometry', and also this one works. I believe this is just a less complete version of the moving mesh.

I attached the file I used to check it.

Usually I work in electromagnetics, so the example is an AC DC model.

Hope it helps somehow.
Hi again, I tryied it in an extremelly simple fashion, just add the 'moving mesh' node to the simulation, impose a mesh displacement, and solve. No changes in any equation or anything. It works. The solution is clearly calculated for the deformed geometry, as it is expected. I also tryied the node 'deformed geometry', and also this one works. I believe this is just a less complete version of the moving mesh. I attached the file I used to check it. Usually I work in electromagnetics, so the example is an AC DC model. Hope it helps somehow.

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.