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.

Integral over a arbitrary path

Please login with a confirmed email address before reporting spam

I am new to COMSOL. I am interested to calculate the characteristic impedance of a co-planar waveguide in the RF module. I am referring the example "Finding the Impedance of a Coaxial Cable" for the same. In the example to calculate the current, the Magnetic field is evaluated around the external boundary.
I was actually interested to evaluate the integral along any arbitrary path apart from the boundary of the conductors which are Perfect Electrical Conductor.

The issues are facing the problem:
1. I am not able to define an arbitrary path without affecting the Meshing of the geometry which makes the evaluated value very much path dependent.
2. If I try to do a post processing without defining any path in the geometry, the "derived values" section of Results Tab is not allowing me to define any path except of the boundaries which were already present.

Can somebody suggest a best way find the characteristic impedance of the waveguide in RF module?

3 Replies Last Post 24 févr. 2017, 08:01 UTC−5
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29 juin 2015, 23:35 UTC−4
I suppose there may be a way for you to integrate along a path without defining the path as a geometric quantity that actually influences the meshing process, but why would you worry about that? If I were you, I would go ahead and define the curves/lines/paths of interest to me via the geometry tools in Comsol Multiphysics (polygons, bezier curves, parametric curves, etc.) and embed them in my model, then allow the code to mesh more-or-less freely along them, possibly enforcing a maximum mesh size (choosing the specific "edges" (paths) of interest when mesh-size setting) to make sure I get enough points along the integrated paths to minimize numerical error. If the mesh is fine enough, and the problem is well-posed, then mild variations in the meshing along the paths in question shouldn't change the answers to the integrals significantly. And in response to your comment about integrals being "path dependent," it should be remembered that some path integrals are, and rightfully so, path-dependent, in RF problems. So its up to you to choose the correct paths and the correct integrands for your problem. Now, for a 2-conductor transmission line in the fundamental TEM mode, if you integrate E along a path everywhere-on-the-path parallel to E, from one conductor to the other, you can get an equivalent circuit voltage-difference (V). And if you integrate the surface current density Js on one (either one) of those conductors along a path where everywhere-on-the-path is perpendicular to that current density Js, then you can get the equivalent circuit current (I). You can also extract surface current density from surface magnetic fields, but I digress.... Anyway, the equivalent circuit impedance Z=V/I, which is generally a complex quantity, if in frequency domain. If your paths don't obey the above criteria on the paths and vectors, then you had darn-well better include the correct scalar products (aka, dot products) in the integrands, or your answers for V, or I, or both, will be wrong. Now, that said, I believe there is a new feature in 5.x (not sure when they first included it?) that let's you simply specify the paths and then let Comsol compute the impedance for you, so you won't need to think about the scalar products and integrands as much. (Comsol keeps making it easier and easier to just pick these kinds of things from menus, so that you don't have to think through all the math and physics. I suspect that someday, this fancy PDE-solving tool is going to be used just fine, by moderately-bright middle-schoolers!) Hope that helps. Good luck,
I suppose there may be a way for you to integrate along a path without defining the path as a geometric quantity that actually influences the meshing process, but why would you worry about that? If I were you, I would go ahead and define the curves/lines/paths of interest to me via the geometry tools in Comsol Multiphysics (polygons, bezier curves, parametric curves, etc.) and embed them in my model, then allow the code to mesh more-or-less freely along them, possibly enforcing a maximum mesh size (choosing the specific "edges" (paths) of interest when mesh-size setting) to make sure I get enough points along the integrated paths to minimize numerical error. If the mesh is fine enough, and the problem is well-posed, then mild variations in the meshing along the paths in question shouldn't change the answers to the integrals significantly. And in response to your comment about integrals being "path dependent," it should be remembered that some path integrals are, and rightfully so, path-dependent, in RF problems. So its up to you to choose the correct paths and the correct integrands for your problem. Now, for a 2-conductor transmission line in the fundamental TEM mode, if you integrate E along a path everywhere-on-the-path parallel to E, from one conductor to the other, you can get an equivalent circuit voltage-difference (V). And if you integrate the surface current density Js on one (either one) of those conductors along a path where everywhere-on-the-path is perpendicular to that current density Js, then you can get the equivalent circuit current (I). You can also extract surface current density from surface magnetic fields, but I digress.... Anyway, the equivalent circuit impedance Z=V/I, which is generally a complex quantity, if in frequency domain. If your paths don't obey the above criteria on the paths and vectors, then you had darn-well better include the correct scalar products (aka, dot products) in the integrands, or your answers for V, or I, or both, will be wrong. Now, that said, I believe there is a new feature in 5.x (not sure when they first included it?) that let's you simply specify the paths and then let Comsol compute the impedance for you, so you won't need to think about the scalar products and integrands as much. (Comsol keeps making it easier and easier to just pick these kinds of things from menus, so that you don't have to think through all the math and physics. I suspect that someday, this fancy PDE-solving tool is going to be used just fine, by moderately-bright middle-schoolers!) Hope that helps. Good luck,

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 30 juin 2015, 08:27 UTC−4
Hello Ashish,
It is possible to used compute quantities such as integrals on arbitrary paths not defined by geometric entities, and therefore without impacting the meshing. To that end, you would need to define a dataset of the parameterized curve type and then perform the integration on that dataset.
If you need further help, and if your license is eligible for that service, please contact COMSOL's support team (support@comsol.com).
Best regards,
Jeff
Hello Ashish, It is possible to used compute quantities such as integrals on arbitrary paths not defined by geometric entities, and therefore without impacting the meshing. To that end, you would need to define a dataset of the parameterized curve type and then perform the integration on that dataset. If you need further help, and if your license is eligible for that service, please contact COMSOL's support team (support@comsol.com). Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 24 févr. 2017, 08:01 UTC−5
Hello Robert

I am facing exactly the same issue : I need to be able to calculate line integral of potential vector A along any parametric curve I would define AFTER the problem (and thus A field) is computed. And working the mesh is not a right answer. This is why :

If I define the curve in the geometry, the result is strongly dependent on the mesh, whatever the mesh quality. And problem solving comes after.

Being able to define an arbitratry parametric curve AFTER the problem is solved, and then compute for instance the line integral of potential vector A along it would avoid to resolve again and again the same problem from the begining every time you change your curve... So, you would be able to calculate (in my case) the flux of B through any surface once the problem is solved... (Stockes Theorem).

Is this clear ?

I though about defining a parametrized curve in the Dataset section. But then , computing the line integral of the vector along this curve is not easy : you do not have access to components t1x t1y t1z of the tangent vector along this curve (which is logical since it is not defined in the geometry). Maybe a solution is to define analyticaly this vector (by derivating dx/ds, dy/ds and dz/ds, s being the parameter). But in that case, how do we define the length dl of the integral increment ?

Thanks a lot for those who solved this issue to shed some light on it : i forwarded it to Comsol support in France.

Antoine
Hello Robert I am facing exactly the same issue : I need to be able to calculate line integral of potential vector A along any parametric curve I would define AFTER the problem (and thus A field) is computed. And working the mesh is not a right answer. This is why : If I define the curve in the geometry, the result is strongly dependent on the mesh, whatever the mesh quality. And problem solving comes after. Being able to define an arbitratry parametric curve AFTER the problem is solved, and then compute for instance the line integral of potential vector A along it would avoid to resolve again and again the same problem from the begining every time you change your curve... So, you would be able to calculate (in my case) the flux of B through any surface once the problem is solved... (Stockes Theorem). Is this clear ? I though about defining a parametrized curve in the Dataset section. But then , computing the line integral of the vector along this curve is not easy : you do not have access to components t1x t1y t1z of the tangent vector along this curve (which is logical since it is not defined in the geometry). Maybe a solution is to define analyticaly this vector (by derivating dx/ds, dy/ds and dz/ds, s being the parameter). But in that case, how do we define the length dl of the integral increment ? Thanks a lot for those who solved this issue to shed some light on it : i forwarded it to Comsol support in France. Antoine

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.