Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam

Posted:
2 decades ago
2009年8月11日 GMT-4 15:45

Hi

I havn't used the RF much, so I have some difficulty to get the full image of your demand, but I assume, by analogy, that you can use (at least be inspired by) the way of defining a parabolic fluid flow on an input boundary, you should have a "s" partameter going along each edge normalised from 0 to 1 ( this is for 2D in 3D it's slitly more complex as you have two veariables for a surface boundary), so then you apply n=n0*4*s*(1-s) take a look at page 170 of the user guide.

This defines the variable only on the boundary, to get it over the volume you need to be more inventive, think formulas and parameter when using COMSOL, the "switch" from traditional FEM tools approaches took me some time.

Good luck

Ivar

Hi
I havn't used the RF much, so I have some difficulty to get the full image of your demand, but I assume, by analogy, that you can use (at least be inspired by) the way of defining a parabolic fluid flow on an input boundary, you should have a "s" partameter going along each edge normalised from 0 to 1 ( this is for 2D in 3D it's slitly more complex as you have two veariables for a surface boundary), so then you apply n=n0*4*s*(1-s) take a look at page 170 of the user guide.
This defines the variable only on the boundary, to get it over the volume you need to be more inventive, think formulas and parameter when using COMSOL, the "switch" from traditional FEM tools approaches took me some time.
Good luck
Ivar

Please login with a confirmed email address before reporting spam

Posted:
1 decade ago
2009年8月12日 GMT-4 11:14

Thanks Ivar,

I tried this out using no=1.48 for the equation n=n0*4*s*(1-s) like you suggested but in the RF module I get the error when I solve stating "Error 6250 Failed to evaluate variable Jacobian." I think this is because Comsol is not recognizing the s variable since it comes up in red when I enter it into the refractive index box in the subdomain. Is there a way to do this using the x and y spatial coordinates instead?

Thanks Ivar,
I tried this out using no=1.48 for the equation n=n0*4*s*(1-s) like you suggested but in the RF module I get the error when I solve stating "Error 6250 Failed to evaluate variable Jacobian." I think this is because Comsol is not recognizing the s variable since it comes up in red when I enter it into the refractive index box in the subdomain. Is there a way to do this using the x and y spatial coordinates instead?

Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam

Posted:
1 decade ago
2009年8月12日 GMT-4 19:34

Hi

Well s is defined in there, but its the boundary (edge) length integrand. You can check that it's there if you choose a 2D geometry (for any physics or RF application mode), draw a circle of radius 1 (circonference 2*pi*1) you Solve Initialise Values, just to get the mesh and the variables updated in there, then you select postprocessing boundary integration and integrate the value "1" over the circle, you will see 6.26 m as the result it's the edge length, if you replace "1" by "s" you will get 3.14 the half because "s" varies from 0 to 1 over each edge segment (in 2D its aligned along the arrows, different in 3D), so when you integrate it you get the average between 0-1 that is 0.5 of the integral.

Now if you are working from the RF doc example of optical fibre step index case, and want a parabolic distribution, then you have to define a global expression or variable r=sqrt(x^2+y^2) and have your index being noramlised by symething like N1-(N2-N1)*(r/R0)^2, where N1 is the index at the centre, N2 at the edge of radius R0.

If you do not define this within its own subdomain, you should add a conditional test such as

(N1-(N2-N1)*r/R0)*(r<R0)+N3*(r>=R0) (if the index should be N3 outside of R0, check your variables to not add another step index there).

if you do not use r anywhrere else, and in fact you need only r^2 you can drop the "sqrt" and adapt the formulas, you gain some computation time, even if that is often not so useful today

So far so good, but I havn't tried anything out in the RF mode on optics, so what I'm saying here is only by "similarity" to the other physics. And I'm not sure I have got a full understanding of which 2D view you are using, in any case

Good luck

Ivar

Hi
Well s is defined in there, but its the boundary (edge) length integrand. You can check that it's there if you choose a 2D geometry (for any physics or RF application mode), draw a circle of radius 1 (circonference 2*pi*1) you Solve Initialise Values, just to get the mesh and the variables updated in there, then you select postprocessing boundary integration and integrate the value "1" over the circle, you will see 6.26 m as the result it's the edge length, if you replace "1" by "s" you will get 3.14 the half because "s" varies from 0 to 1 over each edge segment (in 2D its aligned along the arrows, different in 3D), so when you integrate it you get the average between 0-1 that is 0.5 of the integral.
Now if you are working from the RF doc example of optical fibre step index case, and want a parabolic distribution, then you have to define a global expression or variable r=sqrt(x^2+y^2) and have your index being noramlised by symething like N1-(N2-N1)*(r/R0)^2, where N1 is the index at the centre, N2 at the edge of radius R0.
If you do not define this within its own subdomain, you should add a conditional test such as
(N1-(N2-N1)*r/R0)*(r=R0) (if the index should be N3 outside of R0, check your variables to not add another step index there).
if you do not use r anywhrere else, and in fact you need only r^2 you can drop the "sqrt" and adapt the formulas, you gain some computation time, even if that is often not so useful today
So far so good, but I havn't tried anything out in the RF mode on optics, so what I'm saying here is only by "similarity" to the other physics. And I'm not sure I have got a full understanding of which 2D view you are using, in any case
Good luck
Ivar

Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam

Posted:
1 decade ago
2009年8月13日 GMT-4 09:06

Hi

there is a typo in therein my first reply,

I beleive, the formula for an parabolic distribution with s is

n*6*s*(1-s)

(and not 4) as the integral from 0 to 1 of s*(1-s) = 1/6

Sorry for that

Ivar

Hi
there is a typo in therein my first reply,
I beleive, the formula for an parabolic distribution with s is
n*6*s*(1-s)
(and not 4) as the integral from 0 to 1 of s*(1-s) = 1/6
Sorry for that
Ivar