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.

Material constants in user-defined functions for material properties

Please login with a confirmed email address before reporting spam

Hello,

I am trying to create my own material property by adding an analytical function. This is a function of one input argument (frequency), but it contains several material constants.

I was hoping to use "local properties" table in the corresponding material settings to create my own local parameters. So that my function could be neatly written e.g. like

f=A*x

instead of

f=2.2454*x

And according to the "Materials Library User Guide":

"These local properties are useful for parameterizing functions that describe material properties if they contain inputs other than those that are model inputs"

However, it looks like the analytical function I am creating has no access to the "local properties". For instance, if I try to plot this function, Comsol gives me the error "Failed to evaluate variable: -Variable: A", even though A is defined as a local property.

What am I doing wrong?

regards,


0 Replies Last Post Feb 23, 2021, 8:39 a.m. EST
COMSOL Moderator

Hello Andriy Gorbach

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.