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.

Combination of different step() functions with prev() operator

Please login with a confirmed email address before reporting spam

Hello,

I have an equation using prev() operator and step() function in order to generate a current that will be implented as a boundary condition:

i(t)=E/R(t)

i(t) is the value of current i at instant t(s)
E=constant voltage
R(t) is the value of resistance at tinstant t(s).

R is set from a triple rules over time:
1. If i(t-dt) * t < 2 then: R=1 (Ohm)
2. If i(t-dt) * t >=2 and if T(t)<300°C then: R=4 (Ohm)
3. If i(t-dt) * t >=2 and if T(t)>=300°C then: R=100 (Ohm)

T(t) is the temperature at isntant t(s)
i(t-dt) is the value of current at the previous instant t-dt (s). So: i(t-dt)=E/prev(R,1)
with the initial resistance at t=0s: R(t=0s)=1 (Ohm)

I would like combine these 3 rules to generate a current that depends on the current and the temperature.
By using step function, i have:
step_1(2): R jump from 1 Ohm to 4 Ohm at location: i(t-dt)*t=2 (appied for rule 1 & 2)
step_2(300): R jump from 4 Ohm to 100 Ohm at location: T = 300°C (applied for rule 2&3)

However, i don't know how to combine these two step function to represent 3 rule at the same time in COMSOL 4.2 ?

Best regards,

Dinh An

0 Replies Last Post 4 nov 2011, 10:10 GMT-4
COMSOL Moderator

Hello Li-ion

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 the Support Center for a more comprehensive response from the Technical Support team.