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.

Bulk concentration higher than inflow conc. despite anodic oxidation. Help!

Please login with a confirmed email address before reporting spam

Dear all,

I am simulating anodic oxidation of compound X in a plain square reactor, containing one cathode and one anode. On the anode surface, X + 4A --> B.
A is generated directly on the anode surfaces. X flows in at the bottom of the geometry, passes the anode surface at where the reaction occurs, and flows out on top. There is indeed some decrease of X around the anode surface but at certain spots, the concentration of X is larger than inflowing concentration X0.
Nowhere in the model there should be any production of X and yet there is, how do I solve it?

I’ve tried refining the mesh but even with the extremely fine mesh there’s still some production of X.
I also tried to set a constraint for the X concentration by “if(X>X0,X0,X)”. But that’s just avoiding the problem, not solving or explaining it.

Thank you for your help.

9 Replies Last Post 2017年4月28日 GMT-4 06:55

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月27日 GMT-4 09:53
The mph file in question can be found below

The mph file in question can be found below

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月27日 GMT-4 10:04
hey,

somehow she could not attach it. Here comes the COMSOL file.
hey, somehow she could not attach it. Here comes the COMSOL file.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 04:02
Hi

In the attached file the reaction takes place homogeneously, not on the electrode surface. If the reaction is heterogeneous, taking place on the electrode, it must appear as a flux boundary condition. A is generated on the anode and consumed on the cathode, or how is it? You write that on the anode

X + 4A --> B

which means consumption of A, not generation.

The above reaction is obviously not elementary, hence the first order with respect to the both components is possible, but just for the sake interest, is the rate equation really that?

BR
Lasse
Hi In the attached file the reaction takes place homogeneously, not on the electrode surface. If the reaction is heterogeneous, taking place on the electrode, it must appear as a flux boundary condition. A is generated on the anode and consumed on the cathode, or how is it? You write that on the anode X + 4A --> B which means consumption of A, not generation. The above reaction is obviously not elementary, hence the first order with respect to the both components is possible, but just for the sake interest, is the rate equation really that? BR Lasse

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 04:21
OK

I looked at the model a bit carelessly. You do have a homogeneous reaction, following the generation of A on the anode. But why did you have F = 96.487 As/mol? Should be 96487.

Lasse
OK I looked at the model a bit carelessly. You do have a homogeneous reaction, following the generation of A on the anode. But why did you have F = 96.487 As/mol? Should be 96487. Lasse

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 05:16
Hi Lasse, thank you for your reply.

You are right about Faraday, it was a mistake by me.
A is generated on the anode using the inward flux boundary condition. A diffuses to the bulk and X diffuses to the surface. A and X reacts at a fast rate and thus they are both also consumed. Ideally this reaction would only take place in the vicinity of the anode surface.

the main issue is, that X is supposed to be degraded. therefore the concentration of X should be lower than that in the inlet. unfortunately we saw X concentration higher than in the inlet. This occurs only locally at electrode surface. we assume that it is only numerical problem. unfortunately, we can't figure it out where it might be.

thank you very much for taking your time checking the file. the rate constant is fine. could you please help checking it again?



OK

I looked at the model a bit carelessly. You do have a homogeneous reaction, following the generation of A on the anode. But why did you have F = 96.487 As/mol? Should be 96487.

Lasse

Hi Lasse, thank you for your reply. You are right about Faraday, it was a mistake by me. A is generated on the anode using the inward flux boundary condition. A diffuses to the bulk and X diffuses to the surface. A and X reacts at a fast rate and thus they are both also consumed. Ideally this reaction would only take place in the vicinity of the anode surface. the main issue is, that X is supposed to be degraded. therefore the concentration of X should be lower than that in the inlet. unfortunately we saw X concentration higher than in the inlet. This occurs only locally at electrode surface. we assume that it is only numerical problem. unfortunately, we can't figure it out where it might be. thank you very much for taking your time checking the file. the rate constant is fine. could you please help checking it again? [QUOTE] OK I looked at the model a bit carelessly. You do have a homogeneous reaction, following the generation of A on the anode. But why did you have F = 96.487 As/mol? Should be 96487. Lasse [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 05:27
I could not reach the solution, it did not converge. Convective diffusion problems are known to be really tough. It is possible that A takes locally negative values, making the reaction term positive. I would use expression max(A,eps) and max(X,eps) in the reaction term to prevent negative values.

BR
Lasse
I could not reach the solution, it did not converge. Convective diffusion problems are known to be really tough. It is possible that A takes locally negative values, making the reaction term positive. I would use expression max(A,eps) and max(X,eps) in the reaction term to prevent negative values. BR Lasse

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 05:51
Yes I often have issue with the convergence as well... But it usually works when I increase the iterations.
I already have that restriction for A with "if(A<0,eps,A)". My first thought was also that the total rate expression for X would somewhere be positive, but the maximum value is 0.
The only other way I would think of would be to restrict the X concentration to always being equal or smaller than the inflow concentration X0, by "if(X>X0,X0,X)" (as i wrote in my original post). However, isn't this "cheating"? I mean it doesn't solve the numerical problem, it only avoids it.

Once again thank you for your time.
BR, Sara


I could not reach the solution, it did not converge. Convective diffusion problems are known to be really tough. It is possible that A takes locally negative values, making the reaction term positive. I would use expression max(A,eps) and max(X,eps) in the reaction term to prevent negative values.

BR
Lasse

Yes I often have issue with the convergence as well... But it usually works when I increase the iterations. I already have that restriction for A with "if(AX0,X0,X)" (as i wrote in my original post). However, isn't this "cheating"? I mean it doesn't solve the numerical problem, it only avoids it. Once again thank you for your time. BR, Sara [QUOTE] I could not reach the solution, it did not converge. Convective diffusion problems are known to be really tough. It is possible that A takes locally negative values, making the reaction term positive. I would use expression max(A,eps) and max(X,eps) in the reaction term to prevent negative values. BR Lasse [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 06:47
Have you tried to make an Auxiliary sweep in the study, increasing the rate constant gradually? With the zero rate constant you can check that A is accumulating and X remains constant. You'll see when the mass balance begins to fail when you increase the rate constant.

L
Have you tried to make an Auxiliary sweep in the study, increasing the rate constant gradually? With the zero rate constant you can check that A is accumulating and X remains constant. You'll see when the mass balance begins to fail when you increase the rate constant. L

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2017年4月28日 GMT-4 06:55
Thank you for your reply,
I have not done that yet but it's a good suggestion, so I will try it. I'll give an update if I find a solution.

If any other person also has a suggestion or have similar issues you are more than welcome to post.

Best regards,
Sara
Thank you for your reply, I have not done that yet but it's a good suggestion, so I will try it. I'll give an update if I find a solution. If any other person also has a suggestion or have similar issues you are more than welcome to post. Best regards, Sara

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.