Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Point Evaluation using Biot-Savart Law.

Please login with a confirmed email address before reporting spam

Hello everyone,
I am currently attempting to do a point evaluation with the expression for Biot-Savart Law.

The set up is like this:
I have an array of points that I would like to get the value at using this expression:
1/(4*pi)*intop1((ec.Jy*(z_P-z)-ec.Jz*(y_P-y))/r^3)

where:
intop1 is the integration operator,
z_P, y_P, x_P are the field points, and x.y.z are points within the domain
r = ((x_P-x)^2+(y_P-y)^2+(z_P-z)^2)^0.5

I can get the values with parameter sweeps, but this involves solving the model over and over again for each point I use. (No point in solving for the current density N times, when it only needs to be solved once.)

Ideally I would like the expression to be something like:
1/(4*pi)*intop1((ec.Jy*(z_coord_at_selected_point-z)-ec.Jz*(y_coord_at_selected_point-y))/r^3)
r = ((x_coord_at_selected_point-x)^2+(y_coord_at_selected_point-y)^2+(z_coord_at_selected_point-z)^2)^0.5

I have looked pretty extensively on the internet, and in manuals, but cannot seem to find a command for such a general function. I have seen dom==particular point, ie 7, but I need it to take a general selected point, as well as only taking the x, y, or z coordinate of the point.

Does anyone know of a command I may have missed? Or offer an alternative method to getting this information without having to input an insane amount of parameters into comsol?

I realize I can use the magnetic package to get the field from the current density, but I am needing to do it this way for now, so the magnetics package isn't an option for me.

Any and all help is much apprecated, thanks!

3 Replies Last Post 06.05.2013, 13:24 GMT-4
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 04.05.2013, 03:31 GMT-4
Hi

I'm, not sure I'm giving you THE reply, but some hints that perhaps could help you (I'm not by my WS so I cannot check all).

a) you are in a spherical coordinate system like that so why not define one, and set the origine as three variables Px,Py,Pz that you might adapt via a parameter or a variable (the latter TBC - to be confirmed/checked)

b) Then to get the coordinates of a point you integrate over points on that point

inotop_overPoints(x), y respectively z to get x,y,z_at point P (selected in intop definition)

this is like making the sum over points from 1 to 1 of x hence is equal to "x".
It's somewhat an overkill, but its the "logical" COMSOL way to extract the values at a point from a field. And variables as Jc or any dependent variables are full fields depending on (x,y,z,t) or more, but with COSMOL we never write that out, its implicit, and often we forget it too ;)

At some point I was thinking of the projection or mapping operators but I'm not sure that would do, therein you have the dest() operator to distinguish the source and destination items

PLS keep us updated it's an inteteresting question

--
Good luck
Ivar
Hi I'm, not sure I'm giving you THE reply, but some hints that perhaps could help you (I'm not by my WS so I cannot check all). a) you are in a spherical coordinate system like that so why not define one, and set the origine as three variables Px,Py,Pz that you might adapt via a parameter or a variable (the latter TBC - to be confirmed/checked) b) Then to get the coordinates of a point you integrate over points on that point inotop_overPoints(x), y respectively z to get x,y,z_at point P (selected in intop definition) this is like making the sum over points from 1 to 1 of x hence is equal to "x". It's somewhat an overkill, but its the "logical" COMSOL way to extract the values at a point from a field. And variables as Jc or any dependent variables are full fields depending on (x,y,z,t) or more, but with COSMOL we never write that out, its implicit, and often we forget it too ;) At some point I was thinking of the projection or mapping operators but I'm not sure that would do, therein you have the dest() operator to distinguish the source and destination items PLS keep us updated it's an inteteresting question -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.05.2013, 12:13 GMT-4
Hello again, and thank you for the quick reply!

I tried your suggestion, but failed to achevie a reasonable result. Should i be making as many inotop_overPoints operators as I have points that I need coordinates from? If I select all the points in the integration operator would it not simply integrate all those points?

When trying this I could get a reasonable result by picking one point in the integration operator, than the similar point in the point evaluation, but with potentally 100+ points I need evaluated, I am hoping I could do it a way that is a little more automatic, or perhaps I am missing something from your advice.

The end goal is to use the optimization tool to find the inversion of this as well, so I need this to be 1 expression.

I found your reply to be super helpful, and will continue to take this path to attempt to find the solution. Any more advice you have is welcome, and apprecated.

Thank you!
Josh
Hello again, and thank you for the quick reply! I tried your suggestion, but failed to achevie a reasonable result. Should i be making as many inotop_overPoints operators as I have points that I need coordinates from? If I select all the points in the integration operator would it not simply integrate all those points? When trying this I could get a reasonable result by picking one point in the integration operator, than the similar point in the point evaluation, but with potentally 100+ points I need evaluated, I am hoping I could do it a way that is a little more automatic, or perhaps I am missing something from your advice. The end goal is to use the optimization tool to find the inversion of this as well, so I need this to be 1 expression. I found your reply to be super helpful, and will continue to take this path to attempt to find the solution. Any more advice you have is welcome, and apprecated. Thank you! Josh

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 06.05.2013, 13:24 GMT-4
Hi

indeed you need to integrate one point at the time ;)

henperhaps some mapping operator, need some thoughts, but you cn also try "support" if nobody has any good tips here

--
Good luck
Ivar
Hi indeed you need to integrate one point at the time ;) henperhaps some mapping operator, need some thoughts, but you cn also try "support" if nobody has any good tips here -- Good luck Ivar

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.