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.

How do I plot/evaluate a function at specific time point?

Please login with a confirmed email address before reporting spam

Hi all,

I' ve following Question. When I define under Global->Function->Interpolation an function (for example test(t) ), is there a possibilty to plot/evaluate this function for postprocessing only at specific time points. I need the value of test(t) only at the time points t=20s, 30s, 40s... and so on.

Thanks for any help.
Johannes

3 Replies Last Post 19 oct. 2011, 13:14 UTC−4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 oct. 2011, 10:32 UTC−4
Hi

first remark, be careful with the naming, test() is normally an internally defined COMSOL operator (used in the weak expressions) so pls choose another name to be sure there is no collision there

But then I do not understand your question, you can select in the plot node all items for a time series, or only a few or interpolated ones, see the doc on the higher level plot node

--
Good luck
Ivar
Hi first remark, be careful with the naming, test() is normally an internally defined COMSOL operator (used in the weak expressions) so pls choose another name to be sure there is no collision there But then I do not understand your question, you can select in the plot node all items for a time series, or only a few or interpolated ones, see the doc on the higher level plot node -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 oct. 2011, 10:51 UTC−4
Hi

thanks for the hint with the naming.

My question concerns the following problem. I want to know the residual between a defined interpolation function, e.g. experiment() as interpolation of some measured data from a diffusion experiment and the results of the simulation, but i want the the residuals only at the experimental time points. It's the residual between the experimental and simulated diffusive flux, so I thougt of something like (experiment(t=20,30,40)-(-D*ux(t=20,30,40)))^2

--
Johannes
Hi thanks for the hint with the naming. My question concerns the following problem. I want to know the residual between a defined interpolation function, e.g. experiment() as interpolation of some measured data from a diffusion experiment and the results of the simulation, but i want the the residuals only at the experimental time points. It's the residual between the experimental and simulated diffusive flux, so I thougt of something like (experiment(t=20,30,40)-(-D*ux(t=20,30,40)))^2 -- Johannes

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 oct. 2011, 13:14 UTC−4
Hi

not sure what to propose, that needs some thinking ;)

By defaut, if you are driving your simulation by the difference of the experimantal to the calulcated points, it would take the residual of the interpolated values, at least that is how I understand COMSOL's default behaviour

--
Good luck
Ivar
Hi not sure what to propose, that needs some thinking ;) By defaut, if you are driving your simulation by the difference of the experimantal to the calulcated points, it would take the residual of the interpolated values, at least that is how I understand COMSOL's default behaviour -- Good luck Ivar

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.