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.

what does this expression mean?

Please login with a confirmed email address before reporting spam

Hi,guys,
Just see an example in RF model, but I do not know what does this global expression mean?
Name:ofact
Expession: if(nx*x+ny*y>=0,1,-1)
Description:Sign factor for outward normals on interior boundaries

Is there any Help document that I can read?

Thanks in advance.

7 Replies Last Post 31 mars 2011, 08:22 UTC−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 2 août 2010, 09:24 UTC−4
Hi

Well I do not know where you got it from, nor if its 3.5 or 4 but by analysing the expression and knowing that:

(nx,ny) is the normal vector of a edge, while
(x,y) is the vector from the origine to a point of coordinates (x,y)

hence
nx*x+ny*y = (nx,ny)*(x,y) is the scalar product of the normal and the point r vector which is the cosinus of the angle of the two vectors.

For this to be positive or 0 (upper quadrants I+II) the resultant if() statement is +1, while if it's inthe two lower quadrants (III+IV) the resultant is -1

So if the origine (0,0) is "inside" a convex area, and we follow the border (edge) we should have always +1 if the vector normal is pointing outwards.

I believe (to be proven though) that if you find a value -1 while travelling along the edges of a closed domain then you could state that your domain is not convex.

you can use a boundary arrow plot with "nx" and "ny" to visualise the boundary normals, and if you set the height as "nx*x+ny*y" you can check the scalar vector produt. Do it for a circle around the origine and one not containing the origine.

Not that if you use points to check the nx*x+ny*y you might have some surpries, as the points inherite their normals from the adjacent edges and this might lead to discontinuitites

I'm not sure this helps :)



--
Good luck
Ivar
Hi Well I do not know where you got it from, nor if its 3.5 or 4 but by analysing the expression and knowing that: (nx,ny) is the normal vector of a edge, while (x,y) is the vector from the origine to a point of coordinates (x,y) hence nx*x+ny*y = (nx,ny)*(x,y) is the scalar product of the normal and the point r vector which is the cosinus of the angle of the two vectors. For this to be positive or 0 (upper quadrants I+II) the resultant if() statement is +1, while if it's inthe two lower quadrants (III+IV) the resultant is -1 So if the origine (0,0) is "inside" a convex area, and we follow the border (edge) we should have always +1 if the vector normal is pointing outwards. I believe (to be proven though) that if you find a value -1 while travelling along the edges of a closed domain then you could state that your domain is not convex. you can use a boundary arrow plot with "nx" and "ny" to visualise the boundary normals, and if you set the height as "nx*x+ny*y" you can check the scalar vector produt. Do it for a circle around the origine and one not containing the origine. Not that if you use points to check the nx*x+ny*y you might have some surpries, as the points inherite their normals from the adjacent edges and this might lead to discontinuitites I'm not sure this helps :) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 août 2010, 04:53 UTC−4
Hi, Var, Thanks so much for detailed description.
You mentioned "you can use a boundary arrow plot with "nx" and "ny" to visualise the boundary normals
", while, I can not see the arrow plot for "nx" and "ny", are you sure?

Thanks again.
Hi, Var, Thanks so much for detailed description. You mentioned "you can use a boundary arrow plot with "nx" and "ny" to visualise the boundary normals ", while, I can not see the arrow plot for "nx" and "ny", are you sure? Thanks again.

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 3 août 2010, 05:12 UTC−4
Hi

Well you need to have your matrices populated so if you have not yet solved, run a "sover > get initial values" that's enough

then select "postprocessing>Arrow" plot turn on and type nx and ny for the x and y expressions

--
Good luck
Ivar
Hi Well you need to have your matrices populated so if you have not yet solved, run a "sover > get initial values" that's enough then select "postprocessing>Arrow" plot turn on and type nx and ny for the x and y expressions -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 août 2010, 22:41 UTC−4
Ivar,
please on this topic, i am a new user comsol40a, i want to solve (M cross n). M = Mx + My + Mz and n is normal vector to the surface pointing outward.
I am confuse on how to input the correct cross product expression above.

here is the expression i came up with...
(My*nz-Mz*ny) - (Mx*nz-Mz*nx) + (Mx*ny-My*nx)

is this correct?
Ivar, please on this topic, i am a new user comsol40a, i want to solve (M cross n). M = Mx + My + Mz and n is normal vector to the surface pointing outward. I am confuse on how to input the correct cross product expression above. here is the expression i came up with... (My*nz-Mz*ny) - (Mx*nz-Mz*nx) + (Mx*ny-My*nx) is this correct?

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 4 août 2010, 01:52 UTC−4
Hi

I believe so it looks like my "old" way of saying that a vecrtor cross product is the determinant of

¦ i_ j_ k_ ¦
¦ Mx My Mz ¦
¦ nx ny nz ¦

if you have any doubts check it with any doc on vector calculus COMSOL follows standard rules ;)

--
Good luck
Ivar
Hi I believe so it looks like my "old" way of saying that a vecrtor cross product is the determinant of ¦ i_ j_ k_ ¦ ¦ Mx My Mz ¦ ¦ nx ny nz ¦ if you have any doubts check it with any doc on vector calculus COMSOL follows standard rules ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 août 2010, 07:40 UTC−4
Thanks
Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 mars 2011, 08:22 UTC−4

Hi,
there is another expression .
Differential scattering cross_section near_field definition :nscPoav/P0*r^2.
and far_field definition : (normEfar^2/(r/1[m])^2)/abs(E0)^2*r^2

I have search lot of literature,but i didnot found Dsc_near _field the relationship with a
Poynting equation ,
what dos this two expressions mean? where can i find them ?

normEfar mean?
thanks .
Hi, there is another expression . Differential scattering cross_section near_field definition :nscPoav/P0*r^2. and far_field definition : (normEfar^2/(r/1[m])^2)/abs(E0)^2*r^2 I have search lot of literature,but i didnot found Dsc_near _field the relationship with a Poynting equation , what dos this two expressions mean? where can i find them ? normEfar mean? thanks .

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.