Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Conditional Statements & Negative Concentrations

Please login with a confirmed email address before reporting spam

Hello Everyone,

I'm running a coupled electrokinetic flow-electrostatics multiphysics problem to examine how a permeable charged interior domain effects the mobile ion concentrations (2D top view cylinder inside a rectangle).

I am obtaining an initial chemical state dependent on the electrolyte concentration used, and after, applying an electrical potential to cause a redistribution of mobile ions according to the electric field applied. Since I have a permeable negatively charged cylinder, the positive mobile ions have high concentrations within the cylinder and there are low concentrations of negative mobile ions.

My problem arises when I use high(er) applied voltages, and concentrations at certain locations tend towards zero. The model cannot currently deal with the numerical fluctuations near zero, and I eventually get negative concentrations ... which totally distort my model. The negative concentrations I'm obtaining are large enough to invalidate my model entirely.

I'm currently exploring the possibility of using a conditional statement to set these concentrations tending towards zero, exactly as zero (before they start to fluctuate around zero and start to go negative).

Can you use a nodal-specific conditional statement on a dependent variable???

I see ways you can use conditional statements in subdomains or boundarys, but I only want those specific locations which are near zero to be set to zero, and allow the rest of the physics to remain unhampered.

Any help would be greatly appreciated as I've been wrestling with these negative concentrations for a while :-)

Thanks!

Joseph

0 Replies Last Post 2 déc. 2011, 13:39 UTC−5
COMSOL Moderator

Hello Joseph Saunders

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.

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.