COMSOL Forums: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/
Most recent forum messagesThu, 23 May 2013 16:43:58 +0000COMSOL Forums: Interpolation Function Helphttp://www.comsol.com/shared/images/logos/comsol_logo.gif
http://www.comsol.com/community/forums/general/thread/20824/
Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p103277
Hi, <br />
<br />
I have a quick question on the interpolation functions used a boundary conditions. <br />
<br />
I am working on a 3D model with PDE weak form. I need to introduce a boundary condition for a weak contribution that is tabulated in a file. This is<br />
<br />
f=f(t) meaning that the only input argument is the time.<br />
<br />
I have a text file built in this way:<br />
<br />
% t force<br />
0 1<br />
0.1 3<br />
0.3 7<br />
<br />
etc., <br />
<br />
When I introduce this function as boundary condition I receive the following error message:<br />
<br />
<br />
Failed to evaluate variable Jacobian<br />
- Variable: int1<br />
-Geometry: 1<br />
-Boundary: 4 8<br />
-Feature: Time-Dependent Solver 1 (sol/t1)<br />
-Error: Failed to evaluate variable Jacobian<br />
<br />
<br />
can anybody help me?<br />
<br />
thanks<br />
Thu, 23 May 2013 16:43:58 +000020824.1369327438.103277Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p87871
Hello Xu,<br />
The Discussion Forum is primarily meant for customers to assist each other. To request support from COMSOL support personnel, please email support@comsol.com.<br />
Thu, 11 Oct 2012 10:49:45 +000020824.1349952585.87871Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p87828
Hi, Magnus:<br />
I have a question for the interpolation function, can you help me? Thanks.<br />
My function has two arguments p and e instead of coordinates x and y, and the form is:<br />
<br />
G=f(p,e)<br />
<br />
So, I create the spreadsheet as:<br />
% p e G<br />
1e6 0.5 2e6<br />
2e6 0.6 3e6<br />
etc...<br />
<br />
But the COMSOL always assume to be coordinates as argument. How to fix this problem? <br />
<br />
<br />
Thanks a lot.<br />
<br />
<br />
XuWed, 10 Oct 2012 21:05:25 +000020824.1349903125.87828Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p87826
Hi, Nagi:<br />
I have a question for the interpolation function, can you help me? Thanks.<br />
My function has two arguments p and e instead of coordinates x and y, and the form is:<br />
<br />
G=f(p,e)<br />
<br />
So, I create the spreadsheet as:<br />
% p e G<br />
1e6 0.5 2e6<br />
2e6 0.6 3e6<br />
etc...<br />
<br />
But the COMSOL always assume to be coordinates as argument. How to fix this problem? <br />
<br />
<br />
Thanks a lot.<br />
<br />
<br />
XuWed, 10 Oct 2012 21:02:21 +000020824.1349902941.87826Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p84849
Hi,<br />
<br />
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.<br />
<br />
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.<br />
<br />
Best regards,<br />
Magnus Ringh, COMSOLThu, 16 Aug 2012 10:38:00 +000020824.1345113480.84849Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p84806
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.<br />
<br />
Nagi Elabbasi<br />
Veryst EngineeringWed, 15 Aug 2012 16:37:08 +000020824.1345048628.84806Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p84743
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.Tue, 14 Aug 2012 17:33:58 +000020824.1344965638.84743Re: Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p56293
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.....<br />
sorry I can't help youTue, 19 Jul 2011 05:32:31 +000020824.1311053551.56293Interpolation Function Help
http://www.comsol.com/community/forums/general/thread/20824/#p56221
Good Morning,<br />
<br />
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 "plot":<br />
<br />
"Internal error in mesh initialization.<br />
-Plot: previewplot1 (Surface)<br />
-Function: int1"<br />
<br />
Additionally, when I try to solve the model I get the following error message:<br />
<br />
"-Feature: Compile Equations: Stationary (sol1/st1)<br />
-Error: Internal error in mesh initialization."<br />
<br />
When I disable the interpolation function, COMSOL successfully solves the model.<br />
<br />
The input data used for the interpolation function was a velocity distribution exported from a previous solution surface. It has the following structure:<br />
<br />
% x y z myfun1<br />
0.005164328 0.094835672 0.2 0.098519135<br />
0.015894103 0.087647192 0.2 0.511590803<br />
0.015569986 0.095339275 0.2 0.22689919<br />
0.006197193 0.083275657 0.2 0.312314232<br />
0.005469283 0.016082383 0.2 0.2672031<br />
0.004733427 0.004733427 0.2 0.081290304<br />
0.012546053 0.01240331 0.2 0.43510989<br />
0.015707096 0.004896326 0.2 0.232560416<br />
0.027164381 0.094602393 0.2 0.368319369<br />
etc.<br />
<br />
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. <br />
<br />
Thank You!Mon, 18 Jul 2011 11:33:07 +000020824.1310988787.56221