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.

Maxwell Stress Tensor

Please login with a confirmed email address before reporting spam

Hello all,

I'm new to Comsol and Im having a little difficulty getting my head around how the Maxwell Stress Tensor operates. I understand its operation when applied to parallel wires (Like in the example given in Comsol) but when I try to use it for my own model I don't understand it's behaviour.

I'm currently using Comsol to look at the scattering of electromagnetic waves from a dielectric sphere. I also want to look at the forces on the sphere.

All I've tried to do is to add a line integration, with the surface of the sphere chosen as the line, and then there is an option to get the upward and downward Maxwell Stress Tensor.

This gives me a complex result which doesn't make sense to me. Perhaps my understanding of the problem isn't complete? Is there a better way to work out the force on the particle?

Any help would be greatly appreciated!

Thanks,
Mark.


19 Replies Last Post Nov 6, 2014, 8:43 a.m. EST
Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 3, 2013, 8:46 a.m. EDT
Mark,

Radiation force on the particle is calculated as:

Fx=intop1(emw.dnTx), [N]

where

intop1(): integration over particle surface,

emw.dnTx: Maxwell downward surface stress tensor, x-component. Note that this variable contains electric and magnetic components of the time- averaged Maxwell stress tensor and is purely real.

Similarly, you can calculate x- and y-components of the radiation force.

I verified this calculation for dielectric, magnetic, and metal particles. Comsol solution agrees perfectly well with Mie analytical solution.

Regards,
Sergei
Mark, Radiation force on the particle is calculated as: Fx=intop1(emw.dnTx), [N] where intop1(): integration over particle surface, emw.dnTx: Maxwell downward surface stress tensor, x-component. Note that this variable contains electric and magnetic components of the time- averaged Maxwell stress tensor and is purely real. Similarly, you can calculate x- and y-components of the radiation force. I verified this calculation for dielectric, magnetic, and metal particles. Comsol solution agrees perfectly well with Mie analytical solution. Regards, Sergei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 4, 2013, 9:33 p.m. EDT
Hello Sergei,

Thank you very much for your reply. I've tried doing what you've said but I get an error which says "Failure to evaluate expression real(mod1.emw.dnTx)

Is this due to an error in my simulation? I've made a 2D model with light propagating along an optical fibre. The sphere in question is located in the evanescent field of the fibre.

I've attached the file. If you have time could someone look at it please?

Thank you,
Mark.
Hello Sergei, Thank you very much for your reply. I've tried doing what you've said but I get an error which says "Failure to evaluate expression real(mod1.emw.dnTx) Is this due to an error in my simulation? I've made a 2D model with light propagating along an optical fibre. The sphere in question is located in the evanescent field of the fibre. I've attached the file. If you have time could someone look at it please? Thank you, Mark.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 5, 2013, 12:42 a.m. EDT
Also could anyone clarify the difference between the upward and downward stress tensor please? Does Comsol split the tensor up into different components?

Sorry for all the questions.
Also could anyone clarify the difference between the upward and downward stress tensor please? Does Comsol split the tensor up into different components? Sorry for all the questions.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 5, 2013, 3:11 a.m. EDT
I think I may have figured it out. I didn't understand the problem correctly.

Is the difference between the upward and downward Maxwell Stress Tensor related to the direction of the normal from the surface? Either into or out of the domain of interest?
I think I may have figured it out. I didn't understand the problem correctly. Is the difference between the upward and downward Maxwell Stress Tensor related to the direction of the normal from the surface? Either into or out of the domain of interest?

Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 5, 2013, 8:11 a.m. EDT
Mark,

You get an error “Failure to evaluate expression” because you integrated Maxwell stress tensor over the volume of the particle. Maxwell stress tensor is defined at the interface of two domains. Integrate expression “emw.dnTx” over particle surface and you’ll get force Fx=3.46e-12[N/m].

Yes, the difference between upward and downward stress tensor is related to the direction of the surface normal.

Regards,
Sergei
Mark, You get an error “Failure to evaluate expression” because you integrated Maxwell stress tensor over the volume of the particle. Maxwell stress tensor is defined at the interface of two domains. Integrate expression “emw.dnTx” over particle surface and you’ll get force Fx=3.46e-12[N/m]. Yes, the difference between upward and downward stress tensor is related to the direction of the surface normal. Regards, Sergei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 7, 2013, 5:45 p.m. EDT
Hello

I am doing a similar question. What I do not know, is when I do the integration, for example, I integrate emw.unTx I have a complex value...The forces are real...

