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.

Li-Ion Battery Example - Works in 3.5a but not 4.0

Please login with a confirmed email address before reporting spam

I have recently implemented the provided COMSOL 3.5a example of a lithium ion battery in version 4.0. The problem, as stated, solves just fine in 3.5a with easy adjustment of the applied current, and thus discharge/charge rates of the cell. I have modified the model slightly by removing the 2D diffusion geometry so the model is now purely 1D.

When I try to solve the model in 4.0, I get the "Cannot find consistent initial values" error, but all the initial values are identical to those in 3.5a. I have struggled with this for a while now, and I am getting frustrated not being able to find the solution.

If anybody can provide any direction I would greatly appreciate it. I also have noticed that I do not have the same options for the selected solver in 4.0 that I had in 3.5a. In 3.5a, the solver is Direct (UMFPACK), but in 4.0 the default is MUMPS. I am not an expert in these solvers so I may be using the wrong one, but I'm not sure where the initial condition problem arises.

Please see the attached file for COMSOL 4.0.

Let me know if more clarification is needed - thanks in advance.

Mark


8 Replies Last Post 2017年6月20日 GMT-4 12:54

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年7月23日 GMT-4 15:20
Here is another interesting wrinkle that may help in finding an answer. I am working with the modified COMSOL 3.5a example in version 3.5a. I had eliminated the 2D portion of the model to make the diffusion purely 1 dimensional. Call this model 1.

Model 1: PDE General Form (x 2), Diffusion (x 2) -> solves without issue

Next, I converted the diffusion physics modules to the basic PDE General Form and calculated basically the same answer (slightly, slightly off, not sure why). This is now Model 2.

Model 2: PDE General Form (x 4), Diffusion (x 0) -> solves without issue

