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 in user-defined Analytic function

Kandibanda N Venkata Chandra Sekhar Guptha

Please login with a confirmed email address before reporting spam

Well, I have been trying to solve a Partial differential equation using Coefficient form PDE interface. And after setting up everything and solving, I am getting an error saying this

Error in user-defined function. Function: dtPa Failed to evaluate expression. Expression: dvol spatial(-(comp1.Pat-dtPa(comp1.T,comp1.Pa))) Failed to evaluate Jacobian of expression. Expression: (-(comp1.Pat-dtPa(comp1.T,comp1.Pa))test(comp1.Pa))*(dvol spatial) Last time step is not converged.

Well, basically I understood that the issue with the function 'dtPa' it is analytical function defined by me as it is one of the important terms in my PDE. But, I am not able to find any error. This is the expression used for the definition. Maybe someone can solve the Issue.

if(T > T_rA , -A_Arho_Av ( ( (Pa - rho_Ac)/rho_Av )^3 ) * exp( -E_A/T ), 0)

My function, kind of is a piecewise function. I had to use an if condition instead of piecewise function in Comsol as my function more than 1 argument.

T, Pa are dependent variables in my PDE

T_rA, A_A, rho_Av, rho_Ac, E_A are constants defined in workspace already.


0 Replies Last Post Feb 7, 2024, 12:42 a.m. EST
COMSOL Moderator

Hello Kandibanda N Venkata Chandra Sekhar Guptha

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.