Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

COMSOL : a problem about self-varying(!) subdomain IDs in Comsol with Matlab

  1. Mar 11, 2009 #1
    Hi all;
    I'm trying to write a script that automatically generates a geometry and does the analysis in a for-next loop.
    It changes specified geometry properties in a for-next step like scaling the geometry.
    But I've got a problem about subdomain IDs.
    Although the main geometry isn't changed in the script (as i said it isonly scaled, there is no new generated subdomains) , the subdomain idsare changing. Because of this, i cannot specify the initial conditionscorrectly.
    I tried to use [g,st] = geomcsg(sl) command to getsubdomain IDs with their associated geometry IDs. So i could update thescript every time when i change the geometry properties. But i'vefailed because i couldn't reach the rows of variable st.
    Although typing variable st in Matlab command window gives therelation between geometries and subdomains, i couldnt reach it fromscript. It is seen as 2xm matrix in command window but nxm matrix ofdoubles in workspace so commands like st(1,:) doesnt work.
    Is there any suggestions to solve this problem or any idea why does it happen?: )
    Thanks in advance..
     
  2. jcsd
  3. Mar 13, 2009 #2
    Problem solved..
    subdomain IDs can be read by FIND(x) command from st variable
     
  4. Jul 19, 2010 #3
    What's the difference between the geometry ID and the subdomain ID?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: COMSOL : a problem about self-varying(!) subdomain IDs in Comsol with Matlab
  1. Comsol problem (Replies: 3)

Loading...