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.

Calling matlab function in comsol

Vignesh Kumar Devendiran

Please login with a confirmed email address before reporting spam

Hi,

I am using Coefficient form Pde interface to solve a system of PDEs. As the coefficients are non-linear messy expressions and they are functions of the gradients of the dependent variables and the parameters, I would like to group certain terms in the coefficients and call them through matlab functions. Example, if the variables are u,v,and w and if one of the coefficient looks like ux*(vy+wx+uy^2+vx*vy) (say), i would like to call vy+wx+uy^2+vx*vy as a matlab function and define the that coefficient to be ux*T(arguments).

I followed everything that is prescribed in the documentation and what I don't understand is this, how to define the derivatives of the matlab function that i have called? It is said in the document that the derivatives are nothing but the partial derivatives with respect to the input arguments. In the above example, there are 4 input arguments for the function, so i am expected to define the Jacobian is it?

Could someone clarify what has to defined as the derivatives ?

0 Replies Last Post Oct 26, 2014, 11:41 a.m. EDT
COMSOL Moderator

Hello Vignesh Kumar Devendiran

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.