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.

Moving Average, Moving Mean, Rolling Average, etc...

Please login with a confirmed email address before reporting spam

Hi,

I want to implement a STEP function (from 1 to 0) in which the argument is the average boundary temperature of previous 10 minutes in a time-depandent problem. (e.g: Moving average or rolling average)

I've tried to use at() operator but Comsol wont accept it as a model INPUT.

Is there an other way to do so?

Thanks

Alain

3 Replies Last Post Nov 29, 2011, 1:51 a.m. EST
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 Nov 24, 2011, 10:47 a.m. EST
Hi

the at() and with() and a few others are pure postprocessing operators (it's mentioned in the doc) not to be used in the solving process

One way around I have just tried in another case is to run a first simulation, then extract the results to a txt file, that I upload into a "int() interpolation function and use in a second simulation run. but it's all manual and slightly cumbersome

In v4.2a there are several new operators, take a close look into "operators" in the help files I havent had time yet to study all these new goodies

--
Good luck
Ivar
Hi the at() and with() and a few others are pure postprocessing operators (it's mentioned in the doc) not to be used in the solving process One way around I have just tried in another case is to run a first simulation, then extract the results to a txt file, that I upload into a "int() interpolation function and use in a second simulation run. but it's all manual and slightly cumbersome In v4.2a there are several new operators, take a close look into "operators" in the help files I havent had time yet to study all these new goodies -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 28, 2011, 12:06 p.m. EST
Dear Ivar,

there is indeed a new operator which is timeavg(...), and which does exactely what I want, but again, it is written, that the timeavg operator can only be used during results evaluation, so it should not be used when setting up the model.

Is there an other way to implement a moving average and be able to use it as in INPUT?

thanks

Alain
Dear Ivar, there is indeed a new operator which is timeavg(...), and which does exactely what I want, but again, it is written, that the timeavg operator can only be used during results evaluation, so it should not be used when setting up the model. Is there an other way to implement a moving average and be able to use it as in INPUT? thanks Alain

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 Nov 29, 2011, 1:51 a.m. EST
Hi

not really then, but perhaps you can re-express your equations by adding a new variable and integrate that one, hence getting something as a time average

--
Good luck
Ivar
Hi not really then, but perhaps you can re-express your equations by adding a new variable and integrate that one, hence getting something as a time average -- 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.