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.

limiting a dependent variable to a specified range of values

Please login with a confirmed email address before reporting spam

Hello,
I am conducting a heat transfer simulation in which I have a dimensionless dependent variable which represents the vapor quality of the coolant fluid.

By definition, vapor quality must take values between zero and one, where a vapor quality of zero represents pure liquid and that of one is pure vapor. Values of less than zero or greater than one have no physical meaning (at least for the purposes of this simulation).

How can I set up the simulation so that the vapor quality is limited to values between 0 and 1? For example, if the simulation, for whatever reason, calculates a vapor quality less than zero, I want the vapor quality to be rewritten as equal to zero. On the other hand, if the simulation calculates a vapor quality greater than one, I want the vapor quality to be written as equal to one.

I want to do this to avoid numerical instability that appears to be caused by vapor quality taking on values less than zero.

Thanks!

1 Reply Last Post 8 set 2014, 10:06 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 set 2014, 10:06 GMT-4
Hi Torben,

Think of what would be the physical limit why your vapor quality cannot move outside these boundaries. What makes the vapor quality change in your model? This effect should stop when the vapor quality approaches the limits that you are giving it.
Hi Torben, Think of what would be the physical limit why your vapor quality cannot move outside these boundaries. What makes the vapor quality change in your model? This effect should stop when the vapor quality approaches the limits that you are giving it.

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.