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.

Differentials ux and external functions

Please login with a confirmed email address before reporting spam

DEar all,

I haven't found any answer in the external function section of the user's guide for what appears to be a really simple question.

I need to create an external function which will simply compute log(\partial_x u * x).

I noticed that it as possible to create an external function and pass 'x' and 'ux' as arguments to my external function, but I'm just wondering if an external function fun(x,ux) defined like this is legit or not :

function [out]=fun(x,ux)
out = x.*ux;
end

I read that Comsol likes to call this external function a minimal number of times, for computation speed. And so, it usually give sets of values for x, and I guess set of values for ux
However, I can't picture what ux is gonna be in this case... So I'm quite sure my function is not legit.

Just wondering if anybody knows how this works. Or can provide an exemple model implementing such a process.
BR,

M

PS : This example is really simple, I'm not even obliged to create an external function. But for some reasons I'm not detailing here, I absolutely NEED an external function.

0 Replies Last Post 2012年11月14日 GMT-5 07:06
COMSOL Moderator

Hello Matthieu De Mari

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.