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.
if condition with true expression only
Posted 1 juin 2023, 08:36 UTC−4 General, Equation-Based Modeling 0 Replies
Please login with a confirmed email address before reporting spam
I want to create a function that will force a variable to a certain value if a certain condition is met, and leave it untouched otherwise. For example, it A > 100, B gets set to 0. If A < 100, B remains at whatever value it had in the previous time step.
From my understanding, an if() condition requires an expression for the 'true' case and the 'false' case, but I want an expression for the 'true' case only.
Thanks!
Hello Cameron Fenske
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.