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.
creating a parameterized identity pair
Posted 2009年9月2日 GMT-4 08:46 0 Replies
Please login with a confirmed email address before reporting spam
I am using COMSOL 3.5a (rotating perpendicular currents application mode) to simulate the back emf of a given electrical machine topology. I want to be able to able to change the geometry and simulate for different geometrical parameters, that's why I first modeled the geometry in COMSOL GUI with the help of constants, and then saved it as an m-file and debugged it such that the geometry was fully parametrized. Now I could change a few constants on the m file and COMSOL would open a new geometry every time I loaded a modified m-file.
So far so good.
But as shown in the 2D generator example in the model library, I wanted to have an identity pair between the rotating and static parts. I did that on the GUI as well and saw how it was translated to the m-file. Now, the problem is, when I run this m-file with different constants as mentioned above, I still have the geometry re-built, but the identity pair wouldn't work as the names of the boundaries and points have changed for this modified geometry.
in other words, for a given set of constants (ie. given geometry) the identity pair part of the m-file would be:
% Boundary pairs
clear pair
pair{1}.type= 'identity';
pair{1}.name= 'Pair 1';
pair{1}.src.dl = [60,61,63,64];
pair{1}.src.operator = 'src2dst_ip2';
pair{1}.dst.dl = [70,71,74,77];
pair{1}.dst.operator = 'dst2src_ip2';
bnd.pair = pair;
fem.bnd = bnd;
For a different set o constants (ie. different geometry) the same boundaries would have numbers different than [60,61,63,64] and [70,71,74,77], which means i can no longer change the constants and have my new geometry including the identity pair.
I wonder if it is possible to have an expression like
pair{1}.src.dl = "boundaries of this object whose name stays the same (CO1) even for different geometries"
instead of
pair{1}.src.dl = [60,61,63,64];
is there a way of reaching the boundaries / points of an object in this way? Using that, it would be possible to parameterize my identity pair as well..
or any other suggestions or simple workarounds that you can think of?
every bit of help would be much appreciated.
regards,
arda
Hello Arda Tüysüz
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.