Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Field Dependent Conductivity

Please login with a confirmed email address before reporting spam

I am trying to define conductivity of silicon as a function of the electric field. I have defined a function to take in the electric field variable (emdc.Ex for 4.1 or Ex_emdc for 3.5a). When I define conductivity as f(T) , using temperature instead of electric field, my model will simulate, but when I call the electric field variable into this function, f(emdc.Ex) or f(Ex_emdc), depending on the version, I get a jacobian error.

Has anyone done this successfully?

Thanks,
Nick

11 Replies Last Post 2 mars 2011, 18:05 UTC−5
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 28 févr. 2011, 16:47 UTC−5
HI

no I havent done that exactly tht way, so I have no direct reply to propose.

But one thing the Jacobian failure is when COMSOL resolves the gradient or space dervatives of your variables. It T is a dependent variable or a constant than (Tx,Ty,Tz) are rather easily solved and the derivative of your function f(T) can be estimated.

But Ex,Ey,Ez, are aready gradients, hence already noisy, so estimating Exx,Eyy,Ezz can be even vorse such that f(Ex) might be difficult to derivate cleanly further more difficult to build a Jacobian

You might try a "nojac(f(Ex))" but I'm afraid, in your case this will send the solver far off, as such linking makes mostly the model non-linear, hence a good estimation of the varaible derivatives are even more important for the solver to converge.

Remains to see if you might add a function and its derivative expressed in a simpler way ie.e as a global equation / ODE

--
Good luck
Ivar
HI no I havent done that exactly tht way, so I have no direct reply to propose. But one thing the Jacobian failure is when COMSOL resolves the gradient or space dervatives of your variables. It T is a dependent variable or a constant than (Tx,Ty,Tz) are rather easily solved and the derivative of your function f(T) can be estimated. But Ex,Ey,Ez, are aready gradients, hence already noisy, so estimating Exx,Eyy,Ezz can be even vorse such that f(Ex) might be difficult to derivate cleanly further more difficult to build a Jacobian You might try a "nojac(f(Ex))" but I'm afraid, in your case this will send the solver far off, as such linking makes mostly the model non-linear, hence a good estimation of the varaible derivatives are even more important for the solver to converge. Remains to see if you might add a function and its derivative expressed in a simpler way ie.e as a global equation / ODE -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 mars 2011, 04:50 UTC−5
Hi,

is it possible to use the 'recover' option for variables in equations? Is there a 'recover'-operator like recover(Ex) or something like that to use the polynominal approximation to obtain rather smooth derivatives instead of the "normal", chain saw like derivatives? Then you might solve the jacobian issue, if this is caused by noisy derivatives. One remark: using 'recover' might work well in domains, but if it gets close to borders, "recovered" derivatives can have big errors.


Regards
Hi, is it possible to use the 'recover' option for variables in equations? Is there a 'recover'-operator like recover(Ex) or something like that to use the polynominal approximation to obtain rather smooth derivatives instead of the "normal", chain saw like derivatives? Then you might solve the jacobian issue, if this is caused by noisy derivatives. One remark: using 'recover' might work well in domains, but if it gets close to borders, "recovered" derivatives can have big errors. Regards

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 1 mars 2011, 04:56 UTC−5
Hi
and "recover" takes time, I'm not sure they are foreseen for use during a solver sequence

--
Good luck
Ivar
Hi and "recover" takes time, I'm not sure they are foreseen for use during a solver sequence -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 mars 2011, 07:30 UTC−5
Of course, but it's better to have a slow working model instead of a not working one. :)

At least every additional stuff, which should smooth the derivatives, will cause computational time.
Of course, but it's better to have a slow working model instead of a not working one. :) At least every additional stuff, which should smooth the derivatives, will cause computational time.

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 1 mars 2011, 08:26 UTC−5
Hi

Indeed, except if you can express the function in a more like an analytical way, all depends on the model and what one are doing ;)

--
Good luck
Ivar
Hi Indeed, except if you can express the function in a more like an analytical way, all depends on the model and what one are doing ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 mars 2011, 08:38 UTC−5
Hello!!

It depends on how your conductivity is varying with the electric field !! Non-linearity issue!!!

I have tried a time ago to make similar thing but with the permittivity using electrostatic module. I had an analytical function which correlates the epsilon value to the computed electric field within the domain : epsilon(E).

To get a correct calculation, I had to compute the solution first for a constant value of epsilon and then restart the computation by activating the function epsilon(E). Of course this constant value (point) has to be chosen following your physical expectations.

I hope it helps

Cheers
Hello!! It depends on how your conductivity is varying with the electric field !! Non-linearity issue!!! I have tried a time ago to make similar thing but with the permittivity using electrostatic module. I had an analytical function which correlates the epsilon value to the computed electric field within the domain : epsilon(E). To get a correct calculation, I had to compute the solution first for a constant value of epsilon and then restart the computation by activating the function epsilon(E). Of course this constant value (point) has to be chosen following your physical expectations. I hope it helps Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mars 2011, 13:32 UTC−5


But Ex,Ey,Ez, are aready gradients, hence already noisy, so estimating Exx,Eyy,Ezz can be even vorse such that f(Ex) might be difficult to derivate cleanly further more difficult to build a Jacobian



