Sergei Yushanov
Certified Consultant
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jun 9, 2014, 9:33 a.m. EDT
Maxim,
Try the following:
1. Define variables for azimuthal and polar angles
theta=acos(z/sqrt(x^2+y^2+z^2))
phi=atan2(y,x)
2. Define integration coupling operator intop1() over the surface where far-field is calculated
3. Calculate surface integral over the specified range of polar phi=[phi1,phi2] and azimuthal angles theta=[thet1,thet2] using Boolean algebra
surf_integral=intop1(emw.normEfar^2)*(phi>=phi1)*(phi<=phi2)*(theta>=thet1)*(theta<=thet2)
Regards,
Sergei
Maxim,
Try the following:
1. Define variables for azimuthal and polar angles
theta=acos(z/sqrt(x^2+y^2+z^2))
phi=atan2(y,x)
2. Define integration coupling operator intop1() over the surface where far-field is calculated
3. Calculate surface integral over the specified range of polar phi=[phi1,phi2] and azimuthal angles theta=[thet1,thet2] using Boolean algebra
surf_integral=intop1(emw.normEfar^2)*(phi>=phi1)*(phi=thet1)*(theta
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jun 10, 2014, 9:14 a.m. EDT
Dear Sergei,
Thank you very much for the response. I have followed your recommendations, and I have got the following error on the third step, calculating intop1-oiperator as a global expression:
Problem encountered during results while solving.
Failed to evaluate variable.
- Variable: z
- Global scope
Failed to evaluate variable.
- Variable: comp1.theta
- Defined as: (acos((z/sqrt((((x^2)+(y^2))+(z^2)))))*unit rad cf)
Failed to evaluate expression.
- Expression: real(((comp1.theta<=(0.3888888888888889*pi))*((comp1.theta>=0)*((comp1.phi<=pi)*((comp1.phi>=(-pi))*comp1.intop1((comp1.emw.normEfar^2)))))))
Failed to evaluate expression.
- Expression: real(comp1.intop1(comp1.emw.normEfar^2)*(comp1.phi>=-pi)*(comp1.phi<=pi)*(comp1.theta>=0)*(comp1.theta<=0.3888888888888889*pi))
From other side, I managed to integrate the expression (emw.normEfar^2)*(phi>=-pi)*(phi<=pi)*(theta>=0)*(theta<=pi/180*70) under Results->Derived Values->Surface Integration. However when I try to integrate the same expression as a Boundary probe, the calculation never stops, and I have to kill Comsol from task manager.
Additionally, the integration of the Far Field is extremely slow: about 20 min, while the FEM calculation itself takes 5 min. The integration of the Far Field uses only one processor core.
Do you maybe know how to make a parametric sweep with the far field integration in one run? And is it possible to accelerate the Far Field integration, say by reducing the accuracy of the integration, or by forcing Comsol to use all processor cores for integration?
Thanks for the help!
Best regards,
Maxim
Dear Sergei,
Thank you very much for the response. I have followed your recommendations, and I have got the following error on the third step, calculating intop1-oiperator as a global expression:
[quote]
Problem encountered during results while solving.
Failed to evaluate variable.
- Variable: z
- Global scope
Failed to evaluate variable.
- Variable: comp1.theta
- Defined as: (acos((z/sqrt((((x^2)+(y^2))+(z^2)))))*unit rad cf)
Failed to evaluate expression.
- Expression: real(((comp1.theta=0)*((comp1.phi=(-pi))*comp1.intop1((comp1.emw.normEfar^2)))))))
Failed to evaluate expression.
- Expression: real(comp1.intop1(comp1.emw.normEfar^2)*(comp1.phi>=-pi)*(comp1.phi=0)*(comp1.theta=-pi)*(phi=0)*(thetaDerived Values->Surface Integration. However when I try to integrate the same expression as a Boundary probe, the calculation never stops, and I have to kill Comsol from task manager.
Additionally, the integration of the Far Field is extremely slow: about 20 min, while the FEM calculation itself takes 5 min. The integration of the Far Field uses only one processor core.
Do you maybe know how to make a parametric sweep with the far field integration in one run? And is it possible to accelerate the Far Field integration, say by reducing the accuracy of the integration, or by forcing Comsol to use all processor cores for integration?
Thanks for the help!
Best regards,
Maxim
Sergei Yushanov
Certified Consultant
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jun 10, 2014, 4:38 p.m. EDT
Maxim,
It is hard to tell were the error is coming from without seeing the model. I used spherical angles quite often and never saw this error.
Far-field is calculated from the near-field on a boundary using Stratton-Chu formula, which is computationally quite extensive – so it is not surprising that far-field evaluation might take longer time than solving problem itself. You might try to partition far-field surface and reduce integration over the smaller boundary instead of integration over the full solid angle 4*pi.
You can increase the number of processors used by changing default setup under
File/Preferences/Multicore and Cluster Computing/Number of processors
Regards,
Sergei
Maxim,
It is hard to tell were the error is coming from without seeing the model. I used spherical angles quite often and never saw this error.
Far-field is calculated from the near-field on a boundary using Stratton-Chu formula, which is computationally quite extensive – so it is not surprising that far-field evaluation might take longer time than solving problem itself. You might try to partition far-field surface and reduce integration over the smaller boundary instead of integration over the full solid angle 4*pi.
You can increase the number of processors used by changing default setup under
File/Preferences/Multicore and Cluster Computing/Number of processors
Regards,
Sergei
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Oct 31, 2014, 7:15 a.m. EDT
Hi Maxim,
Have you found a solution how to integrate Efar over the specified boundary in include light collection lens effect?. I am trying to calculate Efar in 2D for 0.65 NA lens?. I defined phi=asin(y/sqrt(x^2+y^2)) and doing line integration in post processing in results section. I defined line integral as Sergai said expect for 2D. I am but always getting 0 for integration.
I assumed angle calculation starts from first quadrant of the geometry, and given between pi+(pi/2-half angle of lens) to pi+(pi/2+half angle of lens) for back side collection as attached. Can I know my angle definition is correct for attached geometry?
Thanks
Mahendar
Hi Maxim,
Have you found a solution how to integrate Efar over the specified boundary in include light collection lens effect?. I am trying to calculate Efar in 2D for 0.65 NA lens?. I defined phi=asin(y/sqrt(x^2+y^2)) and doing line integration in post processing in results section. I defined line integral as Sergai said expect for 2D. I am but always getting 0 for integration.
I assumed angle calculation starts from first quadrant of the geometry, and given between pi+(pi/2-half angle of lens) to pi+(pi/2+half angle of lens) for back side collection as attached. Can I know my angle definition is correct for attached geometry?
Thanks
Mahendar
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
Sep 30, 2016, 10:23 a.m. EDT
(just in case someone bumps into this old thread as I did)
The solution suggested by Sergei works for me (v4.4) only if the Boolean expression are put *inside* the integral operator. So the formula he suggested should be modified into:
surf_integral=intop1(emw.normEfar^2*(phi>=phi1)*(phi<=phi2)*(theta>=thet1)*(theta<=thet2))
That's why (this pointed me to the right direction), as Maxime noted, the expression works anyway in Results->Derived Values->Surface Integration, where you only define the integration operator argument.
Best,
Attilio
(just in case someone bumps into this old thread as I did)
The solution suggested by Sergei works for me (v4.4) only if the Boolean expression are put *inside* the integral operator. So the formula he suggested should be modified into:
surf_integral=intop1(emw.normEfar^2*(phi>=phi1)*(phi=thet1)*(theta