Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Problems with interpolation

Please login with a confirmed email address before reporting spam

Hello world,
I'm new with COMSOL, and I've some doubts.
My simulation is a 3D Heat Transfer case with a function of position as heat source (the object is a iron cube 1x1x1 m). The heat source function is provided from a file using the Interpolation in the Global definition point in the Model builder tree. The data format is Spreadsheet with 3 arguments and the interpolation is Linear. Its name is DenPot. The file is:
-1 -1 -1 0
-1 -1 1 0
1 -1 -1 0
1 -1 1 0
-1 1 -1 0
-1 1 1 0
1 1 -1 0
1 1 1 0
-0.5 -0.5 0 150
0.5 -0.5 0 1500
-0.5 0.5 0 3500
0.5 0.5 0 2500
-0.5 -0.5 0.5 4150
0.5 -0.5 0.5 500
-0.5 0.5 0.5 2500
0.5 0.5 0.5 5500
Now I can see the 3D Slice of my function DenPot(x,y,z)
In the Heat Source point I have filled the General source field with my function name:

if I write: DenPot
When launch the simulation I get this error:
Failed to evaluate variable Jacobian.
- Variable: DenPot
- Geometry: 1
- Domain: 1
and the simulation is stopped

if I write: DenPot(x,y,z)
When launch the simulation I get the right results (at least I hope so) but if I look in the Heat Source point I see the name of my function in red with the indication: Unexpected unit of input.

Where is the problem?
what is my mistake?

Thanks to all for your attention.
Best regards, Roberto

2 Replies Last Post 26.10.2011, 06:57 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.10.2011, 02:32 GMT-4
no matter what kind of function type you used,(you have used interpolation), when you used it in another place, you always need to specify the dependent variable, not the name only, so when you use DenPot(x,y,z), you can get a right result.
no matter what kind of function type you used,(you have used interpolation), when you used it in another place, you always need to specify the dependent variable, not the name only, so when you use DenPot(x,y,z), you can get a right result.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.10.2011, 06:57 GMT-4
Thank you a lot!
Bye,
Roberto
Thank you a lot! Bye, Roberto

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.