<?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.com/community/forums/general/rss/thread/20824.rss" rel="self" type="application/rss+xml"/>
  <title>COMSOL Forums: Interpolation Function Help</title>
  <link>http://www.comsol.com/community/forums/general/thread/20824/</link>
  <description>Most recent forum messages</description>
  <pubDate>Thu, 11 Oct 2012 16:49:45 +0000</pubDate>
  <image>
   <title>COMSOL Forums: Interpolation Function Help</title>
   <url>http://www.comsol.com/shared/images/logos/comsol_logo.gif</url>
   <link>http://www.comsol.com/community/forums/general/thread/20824/</link>
  </image>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p87871</link>
   <description>Hello Xu,&lt;br /&gt;&#13;
The Discussion Forum is primarily meant for customers to assist each other. To request support from COMSOL support personnel, please email support@comsol.com.&lt;br /&gt;&#13;
</description>
   <pubDate>Thu, 11 Oct 2012 16:49:45 +0000</pubDate>
   <guid isPermaLink="false">20824.1349974185.87871</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p87828</link>
   <description>Hi, Magnus:&lt;br /&gt;&#13;
    I have a question for the interpolation function, can you help me? Thanks.&lt;br /&gt;&#13;
    My function has two arguments p and e instead of coordinates x and y, and the form is:&lt;br /&gt;&#13;
    &lt;br /&gt;&#13;
    G=f(p,e)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
    So, I create the spreadsheet as:&lt;br /&gt;&#13;
    % p e G&lt;br /&gt;&#13;
    1e6 0.5 2e6&lt;br /&gt;&#13;
    2e6 0.6 3e6&lt;br /&gt;&#13;
    etc...&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
    But the COMSOL always assume to be coordinates as argument. How to fix this problem? &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks a lot.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Xu</description>
   <pubDate>Thu, 11 Oct 2012 03:05:25 +0000</pubDate>
   <guid isPermaLink="false">20824.1349924725.87828</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p87826</link>
   <description>Hi, Nagi:&lt;br /&gt;&#13;
    I have a question for the interpolation function, can you help me? Thanks.&lt;br /&gt;&#13;
    My function has two arguments p and e instead of coordinates x and y, and the form is:&lt;br /&gt;&#13;
    &lt;br /&gt;&#13;
    G=f(p,e)&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
    So, I create the spreadsheet as:&lt;br /&gt;&#13;
    % p e G&lt;br /&gt;&#13;
    1e6 0.5 2e6&lt;br /&gt;&#13;
    2e6 0.6 3e6&lt;br /&gt;&#13;
    etc...&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
    But the COMSOL always assume to be coordinates as argument. How to fix this problem? &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thanks a lot.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Xu</description>
   <pubDate>Thu, 11 Oct 2012 03:02:21 +0000</pubDate>
   <guid isPermaLink="false">20824.1349924541.87826</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p84849</link>
   <description>Hi,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
As Nagi explains above, an interpolation function of three arguments does not work well when one of them is a constant value (it is a degenerated case). Perhaps you want to treat this as function of two variables (arguments), neglecting the values in the third column. You can then import it without having to modify the data file but specifying, in the settings window for Interpolation, that there are 2 arguments, and, under Functions, that the position in the file for the function values is 2. That means that COMSOL treats columns 1 and 2 as the argument values, and the second of the following columns (that is, column 4) as the column with the associated function values. Column 3 is then not used.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
In this particular case the data is in an Excel file, which the Interpolation function does not support in a general way, but you can save it as text file, which is a supported data format. Furthermore, the values in the file seem to use a decimal comma rather than a decimal point. Replacing commas with points in the text file it is possible to import it as described above and plot the interpolation function as a surface plot.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Best regards,&lt;br /&gt;&#13;
Magnus Ringh, COMSOL</description>
   <pubDate>Thu, 16 Aug 2012 16:38:00 +0000</pubDate>
   <guid isPermaLink="false">20824.1345135080.84849</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p84806</link>
   <description>One of your variables always has the same value of 0.2. It seems that this is not acceptable for COMSOL. If you change some numbers to say 0.3 it works. Alternatively you can remove that variable completely from the function.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Nagi Elabbasi&lt;br /&gt;&#13;
Veryst Engineering</description>
   <pubDate>Wed, 15 Aug 2012 22:37:08 +0000</pubDate>
   <guid isPermaLink="false">20824.1345070228.84806</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p84743</link>
   <description>Me toooo! Once I used interpolation function with three arguments, it will pop out the error message. Hope someone expert will answer this question soon.</description>
   <pubDate>Tue, 14 Aug 2012 23:33:58 +0000</pubDate>
   <guid isPermaLink="false">20824.1344987238.84743</guid>
  </item>
  <item>
   <title>Re: Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p56293</link>
   <description>Had the same issue with an imported data .txt file, and it has 2 parameters while yours seems to have three of them. The only thing I figured was to reduce the number of parameters to 1, and no more error messages.... But I guess in your case it's quite out of the question.....&lt;br /&gt;&#13;
sorry I can't help you</description>
   <pubDate>Tue, 19 Jul 2011 11:32:31 +0000</pubDate>
   <guid isPermaLink="false">20824.1311075151.56293</guid>
  </item>
  <item>
   <title>Interpolation Function Help</title>
   <link>http://www.comsol.com/community/forums/general/thread/20824/#p56221</link>
   <description>Good Morning,&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I'm having trouble using COMSOL's interpolation function, and I was hoping someone might be able to help. I'm trying to load data from a tab-delimited text file. I've followed the instructions in the COMSOL user guide on interpolation functions, however I get the following error when I click &amp;quot;plot&amp;quot;:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&amp;quot;Internal error in mesh initialization.&lt;br /&gt;&#13;
-Plot: previewplot1 (Surface)&lt;br /&gt;&#13;
-Function: int1&amp;quot;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Additionally, when I try to solve the model I get the following error message:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
&amp;quot;-Feature: Compile Equations: Stationary (sol1/st1)&lt;br /&gt;&#13;
-Error: Internal error in mesh initialization.&amp;quot;&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
When I disable the interpolation function, COMSOL successfully solves the model.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
The input data used for the interpolation function was a velocity distribution exported from a previous solution surface. It has the following structure:&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
% x y z myfun1&lt;br /&gt;&#13;
0.005164328 0.094835672 0.2 0.098519135&lt;br /&gt;&#13;
0.015894103 0.087647192 0.2 0.511590803&lt;br /&gt;&#13;
0.015569986 0.095339275 0.2 0.22689919&lt;br /&gt;&#13;
0.006197193 0.083275657 0.2 0.312314232&lt;br /&gt;&#13;
0.005469283 0.016082383 0.2 0.2672031&lt;br /&gt;&#13;
0.004733427 0.004733427 0.2 0.081290304&lt;br /&gt;&#13;
0.012546053 0.01240331 0.2 0.43510989&lt;br /&gt;&#13;
0.015707096 0.004896326 0.2 0.232560416&lt;br /&gt;&#13;
0.027164381 0.094602393 0.2 0.368319369&lt;br /&gt;&#13;
etc.&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
A very simple flow model demonstrating the problem is attached, along with an excel version of the data I'm using.   I'm a new COMSOL user, and any advice would be greatly appreciated. &lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thank You!</description>
   <pubDate>Mon, 18 Jul 2011 17:33:07 +0000</pubDate>
   <guid isPermaLink="false">20824.1311010387.56221</guid>
  </item>
 </channel>
</rss>
