restrict codomain of dependent variables, i,e. make them positive always?

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   2 Replies   Last post: October 4, 2012 2:10pm UTC
Sabine

Sabine

October 3, 2012 11:57am UTC

restrict codomain of dependent variables, i,e. make them positive always?

Hey everybody,

I have a model with ion concentrations as dependent variables amongst others. When solving my problem, COMSOL makes one of the concentrations negative! But it can only be posititve of course. So, how can I restrict the codomain of my dependent variable, i.e. tell COMSL that making the it negative is not allowed?

All best and thank you very much for your answers,
Sabine

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

October 3, 2012 4:46pm UTC in response to Sabine

Re: restrict codomain of dependent variables, i,e. make them positive always?

Hi

You can stat by checking the KB (knowledge base) and te Forum, there are many discussions around how to cope with negative concentration, and often why they occure, and how to get around ;)

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Sabine

Sabine

October 4, 2012 2:10pm UTC in response to Ivar Kjelberg

Re: restrict codomain of dependent variables, i,e. make them positive always?

Dear Ivar,
thank you very much for the answer!
I was indeed not aware of that problem being a rather common problem, and searching specifically for negative *concentrations* did not come into my mind, so I am happy the appearance of them does apparently not necessarily mean that anything is fundamentally wrong with my problem :)
Do you know if the hint Tero gave in the thread you linked (defining a new variable that is set to a little bit over zero every step it is found to be negative if I understand it right), works in the newest version of COMSOL only, or in the old 3.5a one as well? (I do not know what kind of variable I should it define as, and how to tell COMSOL to solve for this instead of for my original dependent variable.. If you say it could work, I will try to figure out how to do it..)
All best,
Sabine

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines