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.

normal to edge in 3D geometry

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Hi,

I have curved edge on one of 3D box surfaces. I want to move this curve in normal direction, I have defined using deformed geometry prescribed mesh velocity, and also tried prescribed mesh displacement but my problem is how to define a normal to edge in 3D, I didn't succeed to solve this problem so far, any one can please help me?

Thanks,
Shahrazad

9 Replies Last Post 14 dic 2015, 02:43 GMT-5
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: 9 years ago 9 dic 2015, 02:06 GMT-5
Hi

take a look at the physics equation taxonomy described by Pr. E. Tonti of the University of Trieste, do a search on the Web, he has also written an interesting book lately. From his nice explanations about space and dual space and their related physical equations, and where our classical equations apply, you will get a better feeling about normal, vector directions etc.
Normal's can only be defined on surfaces, these are "duals", just as a point is the dual of a volume centered on the point. What might be confusing is that COSMOL talks about edge normal in 2D, because COMSOL is considering 2D as a projection of 3D onto a plane, therefore a 2D edge is in fact a plane with one vector direction perpendicular to the "paper" hence a normal can be define.
BUT you need also to define the direction of the Edge to define the direction of your normal (up or down).
Points, Edges, Surface, Volumes AND their Directions (source/sink, left/right, up/down, in/out) are topology relations essential to get the best use of COMSOL. As well as the concept of Domains and Boundaries, terms used extensively in the COMSOL documents, but are these really grasped fully by the end users ? At least once mastered fully, then COMSOL becomes really "easy" and great fun, before that it can be often frustrating ;)

--
Good luck
Ivar
Hi take a look at the physics equation taxonomy described by Pr. E. Tonti of the University of Trieste, do a search on the Web, he has also written an interesting book lately. From his nice explanations about space and dual space and their related physical equations, and where our classical equations apply, you will get a better feeling about normal, vector directions etc. Normal's can only be defined on surfaces, these are "duals", just as a point is the dual of a volume centered on the point. What might be confusing is that COSMOL talks about edge normal in 2D, because COMSOL is considering 2D as a projection of 3D onto a plane, therefore a 2D edge is in fact a plane with one vector direction perpendicular to the "paper" hence a normal can be define. BUT you need also to define the direction of the Edge to define the direction of your normal (up or down). Points, Edges, Surface, Volumes AND their Directions (source/sink, left/right, up/down, in/out) are topology relations essential to get the best use of COMSOL. As well as the concept of Domains and Boundaries, terms used extensively in the COMSOL documents, but are these really grasped fully by the end users ? At least once mastered fully, then COMSOL becomes really "easy" and great fun, before that it can be often frustrating ;) -- Good luck Ivar

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 9 dic 2015, 02:52 GMT-5
thanks Ivar for your reply, I am really happy to get a reply from you :) as a new student to comsol I read a lot of problems posted here in this form and I have read many of you advices so it's very exciting to get your opinion on this matter and I will definitely look for Pr. E. Tonti book to enrich my knowledge of this topic.

regarding my problem - I wanted to move my edge (lying on 2D plain say xy) in normal direction pointing into that 2D plain not in +-z direction, based on information that I have been reading I am thinking to do so by using tangential vectors ( t1x, t1y) defined on the edge to build my normal vector (-t1y,t1x), and extrude it into the boundary using general extrusion, (I was confused by the way documentation explains what tcurv1 and 2 are and I don't know if I can use them or not).

I will test this, I hope it will work and solve my problem.
Thanks again and have a nice day,
Shahrazad
thanks Ivar for your reply, I am really happy to get a reply from you :) as a new student to comsol I read a lot of problems posted here in this form and I have read many of you advices so it's very exciting to get your opinion on this matter and I will definitely look for Pr. E. Tonti book to enrich my knowledge of this topic. regarding my problem - I wanted to move my edge (lying on 2D plain say xy) in normal direction pointing into that 2D plain not in +-z direction, based on information that I have been reading I am thinking to do so by using tangential vectors ( t1x, t1y) defined on the edge to build my normal vector (-t1y,t1x), and extrude it into the boundary using general extrusion, (I was confused by the way documentation explains what tcurv1 and 2 are and I don't know if I can use them or not). I will test this, I hope it will work and solve my problem. Thanks again and have a nice day, Shahrazad

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 9 dic 2015, 04:42 GMT-5
unfortunately I am having problem extruding the t1x, t1y from agde into the boundary to be used in prescribed mesh displacement in deformed geometry.

I tried to define variable on edge equals to t1x, t1y and extrude it but that also didn't work
unfortunately I am having problem extruding the t1x, t1y from agde into the boundary to be used in prescribed mesh displacement in deformed geometry. I tried to define variable on edge equals to t1x, t1y and extrude it but that also didn't work

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: 9 years ago 9 dic 2015, 05:36 GMT-5
Hi

