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.
Interpolation function of dependent variables
Posted Mar 12, 2010, 9:40 a.m. EST 3 Replies
Please login with a confirmed email address before reporting spam
I have been trying to solve a problem which requires interpolation functions or look-up tables. I know we can import data files by adding functions into COMSOL. I have tried that, and it worked. The interpolation functions were dependent on spatial coordinates (r and z).
Now I need to solve a similar problem, but in which case the interpolation functions are dependent on "dependent variables".
For example, I am solving concentration (c) and potential (V) in an electrochemical system. I have a parameter "f" which is a function of concentration and potential, i.e., f=f(c,V). This parameter is used in one of my boundary conditions. I cannot find an explicit expression for "f" in terms of c and V. However, I can make a look-up table for "f".
So this is what I did.
I defined "f" in Options --> Functions, and it is interpolated from an external .txt file. In the text file, the two variables are c and V.
The results do not look correct.
Can COMSOL support an interpolation function dependent on dependent variables?
or Is there any other method to solve it?
Thank you very much!
Hello Shao-Ling Wu
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.