- #1
JustBe
- 1
- 0
Hello,
I hope some expert can help me:
What do I want?
I am modeling magnets in script Comsol in 3D. All I want to do is to displace a magnet.
and then compute forces and moments applied to it.
This works in Comsol (2D):
draw{1} = rect2(.5,1,'pos',[0;0]);
draw{2} = rect2(.6,1,'pos',[0.5;0]);
draw{3} = circ2(.1,'pos',[0.2;0.5]);
fem=[];
fem = geomanalyze(fem,draw,'ns',{'R1','R2','C1'});
geomplot(fem)
Then in a loop it is possible to update the fem object with fem = geomanalyze(fem) and it will work like in GUI.
Now I want to do something similar but in 3D. I want to move a block (the magnet).
But somehow something similar doesn't work in 3D:
draw(1)=block3(1,1,1,'pos',[0 0 0]);
draw(2)=block3(1,1,1,'pos',[1 1 1]);
fem = []
fem = geomanalyze(fem, draw, 'ns',{'BLK1', 'BLK2'})
The response is, that geomanalyze wants more information...
I hope an expert can help me...! please?
I hope some expert can help me:
What do I want?
I am modeling magnets in script Comsol in 3D. All I want to do is to displace a magnet.
and then compute forces and moments applied to it.
This works in Comsol (2D):
draw{1} = rect2(.5,1,'pos',[0;0]);
draw{2} = rect2(.6,1,'pos',[0.5;0]);
draw{3} = circ2(.1,'pos',[0.2;0.5]);
fem=[];
fem = geomanalyze(fem,draw,'ns',{'R1','R2','C1'});
geomplot(fem)
Then in a loop it is possible to update the fem object with fem = geomanalyze(fem) and it will work like in GUI.
Now I want to do something similar but in 3D. I want to move a block (the magnet).
But somehow something similar doesn't work in 3D:
draw(1)=block3(1,1,1,'pos',[0 0 0]);
draw(2)=block3(1,1,1,'pos',[1 1 1]);
fem = []
fem = geomanalyze(fem, draw, 'ns',{'BLK1', 'BLK2'})
The response is, that geomanalyze wants more information...
I hope an expert can help me...! please?
Last edited: