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.

Help to make a function that will gradually decrease a value of a parameter

Please login with a confirmed email address before reporting spam

Hi all,

I am very new user of COMSOL. I am trying to learn from this discussion forum. I got stuck in a problem.

I am trying to make a function that will gradually decrease a value of a given parameter for example: At the top of a rectangular box, the initial value of a parameter will be 0.25 but it will decrease with time when the solver advances with time and at the bottom of the rectangular box the value of that parameter will become 0.001. The final value is not fixed. It can be anything. So, the value of the parameter will decrease at a controlled rate.

If you do not understand my description, please see the graphical description in the attachment. It will give you a better idea of my problem.

Does anybody know how I can make such a function in COMSOL? Thanks in advance.



3 Replies Last Post 2015年8月18日 GMT-4 05:11

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月17日 GMT-4 07:13
You can define functions globally or within the Component --> Definitions. Let's say that you have an analytical function as a function of time and its name is "an1". You can use that function as a boundary condition, for example, calling it asn "an1(t)", like any mathematical function.

BR
Lasse
You can define functions globally or within the Component --> Definitions. Let's say that you have an analytical function as a function of time and its name is "an1". You can use that function as a boundary condition, for example, calling it asn "an1(t)", like any mathematical function. BR Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月17日 GMT-4 07:39
Thanks for the suggestion. I already know that. But my question is, is there any kind of built in function in COMSOL that will gradually decrease the value of the parameter?
Thanks for the suggestion. I already know that. But my question is, is there any kind of built in function in COMSOL that will gradually decrease the value of the parameter?

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月18日 GMT-4 05:11
A parameter can't do that. But you can define a variable on the domain that depends on y, e.g.:

var(y) = 0.25 - (220-y)/220*(y<220)

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
A parameter can't do that. But you can define a variable on the domain that depends on y, e.g.: var(y) = 0.25 - (220-y)/220*(y

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.