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.

Getting the surface from a domain programmatically inside livelink

Please login with a confirmed email address before reporting spam

I am trying to use a coding approach, for varying models etc, to building my simulation. When it comes to exporting results I want to export values of data on a surface.

So I have a domain and I want to select a surface for the result output. It looks like this at the moment.

model.result.create('pg1', 'PlotGroup3D'); model.result('pg1').create('surf1', 'Surface'); model.result('pg1').feature('surf1').create('sel1', 'Selection'); model.result('pg1').feature('surf1').feature('sel1').selection('geom_dsv_dom'); model.result('pg1').feature('surf1').feature('sel1').selection.set([137 138 139 140 210 211 216 217]);

The question is, I dislike using the numbers, hard coded for the boundaries, and want to know how to use a selection tag to do this. I can get a selection to the domain, that the surface I want defines as follows

dsv =model.selection('geom1_dsv_dom');

(_bnd does not work)

but how can iuse this to make the selection in my result output?


0 Replies Last Post Apr 21, 2020, 11:21 a.m. EDT
COMSOL Moderator

Hello William Handler

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.