I found the expression ec.Ex from the menu within my 3d results, where it is described as the x component of the electric field, not the gradient along the x direction. I think that with electric field, the gradient in the x direction would be ec.Exx . Do you agree with this?
[QUOTE] But Ex,Ey,Ez, are aready gradients, hence already noisy, so estimating Exx,Eyy,Ezz can be even vorse such that f(Ex) might be difficult to derivate cleanly further more difficult to build a Jacobian [/QUOTE] I found the expression ec.Ex from the menu within my 3d results, where it is described as the x component of the electric field, not the gradient along the x direction. I think that with electric field, the gradient in the x direction would be ec.Exx . Do you agree with this?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mars 2011, 13:35 UTC−5


To get a correct calculation, I had to compute the solution first for a constant value of epsilon and then restart the computation by activating the function epsilon(E). Of course this constant value (point) has to be chosen following your physical expectations.



Did you use a stationary solver with your constant value of epsilon before you solved with your epsilon(E)?
[QUOTE] To get a correct calculation, I had to compute the solution first for a constant value of epsilon and then restart the computation by activating the function epsilon(E). Of course this constant value (point) has to be chosen following your physical expectations. [/QUOTE] Did you use a stationary solver with your constant value of epsilon before you solved with your epsilon(E)?

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 2 mars 2011, 15:17 UTC−5
Hi

you are perfectly right ec.Ex = -Vx the gradient of the voltage, that's the danger of using a convention and then violate it with exceptions at the first occasion :)
There are so many physics and each have its exceptions, COMSOL could have chosen a more systematic convention here and avoid exceptions, I hope thy weould be more systematic, it's already tough with all their implicit indexes and meanings ;).

i.e. "_x" for derivatives and "x" simple suffix for components hence we would have ec.Ex_x = -V_x_x

But once started with such things it's difficult to change later, V4 could have been used for that too. Hopefully thex will write out again the full list of variables as they had for 3.5a

Still my comment remains Ex i defined from a gradient hence is somewhat noisy whcih could (but not necesarily be enough) to give you solver or Jacobian derivative issues

--
Good luck
Ivar
Hi you are perfectly right ec.Ex = -Vx the gradient of the voltage, that's the danger of using a convention and then violate it with exceptions at the first occasion :) There are so many physics and each have its exceptions, COMSOL could have chosen a more systematic convention here and avoid exceptions, I hope thy weould be more systematic, it's already tough with all their implicit indexes and meanings ;). i.e. "_x" for derivatives and "x" simple suffix for components hence we would have ec.Ex_x = -V_x_x But once started with such things it's difficult to change later, V4 could have been used for that too. Hopefully thex will write out again the full list of variables as they had for 3.5a Still my comment remains Ex i defined from a gradient hence is somewhat noisy whcih could (but not necesarily be enough) to give you solver or Jacobian derivative issues -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mars 2011, 17:52 UTC−5
Ivar,

Run any ac/dc model and check out the results tab; click on Surface which is under 3D Plot Group.
(This is in 4.1 by the way)
Click the Replace Expression button, and find Electric Field under the Electric Currents tab.

The description for Ex is the x component of the electric field.
This is not a gradient; In this case Ex does not = -d(V)/dx

The first line of your response is a little puzzling to me because that is the opposite of what I asserted.

I have switched to using ec.normE , however when the conductivity gets too high and my model begins to melt COMSOL becomes stuck on one time step forever.

Regards,
Nick
Ivar, Run any ac/dc model and check out the results tab; click on Surface which is under 3D Plot Group. (This is in 4.1 by the way) Click the Replace Expression button, and find Electric Field under the Electric Currents tab. The description for Ex is the x component of the electric field. This is not a gradient; In this case Ex does not = -d(V)/dx The first line of your response is a little puzzling to me because that is the opposite of what I asserted. I have switched to using ec.normE , however when the conductivity gets too high and my model begins to melt COMSOL becomes stuck on one time step forever. Regards, Nick

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 2 mars 2011, 18:05 UTC−5
Hi

obviously it's getting late for me and I need to dig into the doc again, and we are slightly missing each other for the understanding I believe ;)

But, I even did a quick check before writing my previously response, looking at the equations under the EC/ES modules (see png) :(

and ec.normE = sqrt( realdot(Ex,Ex)^2 + realdot(Ey,Ey)^2 + realdot(Ez,Ez)^2 )

realdot() is there since Ex,y,z might be complex, as you square the variables for the norm you might get some bifurcation issues with the solver indeed


Note in the magnetic MF we have Ex = Axt or d(Ax)/dt or for MEF a combination of both EC and MF

The difference might come from the "curl" and "Lagrangian" shape elements used respectively for solving A and V as dependent variables

again note the notation:
Ax is the x component of vector A, while Vx is the x derivative of the scalar V
Axx is the x derivative of Ax the vector x component, while Vxx is the second derivative of scalar V

--
Good luck
Ivar
Hi obviously it's getting late for me and I need to dig into the doc again, and we are slightly missing each other for the understanding I believe ;) But, I even did a quick check before writing my previously response, looking at the equations under the EC/ES modules (see png) :( and ec.normE = sqrt( realdot(Ex,Ex)^2 + realdot(Ey,Ey)^2 + realdot(Ez,Ez)^2 ) realdot() is there since Ex,y,z might be complex, as you square the variables for the norm you might get some bifurcation issues with the solver indeed Note in the magnetic MF we have Ex = Axt or d(Ax)/dt or for MEF a combination of both EC and MF The difference might come from the "curl" and "Lagrangian" shape elements used respectively for solving A and V as dependent variables again note the notation: Ax is the x component of vector A, while Vx is the x derivative of the scalar V Axx is the x derivative of Ax the vector x component, while Vxx is the second derivative of scalar V -- Good luck Ivar

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.