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.

Upper and Lower Constraints or limits on variables

Please login with a confirmed email address before reporting spam

I have a model I am trying to run involving the concentration of hydrogen in zirconium and it keeps dropping below 0 in some spots and above 1 in others... It solves several PDE's one of which is the Cahn-Hilliard equation for the conserved Hydrogen concentration. Is there a way to constrain the variable or set limits where it will not go above or below certain points?

4 Replies Last Post Nov 15, 2016, 9:02 p.m. EST
COMSOL Moderator

Hello Jake Bair

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.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 8, 2014, 4:07 a.m. EDT
If you are using a segregated solver, you can use "lower limit" to avoid the concentration dropping below zero. For an upper limit I am also looking for a solution...
If you are using a segregated solver, you can use "lower limit" to avoid the concentration dropping below zero. For an upper limit I am also looking for a solution...

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 9, 2014, 9:51 a.m. EDT
Hi,
I am having the same issue. I am working with a different module (Subsurface Flow Module with Richards' equation) and I need to set an upper limit on the dependent variable, which in my case is water pressure. At t=0 water pressure over a certain boundary is negative; when its value reaches 0 I want to keep it constant, so basically I need to set 0 as upper limit.
Has anyone found a solution for this issue? I would greatly appreciate any help.
Thanks
Alessia
Hi, I am having the same issue. I am working with a different module (Subsurface Flow Module with Richards' equation) and I need to set an upper limit on the dependent variable, which in my case is water pressure. At t=0 water pressure over a certain boundary is negative; when its value reaches 0 I want to keep it constant, so basically I need to set 0 as upper limit. Has anyone found a solution for this issue? I would greatly appreciate any help. Thanks Alessia

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 7, 2014, 5:17 p.m. EDT
My solution is to change the equation, so I calculate "-u" instead of "u". Thus when you set lower limit for -u, that's the upper limit for u, then you can use "-(-u)" in your model as the original variable.

This still doesn't solve the problem if you want to set lower and upper limits at the same time though.
My solution is to change the equation, so I calculate "-u" instead of "u". Thus when you set lower limit for -u, that's the upper limit for u, then you can use "-(-u)" in your model as the original variable. This still doesn't solve the problem if you want to set lower and upper limits at the same time though.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Nov 15, 2016, 9:02 p.m. EST

My solution is to change the equation, so I calculate "-u" instead of "u". Thus when you set lower limit for -u, that's the upper limit for u, then you can use "-(-u)" in your model as the original variable.

This still doesn't solve the problem if you want to set lower and upper limits at the same time though.


Hi, this is indeed the problem, one cannot set both the lower and upper limits. I am wondersing if comsol has any solution for this at this moment? Thanks in advance,

lailai
[QUOTE] My solution is to change the equation, so I calculate "-u" instead of "u". Thus when you set lower limit for -u, that's the upper limit for u, then you can use "-(-u)" in your model as the original variable. This still doesn't solve the problem if you want to set lower and upper limits at the same time though. [/QUOTE] Hi, this is indeed the problem, one cannot set both the lower and upper limits. I am wondersing if comsol has any solution for this at this moment? Thanks in advance, lailai

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.