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.
State variables
Posted 20.02.2025, 17:41 MEZ General, Modeling Tools & Definitions, Equation-Based Modeling Version 6.0 0 Replies
Please login with a confirmed email address before reporting spam
Hi,
I am currently using State Variables to model the permanent change in boundary conditions (BCs). In the global parameters, I have defined Switch = 1 and utilized the following expression in State Variables definition to model the permanent change:
State: Switch Initial Value: 0 Update Expression: if(ps > pt, 1, Switch)
Additionally, I have set up the following condition for the BC transition:
Name: E_a Expression: if(Switch == 1, Ea, Ec)
The model converges. However, when I plot the Switch parameter, it displays values between 0 and 1 instead of just 0 or 1. This has caused me to question whether the BC switch is functioning correctly and if the results are accurate. I would appreciate any insights or advice you could provide.
Thank you in advance for your help!
Best regards,
Kedar
Hello Kedar Baral
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.