check the "Definition - Boundary Coordinates" node,

the "t"s are the tangential components (depending on the direction of an edge) but do you know which one is aligned along the edge? As you are interested in the normal, so in 2D geometry you can access the internally defined normal which direction is arranged according to the direction of the boundary (edge) you can turn on the visualization of the directional arrows (and labels) check your View settings

In 3D its more complex (or not depending on your vector multiplication skills) as anyhow you must define a preferred direction as a vector to do the cross product of your direction and the edge line direction. and the sign or direction of the Edge will then orient up/down your normal direction.

By the way "TONTI diagrams" for analyzing equations are also described on Wiki, as well as referred in several courses given at MIT. It's a useful tool to analyze the relevant equations required around a complex model.

--
Good luck
Ivar
Hi check the "Definition - Boundary Coordinates" node, the "t"s are the tangential components (depending on the direction of an edge) but do you know which one is aligned along the edge? As you are interested in the normal, so in 2D geometry you can access the internally defined normal which direction is arranged according to the direction of the boundary (edge) you can turn on the visualization of the directional arrows (and labels) check your View settings In 3D its more complex (or not depending on your vector multiplication skills) as anyhow you must define a preferred direction as a vector to do the cross product of your direction and the edge line direction. and the sign or direction of the Edge will then orient up/down your normal direction. By the way "TONTI diagrams" for analyzing equations are also described on Wiki, as well as referred in several courses given at MIT. It's a useful tool to analyze the relevant equations required around a complex model. -- Good luck Ivar

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 9 dic 2015, 06:31 GMT-5
yes I know the boundary system tangential components but I am not using them, I am using the built in t1x, t1y and t1z which are defined by comsol as explained in the documents under 3D tangential variables, in my case they are different than sys.t1x,sys.t1y.. which I choose. as I understood in 3D geometry we have t1x,t1y and t1z that are defined on edges ( aligned along the edge), and t1x, t1y, and t2x, t2y and t2z both defined on surface, I can use t1x, t1y and t1z on an edge to calculate the normal ( the normal to point with (t1x,t1y) tangential vector is (-t1y, t1x) or (t1y, -t1x).
the obstacle I am facing now is how to move my curved boundary into my 2D in the direction of my calculated normal vector, the t1x and t1y on the edge are constant variables, what I did was defining new variables on the edge that equal t1x and -t1y and defined general extrusion from the edge with no source mapped to x,y,z (closest point) and used deformed geometry to prescribe my mesh displacement to be number* extruded t1x, and -t1y but the results are not good, for some reason my extruded variables are mapped into the third direction and any other definition "Failed to find a solution. Singular matrix.".

I also tried to move the edge instead of the boundary ( to get rid of the extrusion) using Weak Constraint:
(0.00001*(-t1z)-u) &&(0.00001*(t1x)-w)&&(0-v)
but this also didn't work

thanks for your help,
Shahrazad
yes I know the boundary system tangential components but I am not using them, I am using the built in t1x, t1y and t1z which are defined by comsol as explained in the documents under 3D tangential variables, in my case they are different than sys.t1x,sys.t1y.. which I choose. as I understood in 3D geometry we have t1x,t1y and t1z that are defined on edges ( aligned along the edge), and t1x, t1y, and t2x, t2y and t2z both defined on surface, I can use t1x, t1y and t1z on an edge to calculate the normal ( the normal to point with (t1x,t1y) tangential vector is (-t1y, t1x) or (t1y, -t1x). the obstacle I am facing now is how to move my curved boundary into my 2D in the direction of my calculated normal vector, the t1x and t1y on the edge are constant variables, what I did was defining new variables on the edge that equal t1x and -t1y and defined general extrusion from the edge with no source mapped to x,y,z (closest point) and used deformed geometry to prescribe my mesh displacement to be number* extruded t1x, and -t1y but the results are not good, for some reason my extruded variables are mapped into the third direction and any other definition "Failed to find a solution. Singular matrix.". I also tried to move the edge instead of the boundary ( to get rid of the extrusion) using Weak Constraint: (0.00001*(-t1z)-u) &&(0.00001*(t1x)-w)&&(0-v) but this also didn't work thanks for your help, Shahrazad

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 9 dic 2015, 07:08 GMT-5
hi,

It's working for the general extrusion case, I managed to move my boundary in the normal direction I wanted.

thanks for all, have a nice week,
Shahrazad
hi, It's working for the general extrusion case, I managed to move my boundary in the normal direction I wanted. thanks for all, have a nice week, Shahrazad

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: 9 years ago 10 dic 2015, 02:29 GMT-5
Hi

Yes, I have made some toy models myself, I believe the behavior has changed from the early V4.x days, that was last time I was fighting with these t&n's ;)

Still to really catch all dependences, I suggest that you make a 3D "toy model" i.e. structural a cube of 1[m] side, give it a Solid physics, E=1E3, nu=0.3, rho=1, then fix one boundary of the cube and apply a gravity -g_const diagonal along all X,Y,Z, Solve as Stationary with "include geometric nonlinearity"and plot the results with surface and line plots, as well as Coordinate plots (of the boundary coordinate system.
I see then that the boundary coordinate system "sys1" is not defined on the Edges, only on the Surfaces/Boundaries, but the (t1,t2,n) vectors are defined everywhere, and that on the Edges these are not Cartesian, but that is expected, if you think over it

--
Good luck
Ivar
Hi Yes, I have made some toy models myself, I believe the behavior has changed from the early V4.x days, that was last time I was fighting with these t&n's ;) Still to really catch all dependences, I suggest that you make a 3D "toy model" i.e. structural a cube of 1[m] side, give it a Solid physics, E=1E3, nu=0.3, rho=1, then fix one boundary of the cube and apply a gravity -g_const diagonal along all X,Y,Z, Solve as Stationary with "include geometric nonlinearity"and plot the results with surface and line plots, as well as Coordinate plots (of the boundary coordinate system. I see then that the boundary coordinate system "sys1" is not defined on the Edges, only on the Surfaces/Boundaries, but the (t1,t2,n) vectors are defined everywhere, and that on the Edges these are not Cartesian, but that is expected, if you think over it -- Good luck Ivar


Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 10 dic 2015, 03:00 GMT-5
thanks,

that is nice, I thought that if defined sys.t1 to be "manual" the sys. would be the same system as the to t1x..,t2x.., nx.. but that is not correct : in this case both systems would point to the same direction but still as you wrote sys is not defined on edges..I didn't notice that
thanks for the model, it was very useful to see more way to analyze the results I understand it better now :)

wishing you the best,
Shahrazad
thanks, that is nice, I thought that if defined sys.t1 to be "manual" the sys. would be the same system as the to t1x..,t2x.., nx.. but that is not correct : in this case both systems would point to the same direction but still as you wrote sys is not defined on edges..I didn't notice that thanks for the model, it was very useful to see more way to analyze the results I understand it better now :) wishing you the best, Shahrazad

Shahrazad Tarboush Sirhan

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 14 dic 2015, 02:43 GMT-5
it's me again,

I have a small question, related to my extrusion:
under Advanced Settings for Component Couplings there are two options: use tolerance and closest point. as I understand closest point will set mesh search method to search closest node points, right? and if we are interested in other "free" point we can use tolerance?
reading the doc didn't help me clarify this, nor reading in this community form. in the doc. the explain these methods by:

* If Use tolerance is selected the result depends on the other field definitions in this section.
* If Closest point is selected, the closest point in the source selection is used.

I am not sure I completely understand what points closest point uses and if I can get the same coles point using tolerance...examples in models library didn't help me either.
I am using general extrusion to extrude t1x, t1y from edge into 2D boundary in 3D geometry, I want my mapping to be in normal direction in (-t1y, t1x) direction, so I choose my general extrusion destination to be x, y, z ( my model is 3D), and no source with closest point option to get normal mapping. it worked very good when my 2D boundary ( that I am extruding into ) was . I tried to attach pictures from a simple 2D model (I got error doing that), it showes how in "small" extrusion distance the mapped normals from edge (boundary) into the 2D domain goes in normal direction (straight lines), but as the distance increases the straight lines become curved (when line are my contour line of the extruded value). that's way I am interested to know what points are chosen and if I can choose other, and how to do so with tolerance.

Thanks,
Shahrazad
it's me again, I have a small question, related to my extrusion: under Advanced Settings for Component Couplings there are two options: use tolerance and closest point. as I understand closest point will set mesh search method to search closest node points, right? and if we are interested in other "free" point we can use tolerance? reading the doc didn't help me clarify this, nor reading in this community form. in the doc. the explain these methods by: * If Use tolerance is selected the result depends on the other field definitions in this section. * If Closest point is selected, the closest point in the source selection is used. I am not sure I completely understand what points closest point uses and if I can get the same coles point using tolerance...examples in models library didn't help me either. I am using general extrusion to extrude t1x, t1y from edge into 2D boundary in 3D geometry, I want my mapping to be in normal direction in (-t1y, t1x) direction, so I choose my general extrusion destination to be x, y, z ( my model is 3D), and no source with closest point option to get normal mapping. it worked very good when my 2D boundary ( that I am extruding into ) was . I tried to attach pictures from a simple 2D model (I got error doing that), it showes how in "small" extrusion distance the mapped normals from edge (boundary) into the 2D domain goes in normal direction (straight lines), but as the distance increases the straight lines become curved (when line are my contour line of the extruded value). that's way I am interested to know what points are chosen and if I can choose other, and how to do so with tolerance. Thanks, Shahrazad

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.