Thanks
Best Regards
Hello I am doing a similar question. What I do not know, is when I do the integration, for example, I integrate emw.unTx I have a complex value...The forces are real... Thanks Best Regards

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 7, 2013, 9:51 p.m. EDT
When I do this I get a force/m which is a few magnitudes smaller than what you get. I think my integration might be incorrect. If I understand correctly I want to integrate over a surface with the normal point radially outward from my sphere in 2D. A line integral will only integrate along the line. If I use a surface integral in 2D it doesn't seem to make sense to me.

I've attached pictures of my attempt but I don't know how I can get Comsol to do what I want. When I do this I get a value of 2.8*10^-10 N/m

Thanks,
Mark.
When I do this I get a force/m which is a few magnitudes smaller than what you get. I think my integration might be incorrect. If I understand correctly I want to integrate over a surface with the normal point radially outward from my sphere in 2D. A line integral will only integrate along the line. If I use a surface integral in 2D it doesn't seem to make sense to me. I've attached pictures of my attempt but I don't know how I can get Comsol to do what I want. When I do this I get a value of 2.8*10^-10 N/m Thanks, Mark.


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 Apr 8, 2013, 12:57 a.m. EDT
Hi

when you perform a 2D simulation, the default depth is 1 meter (for the 3rd dimension as COMSOL calculates always in 3D in the background), hence all surface integration need to be multiplied by the true depth to give absolute values, else they are expressed as "per meter" hence the N/m

for 2D-axi going from surface integration to volume integration requires to multiply by the "loop length" hence by 2*pi*r

--
Good luck
Ivar
Hi when you perform a 2D simulation, the default depth is 1 meter (for the 3rd dimension as COMSOL calculates always in 3D in the background), hence all surface integration need to be multiplied by the true depth to give absolute values, else they are expressed as "per meter" hence the N/m for 2D-axi going from surface integration to volume integration requires to multiply by the "loop length" hence by 2*pi*r -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 8, 2013, 9:25 p.m. EDT
Hi,

Thank you for your reply. I remember reading that Comsol does simulations using a depth of 1m. But for my simulation would it not just assume a circle was projected into a cylinder rather than a sphere? Is this the difference between 2D and 2D axisymmetric?

Either way I cannot reproduce the value obtained by Sergei. I'm concerned with my choice of integration boundaries and if it is possible to do a line integration where the line element is a vector pointing 90 degrees to it's direction as opposed to along the line?

Thank you for your time,
Mark.
Hi, Thank you for your reply. I remember reading that Comsol does simulations using a depth of 1m. But for my simulation would it not just assume a circle was projected into a cylinder rather than a sphere? Is this the difference between 2D and 2D axisymmetric? Either way I cannot reproduce the value obtained by Sergei. I'm concerned with my choice of integration boundaries and if it is possible to do a line integration where the line element is a vector pointing 90 degrees to it's direction as opposed to along the line? Thank you for your time, Mark.

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 Apr 9, 2013, 7:57 a.m. EDT
Hi

"D is default infinite depthh or per meter depth (no gradient (in most cases) along the in paper direction.

2D-.Axi is vertical cylindrical section view, the depth length is the "loop" length of a cyindrical projecteion hence "2*pi*r" term to go from section view to volume

This is quite different for many aspects

--
Good luck
Ivar
Hi "D is default infinite depthh or per meter depth (no gradient (in most cases) along the in paper direction. 2D-.Axi is vertical cylindrical section view, the depth length is the "loop" length of a cyindrical projecteion hence "2*pi*r" term to go from section view to volume This is quite different for many aspects -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 10, 2013, 2:38 a.m. EDT
Thanks Ivar,

One more question about Comsol. Is there a way to get the time averaged Maxwell Stress Tensor? Looking at the help file it seems to say that it just gives the instantaneous values.

I'm not sure how to make Comsol include the time evolution of the input wave. Is there a tutorial based on this? I've been looking through the RF module examples I can't seem to find any relevant examples.

Thank you,
Mark.
Thanks Ivar, One more question about Comsol. Is there a way to get the time averaged Maxwell Stress Tensor? Looking at the help file it seems to say that it just gives the instantaneous values. I'm not sure how to make Comsol include the time evolution of the input wave. Is there a tutorial based on this? I've been looking through the RF module examples I can't seem to find any relevant examples. Thank you, Mark.

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 Apr 10, 2013, 12:21 p.m. EDT
Hi

if you do a parametric study you will get results per parameter value, if you dump some analysis (derived Variables) into a table, you can perform several operations, column wise over these data including integration.

Now if you are doing time stepping, which is close to a parametrical weep but over time, and you have also equations governing the time response, but still you can get derived values out in a table, one row per time step stored, and again you can do operation columnwise on these.

