<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="http://www.comsol.co.in/community/forums/general/rss/thread/3772.rss" rel="self" type="application/rss+xml"/>
  <title>COMSOL Forums: Interpolation function of dependent variables</title>
  <link>http://www.comsol.co.in/community/forums/general/thread/3772/</link>
  <description>Most recent forum messages</description>
  <pubDate>Fri, 23 Jul 2010 14:00:32 +0000</pubDate>
  <image>
   <title>COMSOL Forums: Interpolation function of dependent variables</title>
   <url>http://www.comsol.co.in/shared/images/logos/comsol_logo.gif</url>
   <link>http://www.comsol.co.in/community/forums/general/thread/3772/</link>
  </image>
  <item>
   <title>Re: Interpolation function of dependent variables</title>
   <link>http://www.comsol.co.in/community/forums/general/thread/3772/#p20249</link>
   <description>Hi, Ivar,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks very much for your reply. I followed your sugestion,define a global variable r = sqrt(x^2+y^2), and also define a global interpolation ep_r(r). However, it still did not work. It seems that Comsol has not recognized this variable r in the interpolation ep_r(r).  Maybe I did not understand your comments &amp;quot; use &amp;quot;r&amp;quot; thereafter &amp;quot;.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Can you explain more about this?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
The attached mph file is my model.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks in advance</description>
   <pubDate>Fri, 23 Jul 2010 14:00:32 +0000</pubDate>
   <guid isPermaLink="false">3772.1279893632.20249</guid>
  </item>
  <item>
   <title>Re: Interpolation function of dependent variables</title>
   <link>http://www.comsol.co.in/community/forums/general/thread/3772/#p20170</link>
   <description>Hi&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
define a global variable r = sqrt(x^2+y^2) and use &amp;quot;r&amp;quot; thereafter, check the doc for global variables&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
--&lt;br /&gt;&#13;
Good luck&lt;br /&gt;&#13;
Ivar</description>
   <pubDate>Thu, 22 Jul 2010 18:35:36 +0000</pubDate>
   <guid isPermaLink="false">3772.1279823736.20170</guid>
  </item>
  <item>
   <title>Re: Interpolation function of dependent variables</title>
   <link>http://www.comsol.co.in/community/forums/general/thread/3772/#p20146</link>
   <description>Hi, Shao-Ling,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I also tried to use interpolation function and met a problem. Can you give me some suggestion?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I am trying to interpolate spatial-varying material data. The interpolation functions were dependent on spatial coordinates (r)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
In Comsol Multiphysics user guide, the spatial arguments are x,y,z.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
My question is:&lt;br /&gt;&#13;
How can we use r (r=sqrt(x^2+y^2)) as the spatial arguments?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
</description>
   <pubDate>Thu, 22 Jul 2010 13:22:47 +0000</pubDate>
   <guid isPermaLink="false">3772.1279804967.20146</guid>
  </item>
  <item>
   <title>Interpolation function of dependent variables</title>
   <link>http://www.comsol.co.in/community/forums/general/thread/3772/#p9826</link>
   <description>Hi, &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
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).&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Now I need to solve a similar problem, but in which case the interpolation functions are dependent on &amp;quot;dependent variables&amp;quot;.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
For example, I am solving concentration (c) and potential (V) in an electrochemical system. I have a parameter &amp;quot;f&amp;quot; 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 &amp;quot;f&amp;quot; in terms of c and V. However, I can make a look-up table for &amp;quot;f&amp;quot;. &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
So this is what I did. &lt;br /&gt;&#13;
I defined &amp;quot;f&amp;quot; in Options --&amp;gt; Functions, and it is interpolated from an external .txt file. In the text file, the two variables are c and V.&lt;br /&gt;&#13;
The results do not look correct.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Can COMSOL support an interpolation function dependent on dependent variables?&lt;br /&gt;&#13;
or Is there any other method to solve it?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thank you very much!&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
</description>
   <pubDate>Fri, 12 Mar 2010 13:40:31 +0000</pubDate>
   <guid isPermaLink="false">3772.1268401231.9826</guid>
  </item>
 </channel>
</rss>
