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.

Projection of vector field on line or surface

Please login with a confirmed email address before reporting spam

Hi,

A) I am simulating a magnetic vield and I would like to get the value of the field along a given direction (given by a line segment from my geometry). if n is the tangential vector pointing in the line's direction it is basically the scalar product that I'm looking for so that I can plot or export it. However, I don't know how to get a line's normalized tangent vector.

B) I would like to do the same for a surface, i.e. find the tangential component of the vector field to my surface at a given point. (This is less important but it belongs to the same category)

Thanks for your hints on how to do this!

Pascal


3 Replies Last Post Oct 21, 2022, 9:50 a.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 21, 2022, 9:18 a.m. EDT

Hello Pascal,

A/ I suppose you mean the tangent vector, right? The tangent vector to an edge in 3D has components t1x, t1y and t1z. See COMSOL Multiphysics Reference Manual, version 6.0, page 321 for more details.

B/ A surface has two independent tangential vectors, t1 and t2, with components t1x, etc. If you mean normal vector, then it's n and its components are nx, etc. See same reference as above for more details.

Best,

Jeff

-------------------
Jeff Hiller
Hello Pascal, A/ I suppose you mean the tangent vector, right? The tangent vector to an edge in 3D has components t1x, t1y and t1z. See COMSOL Multiphysics Reference Manual, version 6.0, page 321 for more details. B/ A surface has two independent tangential vectors, t1 and t2, with components t1x, etc. If you mean normal vector, then it's n and its components are nx, etc. See same reference as above for more details. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 21, 2022, 9:33 a.m. EDT

Hi Jeff,

thanks for your reply! (Yes, I meant the normalized tangent vector, sorry for the confusion.) That works well when I am evaluating at the specific line. Can I also use the line's direction vector elsewhere? In my example the line is edge 152 and I would like to evaluate the magnetic field in that direction at a point not on the edge. (I tried dom152.t1x but it doesn't work).

Cheers, Pascal

Hi Jeff, thanks for your reply! (Yes, I meant the normalized tangent vector, sorry for the confusion.) That works well when I am evaluating at the specific line. Can I also use the line's direction vector elsewhere? In my example the line is edge 152 and I would like to evaluate the magnetic field in that direction at a point not on the edge. (I tried dom152.t1x but it doesn't work). Cheers, Pascal

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 21, 2022, 9:50 a.m. EDT

You can, but you will need to tell the software how to map from the line (edge 152) to the other locations where you want the data to be available (Since there isn't a unique, obvious, mapping the software can't do that on its own). That's a job for Nonlocal Couplings. See COMSOL Multiphysics Reference Manual, version 6.0, page 369 and following.

Jeff

-------------------
Jeff Hiller
You can, but you will need to tell the software how to map from the line (edge 152) to the other locations where you want the data to be available (Since there isn't a unique, obvious, mapping the software can't do that on its own). That's a job for Nonlocal Couplings. See COMSOL Multiphysics Reference Manual, version 6.0, page 369 and following. Jeff

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.