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.
Concentration PDE / solver
Posted 17 lug 2017, 09:23 GMT-4 4 Replies
Please login with a confirmed email address before reporting spam
Hi,
I have query regarding a COMSOL simulation I am running.
I am modelling an electrochemistry problem. I am solving for a concentration using a coefficient form PDE. I am essentially solving FIck's law of diffusion. My concentration is in Mol/m3. I have set the source term unit to molar flux (mol/m2/s)
I have a flux/source boundary condition where I impose a flux (mol/m2/s) and get a solution that matches my expectations - I have performed validation using volume integral of concentration and am getting the flux into the domain that I hoped for.
The first query I have is that the flux/source entry is in (mol/m2/s) but is expected to be in mol/m/s. My unit is wrong by a metre. I am also using a diffusion coefficient - units are m2/s as normal - but COMSOL is looking for m3/s so out by a metre again. What should I be using for the pde units?
I am actually solving two concentrations (oxygen and hydroxide). Oxygen is converted to hydroxide at one electrode and hydroxide is converted to oxygen at the other. However, we can’t make hydroxide if all the oxygen is depleted. If I use if(oxygen concentration > 0, reaction rate, 0) at the flux/source term then I get an extremely small timestep / really long solution time. Is there a way to speed this up at all? Smarter boundary condition or non standard solver?
Any advice would be appreciated.
Tim
I have query regarding a COMSOL simulation I am running.
I am modelling an electrochemistry problem. I am solving for a concentration using a coefficient form PDE. I am essentially solving FIck's law of diffusion. My concentration is in Mol/m3. I have set the source term unit to molar flux (mol/m2/s)
I have a flux/source boundary condition where I impose a flux (mol/m2/s) and get a solution that matches my expectations - I have performed validation using volume integral of concentration and am getting the flux into the domain that I hoped for.
The first query I have is that the flux/source entry is in (mol/m2/s) but is expected to be in mol/m/s. My unit is wrong by a metre. I am also using a diffusion coefficient - units are m2/s as normal - but COMSOL is looking for m3/s so out by a metre again. What should I be using for the pde units?
I am actually solving two concentrations (oxygen and hydroxide). Oxygen is converted to hydroxide at one electrode and hydroxide is converted to oxygen at the other. However, we can’t make hydroxide if all the oxygen is depleted. If I use if(oxygen concentration > 0, reaction rate, 0) at the flux/source term then I get an extremely small timestep / really long solution time. Is there a way to speed this up at all? Smarter boundary condition or non standard solver?
Any advice would be appreciated.
Tim
4 Replies Last Post 18 lug 2017, 08:46 GMT-4