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.

Syntax Error (COMSOL Multiphysics 4.4)

Please login with a confirmed email address before reporting spam

I'm trying to model 3 reactions using "Transfer of diluted species". I checked my reaction componants and they don't seem to have any syntax error.

This is the error message:

Syntax error in expression.

Expression: 0+(Kw1-Kw2×cH×cOH+kad×cHX-kai×cH×cX)

Subexpression: -kai×cH×cX

Position: 26

Error in multiphysics compilation



1 Reply Last Post 10 janv. 2023, 15:45 UTC−5
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 10 janv. 2023, 15:45 UTC−5
Updated: 2 years ago 10 janv. 2023, 15:50 UTC−5

Note: I looked at your file using Comsol 6.1, so your experience may be different. And I'm not sure if my note here will take care of all of the issues, but your many user-entered expressions seem to have hidden characters adjoining at least many of your minus signs and perhaps elsewhere. If you select any of your expressions and move along with them with the arrow keys (left or right), you can see an extra step (i.e., you have to hit an arrow key twice, yet the cursor moves only one character!) happen there, adjacent to at least some of your minus signs. I'm guessing you cut & pasted in these equations from some kind of document file that had hidden characters encoded into it, which you didn't notice. I encourage you to go through your .mph file and carefully check all your user-entered or pasted expressions for such hidden characters and get rid of them! Good luck.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Note: I looked at your file using Comsol 6.1, so your experience may be different. And I'm not sure if my note here will take care of all of the issues, but your many user-entered expressions seem to have *hidden characters* adjoining at least many of your minus signs and perhaps elsewhere. If you select any of your expressions and move along with them with the arrow keys (left or right), you can see an extra step (i.e., you have to hit an arrow key twice, yet the cursor moves only one character!) happen there, adjacent to at least some of your minus signs. I'm guessing you cut & pasted in these equations from some kind of document file that had hidden characters encoded into it, which you didn't notice. I encourage you to go through your .mph file and carefully check *all* your user-entered or pasted expressions for such hidden characters and get rid of them! Good luck.

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.