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.

Volume integration - by steps

Please login with a confirmed email address before reporting spam

Hello, Here is an issue I am facing. I am solving a problem with a cylinder (center at 0,0,0 and thickness t along z-axis), which absorbs electromagnetic energy (solved in frequency domain). The total absorbed power is a volume integral of emw.Qh, which is ok. But what I first want to see is a surface density of absorbed power, that is, integral of emw.Qh along z axis. I can write it as:

integrate(comp1.at3(x,y,z,emw.Qh),z,0,t)

It works in results, (although it takes some time for integration). Let's call this density as rho. Next, what I want to do is to integrate this density along all 2pi angles (lying withing xy plane). Doing it in the same results part seems to be a nightmare (I think because it evaluates the first integral each time it needs to calculate the second), so what I did is I introduced a state variable, defined in the disk xy-face as

rho = integrate(comp1.at3(x,y,z,emw.Qh),z,0,t)

Then it does this integration once and keep it stored. Then, in results node, I can write:

integrate(comp1.at2(xcos(th),xsin(th),0,rho_ACS),th,0,2*pi)

Finally, I would like to integrate the previous part from 0 to an arbitrary radius r (up to the maximum radius of the disk). How can it be done? The previous expression cannot be entered as another state variable. Also I haven't figured how to write an expression in results node. Any help or reference to models using integration is more then welcome.

COMSOL v5.6


2 Replies Last Post 2023年3月29日 GMT-4 11:16
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 2023年1月27日 GMT-5 12:46
Updated: 1 year ago 2023年1月27日 GMT-5 12:48
  1. By surface, do you mean a true 2D surface or simply a thin-shell of a volume? If the latter, then you could always parse your volume into shells and integrate either power or energy densities separately in each shell (each would be its own domain) of interest to you, which should work fine, since you noted already that this worked for you with thicker volumes.
  2. In regard to RF power flow into (or across) a surface, have you already tried integrating (over that surface) the surface-normal component of the Poynting vector? Most Comsol RF computations generally offer various Poynting vector components to you, among the quantities available for post-processing.

I don't know if that helps, but I hope so. Good luck.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
1. By surface, do you mean a *true* 2D surface or simply a thin-shell of a volume? If the latter, then you could always parse your volume into shells and integrate either power or energy densities separately in each shell (each would be its own domain) of interest to you, which should work fine, since you noted already that this worked for you with thicker volumes. 2. In regard to RF power flow into (or across) a surface, have you already tried integrating (over that surface) the surface-normal component of the Poynting vector? Most Comsol RF computations generally offer various Poynting vector components to you, among the quantities available for post-processing. I don't know if that helps, but I hope so. Good luck.

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 2023年3月29日 GMT-4 11:16

Thank you, Robert, for the reply! As for your suggestions, it is a thin shell of a volume, not a true 2D surface. However, I don't qiote understand what you meant by 'parse your volume into shells' - could you please explain in more details, or just refer to any tutorial using this? As for part 2., and to simplify my question: imagine I have a thin sheet of material (lying in xy plane between z = 0 and z = t), with variably distributed charge, which density is rho(x,y,z). First I wanted to represent this sheet of final thickness as a 2D surface with surface charge density, which I can calculate as integrate(comp1.at3(x,y,z,rho),z,0,t) Let's call this surface density as sigma(x,y). The next thing I would like to have is to represent 2D distribution as 1D charge distribution by squezing one more coordinate. To simplify, assume I want to squeze along y axis within range from 0 to L, that is, calculate integrate(comp1.at2(x,y,sigma),y,0,L) (syntax is wrong, here is just to give an idea). How can this be done?

Thank you, Robert, for the reply! As for your suggestions, it is a thin shell of a volume, not a true 2D surface. However, I don't qiote understand what you meant by 'parse your volume into shells' - could you please explain in more details, or just refer to any tutorial using this? As for part 2., and to simplify my question: imagine I have a thin sheet of material (lying in xy plane between z = 0 and z = t), with variably distributed charge, which density is rho(x,y,z). First I wanted to represent this sheet of final thickness as a 2D surface with surface charge density, which I can calculate as integrate(comp1.at3(x,y,z,rho),z,0,t) Let's call this surface density as sigma(x,y). The next thing I would like to have is to represent 2D distribution as 1D charge distribution by squezing one more coordinate. To simplify, assume I want to squeze along y axis within range from 0 to L, that is, calculate integrate(comp1.at2(x,y,sigma),y,0,L) (syntax is wrong, here is just to give an idea). How can this be done?

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.