Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Error in user-defined function

$
0
0
Hi everybody,
I would like to use the PDE mode to solve a coupled problem of heat transfer and fluid flow in a porous media under freezing. I have three dependent variables : temperature, liquid pressure and the displacement. For the nonlinear study, i would like to introduce a function Sc(T) who describes the dependance of the fraction of pore volume occupied by ice crystal (that i note Sc) on the temperature T. Thus, I defined an analytical function and i called it in the coefficient of PDE, then the following error message appears:

Nonlinear solver did not converge.
Time : 0
Error in user-defined function.
Function: mod1.Sc
Failed to evaluate expression.
Expression: d((-(-2*(K+4*G/3)*mod1.u-b*x^2*mod1.pLx*unit Pa cf/unit m cf-(alpha*K-b*mod1.Sc(mod1.T)*sigmaf)*x^2*mod1.T)*test(mod1.u)+(K+4*G/3)*x^2*mod1.ux*test(mod1.ux))*(dvol),{test@0})
Last time step is not converged.

I tried to replace the function Sc(T) by an another linear function and it works. Then, in the PDE of displacement (u), I replaced Sc(T) by its derivation d(Sc(T),T) and it can be solved. I don't know why the model doesn't accept my function introduced in the PDE's coefficient.

Please help me to find out where is the problem. Thanks a lot!

Viewing all articles
Browse latest Browse all 26527

Trending Articles