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.

interpolation effect or bug?

Please login with a confirmed email address before reporting spam

Hi all,

I am using the electric currents module. One block, with one source and one sink.

I calculate the ec.Jx, and store it to file using
JX=mpheval(out,{'ec.Jx'});

Now I save the values and node coordiantes from JX in a txt file

like

outfile=[JX.p', JX.d1'];

And import it back to comsol, using an interpolation function.

model.func.create('int3', 'Interpolation');
model.func('int3').model('mod1');
model.func('int3').set('nargs', '3');
model.func('int3').set('funcs', {j1x' '1'});
model.func('int2').set('source', 'file');
model.func('int2').set('filename', '/home/marios/Desktop/comsol_stuff/j1x.txt');
model.func('int2').set('defvars', true);

Now, when I plot ec.Jx and j1x, thery are not the same. They have the same pattern, but differenr min, max and volume integral values

| min | max | volume integral
ec.jx -637 562 0.352
j1x -130 37 0.3378

Is this related to the interpolation? How can I address this problem?




0 Replies Last Post 5 set 2011, 12:52 GMT-4
COMSOL Moderator

Hello Marios Karaoulis

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.

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.