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.

Copying a part of a mesh

Please login with a confirmed email address before reporting spam

Hi,

I'm using COMSOL 4.2a to simulate electric fields on a cell in a micro-channel. I use the LiveLink for MatLab to move around the cell in the channel and recalculate the electric fields in the new positions (a new mesh is created for each new position).
In order to evaluate the electric field at the same points on the cell surface for each iteration, I need the mesh points to remain constant on the cell surface. I tried to use the 'Distribution' command on the cell edges, i.e.:
model.mesh.create('mesh1', 'geom1');
model.mesh('mesh1').feature.create('ftet1', 'FreeTet');
model.mesh('mesh1').feature('ftet1').feature.create('size1', 'Size');
model.mesh('mesh1').feature('ftet1').feature('size1').set('hmax', '4E-6');
model.mesh('mesh1').feature('ftet1').feature('size1').set('hmin', '4E-8');
model.mesh('mesh1').feature('ftet1').feature.create('dis1', 'Distribution');
model.mesh('mesh1').feature('ftet1').feature('dis1').selection.set([index_edges_cell]);
model.mesh('mesh1').feature('ftet1').feature('dis1').set('numelem', '40');
model.mesh('mesh1').run;

Yet, the points don't remain constant. My question is whether there is a way to copy the mesh on the cell surface alone to the new iteration of the model and then complete the remainder of the geometry meshing? Perhaps the 'Reference' command can be helpful (I didn't understand how to apply it usefully...).

Thanks for your help!

0 Replies Last Post Aug 2, 2012, 6:41 a.m. EDT
COMSOL Moderator

Hello Avigail Ben-Or

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.