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
Posted 27.01.2023, 12:01 GMT-5 RF & Microwave Engineering, Wave Optics, Physics Interfaces 2 Replies
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