Next, I took this Model 2 and converted it completely to 2D - basically expecting the same answer but I wanted to prove a point to myself that I could visualize profiles in a 2D surface plot (and yes, they won't be very exciting plots). This process is simply the effect of extruding the 1D geometry in a second dimension, so instead of line, there is now a square containing the three domains. However, now that I have translated the equations to 2D, the model does not solve and states "unable to find consistent initial values."

Puzzling...any ideas? I have attached the 2D model, call it Model 3.

Model 3: PDE General Form (x 4), Diffusion (x 0) -> does not solve
Here is another interesting wrinkle that may help in finding an answer. I am working with the modified COMSOL 3.5a example in version 3.5a. I had eliminated the 2D portion of the model to make the diffusion purely 1 dimensional. Call this model 1. Model 1: PDE General Form (x 2), Diffusion (x 2) -> solves without issue Next, I converted the diffusion physics modules to the basic PDE General Form and calculated basically the same answer (slightly, slightly off, not sure why). This is now Model 2. Model 2: PDE General Form (x 4), Diffusion (x 0) -> solves without issue Next, I took this Model 2 and converted it completely to 2D - basically expecting the same answer but I wanted to prove a point to myself that I could visualize profiles in a 2D surface plot (and yes, they won't be very exciting plots). This process is simply the effect of extruding the 1D geometry in a second dimension, so instead of line, there is now a square containing the three domains. However, now that I have translated the equations to 2D, the model does not solve and states "unable to find consistent initial values." Puzzling...any ideas? I have attached the 2D model, call it Model 3. Model 3: PDE General Form (x 4), Diffusion (x 0) -> does not solve


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年7月27日 GMT-4 10:45
Just curious if anybody had a chance to look into this. I think the "failed to find consistent initial values" error has to do with the applied current boundary condition on the right hand side boundary.

Let me know if you have any input or questions. Again, the same problem works in 1D, but not 2D.
Just curious if anybody had a chance to look into this. I think the "failed to find consistent initial values" error has to do with the applied current boundary condition on the right hand side boundary. Let me know if you have any input or questions. Again, the same problem works in 1D, but not 2D.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年10月27日 GMT-4 03:44
Hi Mark,

It is little bit late, I hope you are still checking this thread.

I am also working on modeling of lithium-ion batteries in Comsol. My purpose is to model it in a complete 3D geometry. So, your approach to eliminate the 2nd dimension in particle diffusion is very interesting for me. However, I cannot see your model, since I have COMSOL 3.5 installed only.

Can you please explain your purely 1D battery model in detail?

It would be great if you upload a 3.5 version of that model.

Thanks and Best Regards,
Özen
Hi Mark, It is little bit late, I hope you are still checking this thread. I am also working on modeling of lithium-ion batteries in Comsol. My purpose is to model it in a complete 3D geometry. So, your approach to eliminate the 2nd dimension in particle diffusion is very interesting for me. However, I cannot see your model, since I have COMSOL 3.5 installed only. Can you please explain your purely 1D battery model in detail? It would be great if you upload a 3.5 version of that model. Thanks and Best Regards, Özen

Rajeswaran Radhakrishnan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年4月20日 GMT-4 17:48
Hi Mark,

I am using comsol 3.5a for simulating Li ion battery.I am a new user ,so I am trying to redo the same model which is given in comsol already.But I get the following error,

Error:
Time 3.746334577378822:
Error in residual computation.
Power_of_negative
Function: ^
Failed_to_evaluate_variable
Variable: i0, Defined_as: (((k_pos*((c1max_pos-c1s_pos)^aA_pos))*(c1s_pos^aC_pos))*(c2^aA_pos))
Failed_to_evaluate_variable
Variable: i_loc, Defined_as: ((exp((((Far*aA_pos)*eta)/(Rg*T)))-exp(((((-aC_pos)*Far)*eta)/(Rg*T))))*i0)
Failed_to_evaluate_expression
Expression: d(((-K1eff*phi1x*test(phi1x)/L_pos-i_loc*Sa_pos*L_pos*test(phi1))-(0))*(dvol),{test@1})
Last time step is not converged.

Can you please help me out in this?

Thanks,

Rajeswaran.
Hi Mark, I am using comsol 3.5a for simulating Li ion battery.I am a new user ,so I am trying to redo the same model which is given in comsol already.But I get the following error, Error: Time 3.746334577378822: Error in residual computation. Power_of_negative Function: ^ Failed_to_evaluate_variable Variable: i0, Defined_as: (((k_pos*((c1max_pos-c1s_pos)^aA_pos))*(c1s_pos^aC_pos))*(c2^aA_pos)) Failed_to_evaluate_variable Variable: i_loc, Defined_as: ((exp((((Far*aA_pos)*eta)/(Rg*T)))-exp(((((-aC_pos)*Far)*eta)/(Rg*T))))*i0) Failed_to_evaluate_expression Expression: d(((-K1eff*phi1x*test(phi1x)/L_pos-i_loc*Sa_pos*L_pos*test(phi1))-(0))*(dvol),{test@1}) Last time step is not converged. Can you please help me out in this? Thanks, Rajeswaran.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年4月21日 GMT-4 08:14
Rajeswaran -

I think you are taking the square root (aA_pos = 0.5) of a negative number. For this model, it typically means the cell was completely charged or discharged and no more lithium can be stored into one of the electrodes - the "c1max_pos-c1s_pos" went negative - the cathode in your case. Check the i_app definition and make sure you have the correct values for i_disch and i_charge.

Mark
Rajeswaran - I think you are taking the square root (aA_pos = 0.5) of a negative number. For this model, it typically means the cell was completely charged or discharged and no more lithium can be stored into one of the electrodes - the "c1max_pos-c1s_pos" went negative - the cathode in your case. Check the i_app definition and make sure you have the correct values for i_disch and i_charge. Mark

Rajeswaran Radhakrishnan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年4月21日 GMT-4 14:49
Hi Mark,

Thank you for your reply.

I was trying to redo the same model which is given in the model library.
But I couldnt get the results.
I tried by changing the i_app definition also.But it is not working for me.

Can you please help me in it?

Thank You,

Rajeswaran.
Hi Mark, Thank you for your reply. I was trying to redo the same model which is given in the model library. But I couldnt get the results. I tried by changing the i_app definition also.But it is not working for me. Can you please help me in it? Thank You, Rajeswaran.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年7月11日 GMT-4 06:27
Hallo All...
I am new with comsol 3.5a..
I am going to simulate the Lithium ion battery .. but the problem is that I dont have an example of Lithium Ion battery in my installed comsol 3.5a.. I would be thank full if some one send me the Example of lithium ion battery in version 3.5a..
Thank

Umar
Hallo All... I am new with comsol 3.5a.. I am going to simulate the Lithium ion battery .. but the problem is that I dont have an example of Lithium Ion battery in my installed comsol 3.5a.. I would be thank full if some one send me the Example of lithium ion battery in version 3.5a.. Thank Umar

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 2017年6月20日 GMT-4 12:54
Hi

I am facing the same problem,if you already solve this can help me
?

thank you
Hi I am facing the same problem,if you already solve this can help me ? thank you

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.