Discussion ClosedThis 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.

How can I plot a piecewise function after computing

Please login with a confirmed email address before reporting spam

Hi,

I am trying to use the time variable given by the solution (sol1.t or t) to define a variabletheta=Dt/a^2(other variables are defined) and ploti=f(theta)which is a piecewise function depending on the value ofthetaI dont know where I can define a new variable in the result section. I triedResults->Parameters, but it won't allow me to use t, I triedResults->Derived Values->Global Evaluationbut it won't allow me to name this variable astheta, which makes me not able to refer to when calculatingi. Also, inResults->1D Plot Group->FunctionHow can I define a piecewise function here?

Many thanks!!!

Christopher


0 Replies Last Post 2023年5月5日 GMT+2 17:46
COMSOL Moderator

Hello Christopher Yi

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map