Enforcing variables to be greater than or equal to zero

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

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   3 Replies   Last post: February 9, 2014 5:45pm UTC
Alistair Kirk

Alistair Kirk

December 2, 2012 11:29pm UTC

Enforcing variables to be greater than or equal to zero

Hello,

I'm modelling diffusion through a porous medium with adsorption. The main dependent variable for mass concentration tends to go below zero which is not true in reality. Is there a way to enforce my variables to be >=0 at all times?

I would also like to apply this condition to other concentrations that I specify in my additional variables.

Any suggestions would be greatly appreciated.

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

Sergei Yushanov

Sergei Yushanov
Certified Consultant
AltaSim Technologies, LLC

December 3, 2012 3:13pm UTC in response to Alistair Kirk

Re: Enforcing variables to be greater than or equal to zero

Alistair,

To enforce variables to be >=0 at all times, use Segregated solver. Then, right-click Segregated 1 node and add Lower Limit node. In the Settings window for Lower limit, you can define lower limits for your field variables.


Good luck,

Sergei Yushanov

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

Ivar Kjelberg

Ivar Kjelberg

December 3, 2012 3:19pm UTC in response to Alistair Kirk

Re: Enforcing variables to be greater than or equal to zero

Hi

normally it's far better to understand why you get "non physical values"
Mostly it's because of non physical initial conditions or inappropriate meshing densities around steep dependent variable values, once these are corrected the solution is far more robust

--
Good luck
Ivar

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

Peyman Dordizadeh

Peyman Dordizadeh

February 9, 2014 5:45pm UTC in response to Ivar Kjelberg

Re: Enforcing variables to be greater than or equal to zero

Hi guys,

I have the same problem with modelling continuity equation . I have two modules coupled with each other; electrostatics (responsible for electric field) and PDE module (responsible for charge transport equation).
Even though I put restriction for number density of charge in space by using the "lower limit" feature, it still becomes negative.
Does anyone have any suggestion?

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


Rules and guidelines