But for time series you have also additional time interation operators (see help / doc) that will integrate over time.

Finally, you can add your own PDE or ODEs and for example define a new dependent variable that is the integration over time of yome other variable, then you have direct access to this integrated value, as your solver is advancing in time

Many ways to Rome as one say ...

--
Good luck
Ivar
Hi if you do a parametric study you will get results per parameter value, if you dump some analysis (derived Variables) into a table, you can perform several operations, column wise over these data including integration. Now if you are doing time stepping, which is close to a parametrical weep but over time, and you have also equations governing the time response, but still you can get derived values out in a table, one row per time step stored, and again you can do operation columnwise on these. But for time series you have also additional time interation operators (see help / doc) that will integrate over time. Finally, you can add your own PDE or ODEs and for example define a new dependent variable that is the integration over time of yome other variable, then you have direct access to this integrated value, as your solver is advancing in time Many ways to Rome as one say ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 10, 2013, 10:34 p.m. EDT
Hi Ivar,

Thanks for your email. I'll try to use a parametric sweep to do this soon. The server in my university is down so I can't use Comsol right now :(

I found out what the problem was with my integral giving me imaginary values which may be useful to Juan. I didn't have the 4.3 update 1 installed. This fixes an issue with the Maxwell stress tensor. once it was installed I got reasonable answers.

Thanks all,
Mark.
Hi Ivar, Thanks for your email. I'll try to use a parametric sweep to do this soon. The server in my university is down so I can't use Comsol right now :( I found out what the problem was with my integral giving me imaginary values which may be useful to Juan. I didn't have the 4.3 update 1 installed. This fixes an issue with the Maxwell stress tensor. once it was installed I got reasonable answers. Thanks all, Mark.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 11, 2013, 4:16 a.m. EDT
Thanks Mark!!

You're right, after updating it gives me a real value! I was a bit worry about that,xd, I was defining by myself a variable Tx,y in order to give the tensor...Now I have my expression and the predefined tensor, and when I integrate them both gives me quite similar values.

Thank you again, if in any moment I can help you, you just have to write.
Thanks Mark!! You're right, after updating it gives me a real value! I was a bit worry about that,xd, I was defining by myself a variable Tx,y in order to give the tensor...Now I have my expression and the predefined tensor, and when I integrate them both gives me quite similar values. Thank you again, if in any moment I can help you, you just have to write.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 14, 2013, 10:24 a.m. EDT
Dear Mr. sergie


Thanks allot for you for all these informations.


Best regards

Hassanain
Dear Mr. sergie Thanks allot for you for all these informations. Best regards Hassanain

Minu Prabhachandran Nair

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 29, 2014, 11:12 p.m. EDT
Hi,

I am also working on a similar 3D model to calculate the trapping force on a spherical particle in photonic crystals.Iam using maxwells stress tensor to calculate the force.But it gives me complex values for the force.

I tried inputting the long equations containing magnetic and electric fields and then integrated after multiplying with normal vector.

These are the equations which i used for similar 2 d model which gave complex values.
(((ewfd.Dy*conj(ewfd.Ey))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*ny)+((ewfd.Dy*conj(ewfd.Ex))*nx)

(((ewfd.Dx*conj(ewfd.Ex))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*nx)+((ewfd.Dy*conj(ewfd.Ex))*ny)

I tried using similar equations for 3D model also. But all the three force components were complex.How can I fix this problem?
Can it be solved if I use the downward and upward stress tensor (ewfd.dnTx) for integration?will it work for 3D also?

Looking forward for a reply

Thanks& regards
minu
Hi, I am also working on a similar 3D model to calculate the trapping force on a spherical particle in photonic crystals.Iam using maxwells stress tensor to calculate the force.But it gives me complex values for the force. I tried inputting the long equations containing magnetic and electric fields and then integrated after multiplying with normal vector. These are the equations which i used for similar 2 d model which gave complex values. (((ewfd.Dy*conj(ewfd.Ey))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*ny)+((ewfd.Dy*conj(ewfd.Ex))*nx) (((ewfd.Dx*conj(ewfd.Ex))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*nx)+((ewfd.Dy*conj(ewfd.Ex))*ny) I tried using similar equations for 3D model also. But all the three force components were complex.How can I fix this problem? Can it be solved if I use the downward and upward stress tensor (ewfd.dnTx) for integration?will it work for 3D also? Looking forward for a reply Thanks& regards minu

Minu Prabhachandran Nair

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 29, 2014, 11:12 p.m. EDT
Hi,

I am also working on a similar 3D model to calculate the trapping force on a spherical particle in photonic crystals.Iam using maxwells stress tensor to calculate the force.But it gives me complex values for the force.

I tried inputting the long equations containing magnetic and electric fields and then integrated after multiplying with normal vector.

These are the equations which i used for similar 2 d model which gave complex values.
(((ewfd.Dy*conj(ewfd.Ey))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*ny)+((ewfd.Dy*conj(ewfd.Ex))*nx)

(((ewfd.Dx*conj(ewfd.Ex))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*nx)+((ewfd.Dy*conj(ewfd.Ex))*ny)

I tried using similar equations for 3D model also. But all the three force components were complex.How can I fix this problem?
Can it be solved if I use the downward and upward stress tensor (ewfd.dnTx) for integration?will it work for 3D also?

Looking forward for a reply

Thanks& regards
minu
Hi, I am also working on a similar 3D model to calculate the trapping force on a spherical particle in photonic crystals.Iam using maxwells stress tensor to calculate the force.But it gives me complex values for the force. I tried inputting the long equations containing magnetic and electric fields and then integrated after multiplying with normal vector. These are the equations which i used for similar 2 d model which gave complex values. (((ewfd.Dy*conj(ewfd.Ey))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*ny)+((ewfd.Dy*conj(ewfd.Ex))*nx) (((ewfd.Dx*conj(ewfd.Ex))-0.5*(ewfd.Dx*conj(ewfd.Ex)+ewfd.Dy*conj(ewfd.Ey)+ewfd.Bz*conj(ewfd.Hz)))*nx)+((ewfd.Dy*conj(ewfd.Ex))*ny) I tried using similar equations for 3D model also. But all the three force components were complex.How can I fix this problem? Can it be solved if I use the downward and upward stress tensor (ewfd.dnTx) for integration?will it work for 3D also? Looking forward for a reply Thanks& regards minu

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Aug 6, 2014, 7:38 p.m. EDT


Yes, the difference between upward and downward stress tensor is related to the direction of the surface normal.

Regards,
Sergei


I am writing after more than a year in this thread, but I hope someone can help clarify this point. I guess the difference between downward and upward is more than just outwards and inwards with respect to the surface, as mf.unTm+mf.dnTm for instance is not necessarily zero. My understanding is that it could be that upward is the stress tensor "just above" a surface (boundary) and downward is the same "just below" the boundary. Is this correct?

Thank you!
[QUOTE] Yes, the difference between upward and downward stress tensor is related to the direction of the surface normal. Regards, Sergei [/QUOTE] I am writing after more than a year in this thread, but I hope someone can help clarify this point. I guess the difference between downward and upward is more than just outwards and inwards with respect to the surface, as mf.unTm+mf.dnTm for instance is not necessarily zero. My understanding is that it could be that upward is the stress tensor "just above" a surface (boundary) and downward is the same "just below" the boundary. Is this correct? Thank you!

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Nov 6, 2014, 8:43 a.m. EST

Hello all,

I'm new to Comsol and Im having a little difficulty getting my head around how the Maxwell Stress Tensor operates. I understand its operation when applied to parallel wires (Like in the example given in Comsol) but when I try to use it for my own model I don't understand it's behaviour.

I'm currently using Comsol to look at the scattering of electromagnetic waves from a dielectric sphere. I also want to look at the forces on the sphere.

All I've tried to do is to add a line integration, with the surface of the sphere chosen as the line, and then there is an option to get the upward and downward Maxwell Stress Tensor.

This gives me a complex result which doesn't make sense to me. Perhaps my understanding of the problem isn't complete? Is there a better way to work out the force on the particle?

Any help would be greatly appreciated!

Thanks,
Mark.



do you have a example about the optical force? if you have, could you give me one, i have some probelm about this case.

thanks
[QUOTE] Hello all, I'm new to Comsol and Im having a little difficulty getting my head around how the Maxwell Stress Tensor operates. I understand its operation when applied to parallel wires (Like in the example given in Comsol) but when I try to use it for my own model I don't understand it's behaviour. I'm currently using Comsol to look at the scattering of electromagnetic waves from a dielectric sphere. I also want to look at the forces on the sphere. All I've tried to do is to add a line integration, with the surface of the sphere chosen as the line, and then there is an option to get the upward and downward Maxwell Stress Tensor. This gives me a complex result which doesn't make sense to me. Perhaps my understanding of the problem isn't complete? Is there a better way to work out the force on the particle? Any help would be greatly appreciated! Thanks, Mark. [/QUOTE] do you have a example about the optical force? if you have, could you give me one, i have some probelm about this case. 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.