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.

Error "Attempt to evaluate negative power of zero"

Please login with a confirmed email address before reporting spam

The error is as follows:

Attempt to evaluate negative power of zero.
- Function: ^
Failed to evaluate expression.
- Expression: d(d((-(mod1.fct-(Tm-mod1.T)*switch(t/unit_s_cf)*mod1.fc^(2/3)/unit_K_cf)*test(mod1.fc))*(dvol),{test@2}),mod1.fc)

In the expression, the only place that contain the function ^ is fc^(2/3). In the model, the fc can be zero, but why the error is "Attempt to evaluate negative power of zero." ? The power is 2/3, why comsol treat it as negative?

13 Replies Last Post 2016年12月16日 GMT-5 11:39

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年6月21日 GMT-4 07:33
i meet the same error when dealing with a discontinuse function
i meet the same error when dealing with a discontinuse function

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月27日 GMT-4 00:21
I have the same problem.

I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power.

I don't find a way to solve this problem, if you succeed can you say me how you did please?




Alexis
I have the same problem. I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power. I don't find a way to solve this problem, if you succeed can you say me how you did please? Alexis

Michael Rembe Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月27日 GMT-4 02:48
May be there is an expression that becomes negative. Check your expressions!

In some cases there are expressions that should be zero. But because of numerical effects they get a very small negative value. That may cause this error. In this cases you can add 'eps', a very small number, to your expression. May be, it helps.

Michael
May be there is an expression that becomes negative. Check your expressions! In some cases there are expressions that should be zero. But because of numerical effects they get a very small negative value. That may cause this error. In this cases you can add 'eps', a very small number, to your expression. May be, it helps. Michael

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月27日 GMT-4 07:02
Hi,
I always had this error, when the initial values (start field) where too far off from the solution. It had nothing to do with the expression being zero, as I had added a small value to stop it from becoming zero. I managed to avoid this error by first solving a simpler problem (without the power 2/3 maybe?) and then using the solution as the start field.
Hope this helps,
Nina
Hi, I always had this error, when the initial values (start field) where too far off from the solution. It had nothing to do with the expression being zero, as I had added a small value to stop it from becoming zero. I managed to avoid this error by first solving a simpler problem (without the power 2/3 maybe?) and then using the solution as the start field. Hope this helps, Nina

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月27日 GMT-4 08:35

I have the same problem.

I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power.

I don't find a way to solve this problem, if you succeed can you say me how you did please?




Alexis


Your are right. In my model, the initial value of fc is zero, so I just plus an very small number eps, and it worked.
[QUOTE] I have the same problem. I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power. I don't find a way to solve this problem, if you succeed can you say me how you did please? Alexis [/QUOTE] Your are right. In my model, the initial value of fc is zero, so I just plus an very small number eps, and it worked.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月27日 GMT-4 22:03
I want to create a plastic law : k*(solid.epe^n) where k,n are constants and solid.epe is the plastic strain.

I have tried with k*((solid.epe+eps)^n), the model computes but when I want to analyse the stress I have the same error message!

Have you any idea?


Alexis
I want to create a plastic law : k*(solid.epe^n) where k,n are constants and solid.epe is the plastic strain. I have tried with k*((solid.epe+eps)^n), the model computes but when I want to analyse the stress I have the same error message! Have you any idea? Alexis

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年7月28日 GMT-4 09:12

I want to create a plastic law : k*(solid.epe^n) where k,n are constants and solid.epe is the plastic strain.

I have tried with k*((solid.epe+eps)^n), the model computes but when I want to analyse the stress I have the same error message!

Have you any idea?


Alexis


I don't know much about your model. You said your model can run, but during the postprocessing, the error occurred. What's the expression of the stress?
[QUOTE] I want to create a plastic law : k*(solid.epe^n) where k,n are constants and solid.epe is the plastic strain. I have tried with k*((solid.epe+eps)^n), the model computes but when I want to analyse the stress I have the same error message! Have you any idea? Alexis [/QUOTE] I don't know much about your model. You said your model can run, but during the postprocessing, the error occurred. What's the expression of the stress?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年8月9日 GMT-4 20:37
Thanks for your answer, I have succeed to create my plastic law by studying the COMSOL model: elastoplastic_plate.

Cheers,

Alexis
Thanks for your answer, I have succeed to create my plastic law by studying the COMSOL model: elastoplastic_plate. Cheers, Alexis

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月18日 GMT-4 03:24
Hello everyone,

I had the same problem, you can see my problem:

Failed to find consistent initial values.
Attempt to evaluate negative power of zero.
Function: ^
Failed to evaluate expression.
Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k)
Last time step is not converged.

The initial of mu is not zero, it is the density of the material Air, and PE.
I don't find a way to solve this problem, if you succeed can you say me how you did please?


Hello everyone, I had the same problem, you can see my problem: Failed to find consistent initial values. Attempt to evaluate negative power of zero. Function: ^ Failed to evaluate expression. Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k) Last time step is not converged. The initial of mu is not zero, it is the density of the material Air, and PE. I don't find a way to solve this problem, if you succeed can you say me how you did please?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月18日 GMT-4 11:13

Hello everyone,

I had the same problem, you can see my problem:

