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.

Inserting mathematical expressions under reaction field

Niladri Sekhar Manadal

Please login with a confirmed email address before reporting spam

I want to insert a differential equation in the reaction section as a function of concentration. The physics is "Transport of Dilute Species". The reaction is concentration dependent.

Every time I attempt to do so, I get a message saying syntax error. Can someone please clarify how to insert a mathematical equation under the reaction tab when the reaction is in mol/cm^3.


3 Replies Last Post May 20, 2020, 11:18 a.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago May 14, 2020, 11:44 a.m. EDT

Can you attach your mph file, or at least tell us what expression you tried entering?

Jeff

-------------------
Jeff Hiller
Can you attach your mph file, or at least tell us what expression you tried entering? Jeff

Niladri Sekhar Manadal

Please login with a confirmed email address before reporting spam

Posted: 5 years ago May 19, 2020, 7:34 p.m. EDT
Updated: 5 years ago May 19, 2020, 8:22 p.m. EDT

I am trying to provide an equation which looks like the following

Can I provide this equation in the global definitions? Or do I need to enter it by defining a PDE using the math module?

Thank you.

I am trying to provide an equation which looks like the following R_2 = K \frac {dc_2}{dt} Can I provide this equation in the global definitions? Or do I need to enter it by defining a PDE using the math module? Thank you.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago May 20, 2020, 11:18 a.m. EDT
Updated: 5 years ago May 20, 2020, 6:19 p.m. EDT

Yes, you should be able to enter an expression like that for your reaction term. The issue is likely one of syntax or scope of the variables involved. In particular, you mention that you are trying to use global definitions, but I doubt that c2 has a global scope, i.e. c2 is, I presume, defined at the Component level in your file.

Best,

Jeff

-------------------
Jeff Hiller
Yes, you should be able to enter an expression like that for your reaction term. The issue is likely one of syntax or scope of the variables involved. In particular, you mention that you are trying to use global definitions, but I doubt that c2 has a global scope, i.e. c2 is, I presume, defined at the Component level in your file. Best, Jeff

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.