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"
Posted 25 mag 2011, 16:50 GMT-4 Modeling Tools & Definitions, Parameters, Variables, & Functions Version 5.2 13 Replies
Please login with a confirmed email address before reporting spam
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?
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
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
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.
Please login with a confirmed email address before reporting spam
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
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?
Please login with a confirmed email address before reporting spam
Cheers,
Alexis
Please login with a confirmed email address before reporting spam
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
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.
Please login with a confirmed email address before reporting spam
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...
Please login with a confirmed email address before reporting spam
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
Please login with a confirmed email address before reporting spam
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
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.
Suggested Content
- FORUM Failed to Evaluate Variable Jacobian Error
- KNOWLEDGE BASE Failed to Evaluate Variable Jacobian
- KNOWLEDGE BASE Failed to Evaluate Variable
- KNOWLEDGE BASE Error: Singular Matrix
- BLOG How to Simulate Control Systems Using the PID Controller Add-In