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.

Changing the predefined equations in COMSOL /adding more variable in the equation

Please login with a confirmed email address before reporting spam

Is there any feature to change the predefined equations present in any module (in my case the battery module) to edit the predefined equations to add extra variables in the predefined equation ?

If not how else u can do the same task of adding an extra variable to the predefined equations ?

In my case I want to add an extra stress variable to the concentration equation for the active particle in porous electrode.
Any one can help me out for the same ?

Best Regards,
Utsav

5 Replies Last Post 04.03.2013, 07:08 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.07.2012, 13:13 GMT-4
Hi

it's possible, at least for some equations see the "preferences equation view", you have also the "physics builder" (I still need to understand that one better. Or just writing from scratch math equations. In anycase you must ensure you system is complete, and that is often difficult if you just tweak a few COSMOL equations, not knowing exactly if you need to update others deeper down

--
Good luck
Ivar
Hi it's possible, at least for some equations see the "preferences equation view", you have also the "physics builder" (I still need to understand that one better. Or just writing from scratch math equations. In anycase you must ensure you system is complete, and that is often difficult if you just tweak a few COSMOL equations, not knowing exactly if you need to update others deeper down -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.08.2012, 08:07 GMT-4
Thanks Ivar

I have an additional doubt; if anyone can help me out on this. For those who are aware with the battery module can help me out. For the general modeling of battery, we have some predefined equations. Similarly, for pore wall flux for Li ions we have a separate form predefined. Now, if I intend to change (adding) some term to this Li ion flux term how can I do it. There is an urgent requirement so, it would be nice if someone helps me out on this.

Thanks in advance
Utsav
Thanks Ivar I have an additional doubt; if anyone can help me out on this. For those who are aware with the battery module can help me out. For the general modeling of battery, we have some predefined equations. Similarly, for pore wall flux for Li ions we have a separate form predefined. Now, if I intend to change (adding) some term to this Li ion flux term how can I do it. There is an urgent requirement so, it would be nice if someone helps me out on this. Thanks in advance Utsav

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.08.2012, 11:17 GMT-4
Hi,


Yes, you can. Use the source term (typically called f or Q, etc..) and feed your own terms. Of course, it is important that you check that this extra term is dimensionally consistent and the sign is correct, because f is on the right hand side. This is just one way.

For example, let us say you want to add an extra gradient term, grad(u), on the right hand side, then in the source term, f, you simply type:

d(u,x)+d(u,y)

To deviate a bit, in geomechanics, we do not couple stresses with flow, instead we couple rate of change of volumetric strain with appropriate coefficients. So what I usually do then is add a source term with the following definition: coeff*d(solid.evol,TIME), where solid.evol is the volumetric strain available as an internal variable and coeff being some appropriate coefficient.

I do not know batteries, hence cannot be of much help.

The other way is that you build it from the PDE form all over - this is what I do when things are complex. Sometimes, I directly go to the appropriate variables from the equation view and make a change and click refresh equations. But when you do such things you have to be 100% sure you know what you are doing.

Hope this helps.



Suresh
Hi, Yes, you can. Use the source term (typically called f or Q, etc..) and feed your own terms. Of course, it is important that you check that this extra term is dimensionally consistent and the sign is correct, because f is on the right hand side. This is just one way. For example, let us say you want to add an extra gradient term, grad(u), on the right hand side, then in the source term, f, you simply type: d(u,x)+d(u,y) To deviate a bit, in geomechanics, we do not couple stresses with flow, instead we couple rate of change of volumetric strain with appropriate coefficients. So what I usually do then is add a source term with the following definition: coeff*d(solid.evol,TIME), where solid.evol is the volumetric strain available as an internal variable and coeff being some appropriate coefficient. I do not know batteries, hence cannot be of much help. The other way is that you build it from the PDE form all over - this is what I do when things are complex. Sometimes, I directly go to the appropriate variables from the equation view and make a change and click refresh equations. But when you do such things you have to be 100% sure you know what you are doing. Hope this helps. Suresh

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.08.2012, 12:28 GMT-4
Thanks Suresh,

I guess I'll try the first one; starting from the scratch would be again very complex in itself as there are good amount of equation predefined. Though if first one doesn't turn out to be not good enough then I would use that. Anyways, very thankful for your reply :)

Best
Utsav
Thanks Suresh, I guess I'll try the first one; starting from the scratch would be again very complex in itself as there are good amount of equation predefined. Though if first one doesn't turn out to be not good enough then I would use that. Anyways, very thankful for your reply :) Best Utsav

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.03.2013, 07:08 GMT-5

Hi,


Yes, you can. Use the source term (typically called f or Q, etc..) and feed your own terms. Of course, it is important that you check that this extra term is dimensionally consistent and the sign is correct, because f is on the right hand side. This is just one way.

For example, let us say you want to add an extra gradient term, grad(u), on the right hand side, then in the source term, f, you simply type:

d(u,x)+d(u,y)

To deviate a bit, in geomechanics, we do not couple stresses with flow, instead we couple rate of change of volumetric strain with appropriate coefficients. So what I usually do then is add a source term with the following definition: coeff*d(solid.evol,TIME), where solid.evol is the volumetric strain available as an internal variable and coeff being some appropriate coefficient.

I do not know batteries, hence cannot be of much help.

The other way is that you build it from the PDE form all over - this is what I do when things are complex. Sometimes, I directly go to the appropriate variables from the equation view and make a change and click refresh equations. But when you do such things you have to be 100% sure you know what you are doing.

Hope this helps.



Suresh


[QUOTE] Hi, Yes, you can. Use the source term (typically called f or Q, etc..) and feed your own terms. Of course, it is important that you check that this extra term is dimensionally consistent and the sign is correct, because f is on the right hand side. This is just one way. For example, let us say you want to add an extra gradient term, grad(u), on the right hand side, then in the source term, f, you simply type: d(u,x)+d(u,y) To deviate a bit, in geomechanics, we do not couple stresses with flow, instead we couple rate of change of volumetric strain with appropriate coefficients. So what I usually do then is add a source term with the following definition: coeff*d(solid.evol,TIME), where solid.evol is the volumetric strain available as an internal variable and coeff being some appropriate coefficient. I do not know batteries, hence cannot be of much help. The other way is that you build it from the PDE form all over - this is what I do when things are complex. Sometimes, I directly go to the appropriate variables from the equation view and make a change and click refresh equations. But when you do such things you have to be 100% sure you know what you are doing. Hope this helps. Suresh [/QUOTE]

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.