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.

smoothing an analytical function

Michael Rembe Certified Consultant

Please login with a confirmed email address before reporting spam

Hello,

I have an analytical function m'=k*(cs-c). k, cs, c are arguments, that's why I can use analytical function, only (not piecewise f.i.). m' gets negative for c>cs. What I need is a function m'=max(k*(cs-c),0) with a smooth transition from k*(cs-c) to 0. k*(cs-c) is a straight falling line. k is a constant, cs is a function of T, and c is a variable to solve for.

Is there anybody who has a good idea?

Thank you very much!
Michael

2 Replies Last Post 14 juil. 2011, 10:10 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 juil. 2011, 12:26 UTC−4
Michael,

If I understand correctly, I think you can make it work by multiplying your desired function by a step function where the argument of the step function is c-cs. Then, if c < cs, the argument is positive, and the step function should return a value of +1. If c > cs, the step function should return a zero.

Chris
Michael, If I understand correctly, I think you can make it work by multiplying your desired function by a step function where the argument of the step function is c-cs. Then, if c < cs, the argument is positive, and the step function should return a value of +1. If c > cs, the step function should return a zero. Chris

Michael Rembe Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 juil. 2011, 10:10 UTC−4
Hi Chris,
thank you very much! Your tip is quit right and so simple! It works fine!

Michael
Hi Chris, thank you very much! Your tip is quit right and so simple! It works fine! Michael

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.