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 and parametric sweep

Please login with a confirmed email address before reporting spam

Hi,

i have a problem in my project. I use v.4.2 and AC/DC module in frequency domain.

I have a model built by some materials, that they depend of the frequency (electrical conductivity, relative permittivity) .
I would like to built a function to inteporlate the values in frequency and then to make a parametric sweep on frequency values.

For example:
In material --> new material --> functions --> interpolation
Function name: a
t f(t)
1 10
2 20
3 30
....

In study --> Parametric sweep: f= range (10,10,100)

It is corrects?
I have an error: 'Failed to evaluate variable' .
How can I define the function?

Thank you so much for your help!
Chiara


2 Replies Last Post Aug 21, 2012, 11:36 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 18, 2012, 12:22 p.m. EDT
Parametric sweep should be for t, not for f. f(t) should be the frequency itself.
Parametric sweep should be for t, not for f. f(t) should be the frequency itself.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 21, 2012, 11:36 a.m. EDT
Hi,


Alexander, above has already answered your question.


1. Go to parameters, input a parameter name, say "param" and define it a "0" value.

2. Go to function, interpolation, define data as appropriate, let us say the function name is "int1".

3. In the parameter sweep, select "param" and then define a range, i.e. range(0,10,100). Note that the range is the first column of your interpolation table, in other words, it is the independent variable or x-axis terms.

4. Now you want to apply the above function, for whatever purpose, say as a boundary condition. In that case, just type int1(param) on a given boundary - this is essentially your y-data for a given x-data (defined by "param").



Suresh
Hi, Alexander, above has already answered your question. 1. Go to parameters, input a parameter name, say "param" and define it a "0" value. 2. Go to function, interpolation, define data as appropriate, let us say the function name is "int1". 3. In the parameter sweep, select "param" and then define a range, i.e. range(0,10,100). Note that the range is the first column of your interpolation table, in other words, it is the independent variable or x-axis terms. 4. Now you want to apply the above function, for whatever purpose, say as a boundary condition. In that case, just type int1(param) on a given boundary - this is essentially your y-data for a given x-data (defined by "param"). Suresh

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.