How does COMSOL calculate (emw.nPoav)

Please login with a confirmed email address before reporting spam

I have an electric field passing through some line boundary that i constructed. I am interested in finding the power of my beam passing through this line, so I created and integration setting,intop, and pass in emw.nPoav, so intop(emw.nPoav) would give me the total power passing through this line segment.

I also for good measure made a python script that would take the electric field data, outputted from comsol as a csv, and find the power as well. I did this by the following logic.

I know that the power is simply the integral of the poynting vector. I can do this for each cell along my line segment by simply calculating the poynting vector with the following equation

I can do this for each cell and then simply doing the summation of S * dL, the length of each cell, i can get the total power passing through my line segment.

My issue is that there is a discrepancy roughly by a factor of 10 between my python script and COMSOL. I do not understand why this is happening.

I thought that perhaps since my COMSOL project is in 2D, i should disregard the Ez component in my python script but that did not fix this at all.

So i am wondering how exactly COMSOL is calculating the power passing through the boundary and if this matches what I am doing in my python script.

code



2 Replies Last Post 14 apr 2025, 13:48 GMT-4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 4 days ago 11 apr 2025, 15:27 GMT-4
Updated: 4 days ago 11 apr 2025, 15:28 GMT-4

I haven't executed your file because it tries to import a file which you did not provide. But here's a quick sanity check you can do: Your simple equation for S above is only going to be valid if: (1) there is no significant level of standing waves present, (2) you are propagating in free space (i.e., epsilon_r=1, mu_r=1, and your wave is propagating at speed c) , (3) there are no significant reactive fields present (i.e., you are confident that E/H ~ 377 Ohms), and (4) that the direction of the Poynting vector is (at least nearly) perpendicular to the line along which you are integrating it. Question to you: Are all those conditions satisfied in your model? If not, then instead you need to integrate the component of the Poynting Vector normal to the line (which is not the same thing as the norm of the Poynting Vector, nor is it the same as the equation you wrote above).

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I haven't executed your file because it tries to import a file which you did not provide. But here's a quick sanity check you can do: Your simple equation for *S* above is only going to be valid if: (1) there is no significant level of standing waves present, (2) you are propagating in free space (i.e., epsilon_r=1, mu_r=1, and your wave is propagating at speed *c*) , (3) there are no significant *reactive* fields present (i.e., you are confident that E/H ~ 377 Ohms), and (4) that the *direction* of the Poynting vector is (at least nearly) perpendicular to the line along which you are integrating it. Question to you: *Are all those conditions satisfied* in your model? If not, then instead you need to integrate the component of the Poynting Vector *normal* to the line (which is *not* the same thing as the *norm* of the Poynting Vector, nor is it the same as the equation you wrote above).

Please login with a confirmed email address before reporting spam

Posted: 15 hours ago 14 apr 2025, 13:48 GMT-4
Updated: 15 hours ago 14 apr 2025, 13:52 GMT-4

I have uploaded the csv file that contains my electron density profile at this link drive

I am not sure if there are standing waves present, but I know that at where I am calculating the power, it is in a vacuum. I also have set the parameters (launch angle and launch port distance) such that the beam should be collimated at the cutoff boundary and it satisfies the Bragg scattering condition so the back reflected beam that I am trying to measure the power of should be parallel with the incident beam and as such the Poynting vector should be perpendicular to the line i am integrating on.

Since the beam is being back scattered and also refracted the speed of propagation will be less than c.

I am not certain and if there are no reactive fields present. I have slight perturbations in my electron density in that the beam scatters from.

I have uploaded the csv file that contains my electron density profile at this link [drive](https://drive.google.com/file/d/1j20e86LElVtl9SQ-2MsJAcsVg87Dl-gT/view?usp=sharing) I am not sure if there are standing waves present, but I know that at where I am calculating the power, it is in a vacuum. I also have set the parameters (launch angle and launch port distance) such that the beam should be collimated at the cutoff boundary and it satisfies the Bragg scattering condition so the back reflected beam that I am trying to measure the power of should be parallel with the incident beam and as such the Poynting vector should be perpendicular to the line i am integrating on. Since the beam is being back scattered and also refracted the speed of propagation will be less than c. I am not certain and if there are no reactive fields present. I have slight perturbations in my electron density in that the beam scatters from.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.