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.
Functions vs Variables
Posted 17.04.2020, 17:05 GMT-4 General, Parameters, Variables, & Functions Version 5.5 0 Replies
Please login with a confirmed email address before reporting spam
Many calculation tasks can be handled either with a variable or a function. Are the calculations handled differently in the code? Are there advantages of one over the other, or are they just different ways of organization?
For example, a model might have a source term R that depends on many things. One could define R as R: myVariable and in a variables node: myVariable = thing1 * thing2^2 / sqrt(thing3)
Alternatively, one could use a function: R: myFunction(thing1, thing2, thing3) and then define the analytical function myFunction(a,b,c) = a * b^2 / sqrt(c)
Once the model is run, are these approaches different in efficiency or stability?
-------------------Steve Spielman
Aerosol Dynamics Inc.
Hello Steve S
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.