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.

Function as parameter.

Please login with a confirmed email address before reporting spam

Hello

It is possible to use a function as a parameter in the geometry.
For example, replace the radius of the circle function of time.

Thank you.

1 Reply Last Post Feb 23, 2013, 7:31 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 Feb 23, 2013, 7:31 a.m. EST
Hi

The geometry nodes accept only Parameters or equations assembled with parameters.

Parametes are static variables, loaded once at beginning of solver run.
During solving a parameter might be updated by a Parametric sweep node, or a solver continuation sweep tab.

One exception:
in the parameter list you can use variable nameto define them from firs study start that are later updated. Typical example a t=0 defined in the parameter list, as t which isCOMSL reserved name for time is only defined in transient solver case, like this it is defined from the beginning of the first study, i.e. you can run a stationary study on a model containing references to "t" typically for an initialisation for then after run a time series solver case, from the stationary values obtained from the parametr value of t=0 (or what ever value you choose)

now if you define a function only on parameters, I assume it will still not work for a geometry, as today you cannot even plot a function from within its definition, if it depends on a varaible or a parameter, as this parameter is not yet defined in the function definition, only once the solver has run (workaround for certain cases run the "get initial conditions", this predefines many things, including plots etc and it does not take long ;)


--
Good luck
Ivar
Hi The geometry nodes accept only Parameters or equations assembled with parameters. Parametes are static variables, loaded once at beginning of solver run. During solving a parameter might be updated by a Parametric sweep node, or a solver continuation sweep tab. One exception: in the parameter list you can use variable nameto define them from firs study start that are later updated. Typical example a t=0 defined in the parameter list, as t which isCOMSL reserved name for time is only defined in transient solver case, like this it is defined from the beginning of the first study, i.e. you can run a stationary study on a model containing references to "t" typically for an initialisation for then after run a time series solver case, from the stationary values obtained from the parametr value of t=0 (or what ever value you choose) now if you define a function only on parameters, I assume it will still not work for a geometry, as today you cannot even plot a function from within its definition, if it depends on a varaible or a parameter, as this parameter is not yet defined in the function definition, only once the solver has run (workaround for certain cases run the "get initial conditions", this predefines many things, including plots etc and it does not take long ;) -- 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.