Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
05.06.2010, 08:19 GMT-4
Hi
Ido not have comsol and matlab here from home, but shouldnt you index these too:
g4=geomcoerce('curve',carr);
s.objs={g4};
s.name={['CO' num2str(i)]};
s.tags={'g4'};
for me I read only 1 item, and if you go through all its only the "last one" remaining.
If you make a complex geoemtry with 2-3 or more items, COSMOL stores g1 g2 g3 g4 ... and the name list contains all names
check it out
Have fun Comsoling
Ivar
Hi
Ido not have comsol and matlab here from home, but shouldnt you index these too:
g4=geomcoerce('curve',carr);
s.objs={g4};
s.name={['CO' num2str(i)]};
s.tags={'g4'};
for me I read only 1 item, and if you go through all its only the "last one" remaining.
If you make a complex geoemtry with 2-3 or more items, COSMOL stores g1 g2 g3 g4 ... and the name list contains all names
check it out
Have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
05.06.2010, 12:48 GMT-4
I tried to index the following as:
g(i)=geomcoerce('curve',carr);
s.objs={g(i)};
s.name={['CO' num2str(i)]};
s.tags={'g(i)'};
but COMSOL doesn't like that... I am not sure of a way to index variable names i.e.
g1...g500
Do you know how to do this?
I tried to index the following as:
g(i)=geomcoerce('curve',carr);
s.objs={g(i)};
s.name={['CO' num2str(i)]};
s.tags={'g(i)'};
but COMSOL doesn't like that... I am not sure of a way to index variable names i.e.
g1...g500
Do you know how to do this?
Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
05.06.2010, 12:59 GMT-4
Hi
not like that (I have no direct access to COMSOL from home), but really make a geometry from the GUI interface and save as a M file or just analyse your history.m file, and compare.
Then check that the naming is the same w.r.t. chr and ' '
Good luck
Ivar
Hi
not like that (I have no direct access to COMSOL from home), but really make a geometry from the GUI interface and save as a M file or just analyse your history.m file, and compare.
Then check that the naming is the same w.r.t. chr and ' '
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
07.06.2010, 08:46 GMT-4
I figured out how to create a geometry using a loop (while loop or for loop) in COMSOL/MATLAB... It finally occurred to me what I had to do... I guess I am a little out of practice! Thank you for your help!
Markthomas
I figured out how to create a geometry using a loop (while loop or for loop) in COMSOL/MATLAB... It finally occurred to me what I had to do... I guess I am a little out of practice! Thank you for your help!
Markthomas
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
25.03.2011, 11:29 GMT-4
I figured out how to create a geometry using a loop ...
So let us know, please!
[QUOTE]
I figured out how to create a geometry using a loop ...
[/QUOTE]
So let us know, please!
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
18.04.2011, 09:42 GMT-4
Hi,
1) I have an arc that form my 2-D geometry. I also have an array of straight lines(y=constant) that cut my arc splitting into multiple arcs.
2) I need to move my multiple arcs to different positions.
3) So i select the arc to be moved.
4) Now I need to access the index of the array of straight line that is nearest to this arc.
5) So, I need to loop through the existing array and extract the y-coordinate of this straight line from the array.
6) Then retrieve the min y-position of the arc selected for moving.
7) Use if condition to check if y of line exceeds y of the appropriate arc.
8) Based on the above comparison, decide where to place my arc.
9) The displacement through which I take the arc will have the array index that is to be retrieved in 4.
I do not expect an exact solution to the problem but would be glad even if I can get hints on
a) how to access the index of an array of geometric object.
b) how to write if condition
c) how to write for loop
Note: I am flexible to choose between 3.5 and 4.1 or even integrating matlab with comsol if necessary though I have never tried it before.
Hi,
1) I have an arc that form my 2-D geometry. I also have an array of straight lines(y=constant) that cut my arc splitting into multiple arcs.
2) I need to move my multiple arcs to different positions.
3) So i select the arc to be moved.
4) Now I need to access the index of the array of straight line that is nearest to this arc.
5) So, I need to loop through the existing array and extract the y-coordinate of this straight line from the array.
6) Then retrieve the min y-position of the arc selected for moving.
7) Use if condition to check if y of line exceeds y of the appropriate arc.
8) Based on the above comparison, decide where to place my arc.
9) The displacement through which I take the arc will have the array index that is to be retrieved in 4.
I do not expect an exact solution to the problem but would be glad even if I can get hints on
a) how to access the index of an array of geometric object.
b) how to write if condition
c) how to write for loop
Note: I am flexible to choose between 3.5 and 4.1 or even integrating matlab with comsol if necessary though I have never tried it before.