Points node numbering

Please login with a confirmed email address before reporting spam

Hello When creating points in geometry and try to assign them probes, the points numbering are not in order, so how can i make them in oreder because i am trying to create many points in the geometry and assign each on of them a probe and i am doing it through matlab livelink using for loop which i need the numbering to assign the probes accordingly. The for loop code is shown below and the numbering is show in the picture

i = 1; for theta = 0:45:359 n = ['pt' num2str(i)]; model.component('comp1').geom('geom1').create(n, 'Point'); model.component('comp1').geom('geom1').feature(n).label(['sensor at angle = ',num2str(n)]); model.component('comp1').geom('geom1').feature(n).setIndex('p', sind(theta), 0); model.component('comp1').geom('geom1').feature(n).setIndex('p', cosd(theta), 1); model.component('comp1').geom('geom1').runPre('fin');

model.component('comp1').probe.create(n, 'Point');
model.component('comp1').geom('geom1').run;
model.component('comp1').probe(n).selection.set([i]);
model.component('comp1').geom('geom1').run('fin');
i = i + 1;

end

Thank you



0 Replies Last Post 28 giu 2024, 21:44 GMT-4
COMSOL Moderator

Hello Abdulhadi Aldawsari

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.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.