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.

Changing dipole parameters via livelink

Sudaraka Mallawaarachchi

Please login with a confirmed email address before reporting spam

I need to simulate an emitter with 100 dipoles, part by part using randomly generated phases and coordinates. I have been able to create the geometry using Livelink (Matlab) but I can't find a wayto change the dipole parameters (Magnitude, direction).

Is there a way to do this?
My code so far creates the points at the random locations (X(i), Y(i)) and allocates an Electric Point Dipole to each point.

for i = 1:NumPS
p1 = geom2.feature.create(['p' num2str(i)],'Point');
p1.set('p',[X(i) Y(i)])
clear p1
geom2.run;
model.physics('ewfd').feature.create(['epd' num2str(i)],'ElectricPointDipole',0);
model.physics('ewfd').feature(['epd' num2str(i)]).selection.set(i)
end

I am also wondering whether there is a comprehensive API available for livelink (Matlab). I tried to find one for days with no luck...

Any help is highly appreciated.

0 Replies Last Post 29 set 2016, 11:22 GMT-4
COMSOL Moderator

Hello Sudaraka Mallawaarachchi

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.