Failed to find consistent initial values.
Attempt to evaluate negative power of zero.
Function: ^
Failed to evaluate expression.
Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k)
Last time step is not converged.

The initial of mu is not zero, it is the density of the material Air, and PE.
I don't find a way to solve this problem, if you succeed can you say me how you did please?


There is only one ^ in your expression, try "mu+eps" to see whether it works or not.
[QUOTE] Hello everyone, I had the same problem, you can see my problem: Failed to find consistent initial values. Attempt to evaluate negative power of zero. Function: ^ Failed to evaluate expression. Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k) Last time step is not converged. The initial of mu is not zero, it is the density of the material Air, and PE. I don't find a way to solve this problem, if you succeed can you say me how you did please? [/QUOTE] There is only one ^ in your expression, try "mu+eps" to see whether it works or not.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年7月19日 GMT-4 16:27


Hello everyone,

I had the same problem, you can see my problem:

Failed to find consistent initial values.
Attempt to evaluate negative power of zero.
Function: ^
Failed to evaluate expression.
Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k)
Last time step is not converged.

The initial of mu is not zero, it is the density of the material Air, and PE.
I don't find a way to solve this problem, if you succeed can you say me how you did please?


There is only one ^ in your expression, try "mu+eps" to see whether it works or not.




Hi,

Have you guys solved this typical problem? I am always caught this problem...
[QUOTE] [QUOTE] Hello everyone, I had the same problem, you can see my problem: Failed to find consistent initial values. Attempt to evaluate negative power of zero. Function: ^ Failed to evaluate expression. Expression: d(d((up(mod1.nitf.rho)*up(mod1.nitf.Cp)*mod1.nitf.C mu^0.25*sqrt(max(mod1.k,0))*if(down(try catch(mod1.nitf.mu,-1))!=-1,(up(mod1.T)-down(mod1.T))*down(test(mod1.T)),(down(mod1.T)-up(mod1.T))*up(test(mod1.T)))/mod1.nitf.Tplus)*(dvol),{if@21}),mod1.k) Last time step is not converged. The initial of mu is not zero, it is the density of the material Air, and PE. I don't find a way to solve this problem, if you succeed can you say me how you did please? [/QUOTE] There is only one ^ in your expression, try "mu+eps" to see whether it works or not. [/QUOTE] Hi, Have you guys solved this typical problem? I am always caught this problem...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年7月19日 GMT-4 16:29

Thanks for your answer, I have succeed to create my plastic law by studying the COMSOL model: elastoplastic_plate.

Cheers,

Alexis


Hi Alex,

Thanks a lot for your mentioning this model for the self define plastic model, but have you tried self define flow rule in your own plastic law in comsol?

Thanks.
Chaney

[QUOTE] Thanks for your answer, I have succeed to create my plastic law by studying the COMSOL model: elastoplastic_plate. Cheers, Alexis [/QUOTE] Hi Alex, Thanks a lot for your mentioning this model for the self define plastic model, but have you tried self define flow rule in your own plastic law in comsol? Thanks. Chaney

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年12月16日 GMT-5 11:39


I have the same problem.

I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power.

I don't find a way to solve this problem, if you succeed can you say me how you did please?




Alexis


Your are right. In my model, the initial value of fc is zero, so I just plus an very small number eps, and it worked.


Xiaoyi Yu,

I'm having the same problem to model an adsorption column using Freundlich isotherm. My initial value of u1 is zero. Could you give me some help?

Attempt to evaluate negative power of zero.
- Function: ^
Failed to evaluate expression.
- Expression: dvol*(-(-(((c0*(n*((comp1.u1*c0)^(n-1))))*KF)*(1/q0))))
Failed to evaluate Jacobian of expression.
- Expression: dvol*(-(((comp1.u2*S)+comp1.u2t)-((((comp1.u1*c0)^n)*KF)/q0)))
Failed to evaluate Jacobian of expression.
- Expression: (-(comp1.u2t+S*comp1.u2-KF*(c0*comp1.u1)^n/q0)*test(comp1.u2))*(dvol)
- Feature: Time-Dependent Solver 1 (sol1/t1)

Regards,

João
[QUOTE] [QUOTE] I have the same problem. I think COMSOL wants to derive this equation. If you derive x^(2/3) the results is (2/3)x^(-1/3) so there is a negative power. I don't find a way to solve this problem, if you succeed can you say me how you did please? Alexis [/QUOTE] Your are right. In my model, the initial value of fc is zero, so I just plus an very small number eps, and it worked. [/QUOTE] Xiaoyi Yu, I'm having the same problem to model an adsorption column using Freundlich isotherm. My initial value of u1 is zero. Could you give me some help? Attempt to evaluate negative power of zero. - Function: ^ Failed to evaluate expression. - Expression: dvol*(-(-(((c0*(n*((comp1.u1*c0)^(n-1))))*KF)*(1/q0)))) Failed to evaluate Jacobian of expression. - Expression: dvol*(-(((comp1.u2*S)+comp1.u2t)-((((comp1.u1*c0)^n)*KF)/q0))) Failed to evaluate Jacobian of expression. - Expression: (-(comp1.u2t+S*comp1.u2-KF*(c0*comp1.u1)^n/q0)*test(comp1.u2))*(dvol) - Feature: Time-Dependent Solver 1 (sol1/t1) Regards, João

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.