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



1 Reply Last Post Apr 11, 2025, 3:27 p.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 days ago Apr 11, 2025, 3:27 p.m. EDT
Updated: 2 days ago Apr 11, 2025, 3:28 p.m. EDT

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).

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.