Function with two different slopes and a drop.

Please login with a confirmed email address before reporting spam

Hello, I'm trying to make a function that i can use in my pde.

Essentially i have two linear ramp functions that I want to be one,

(1) Baseline: 549054 Cutoff: 122170 Slope: -1452

(2) Baseline: 96570 Slope: -230 Cutoff: 0 it would look something like the attached image.

How can I go about this? help appreciated



2 Replies Last Post 2024年6月3日 GMT-4 02:26
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 weeks ago 2024年5月31日 GMT-4 10:24
Updated: 3 weeks ago 2024年5月31日 GMT-4 10:27

Seems to me you could simply piece three linear functions together, using Booleans. That is, (1)write linear functions for each of the three segments, and then (2) where they join, use Boolean expressions. E.g., suppose ya(x) = the first function, yb(x) = the second function, and yc(x) = the third function. Suppose x1=x at the first junction and x2= x at the second junction. Your composite function is then: . The Boolean expressions resolve to 1 if true and 0 if false,so that each of your three functions contributes to ytot only over its appropriate domain.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Seems to me you could simply piece three linear functions together, using Booleans. That is, (1)write linear functions for each of the three segments, and then (2) where they join, use Boolean expressions. E.g., suppose ya(x) = the first function, yb(x) = the second function, and yc(x) = the third function. Suppose x1=x at the first junction and x2= x at the second junction. Your composite function is then: ytot = ya*(x

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 weeks ago 2024年6月3日 GMT-4 02:26

The Piecewise function type can be used to stitch together the three linear functions without using Boolean expressions.

The Piecewise function type can be used to stitch together the three linear functions without using Boolean expressions.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.