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.

Don't Understand...

Please login with a confirmed email address before reporting spam

Hello!

I'm quite new to Comsol 4.2. I want to model a set of 4 PDEs (Variables: C_g, C_s, T_g, T_s) in the "Coefficient Form"-PDE-Mode. when I want to solve the system, I get this error which I don'T understand.Is the text in the "Subexpression"-field the part where I made a mistake?

Syntax error in expression.
- Expression: -((0)*mod1.C_gtt+(0)*mod1.C_stt+(0)*mod1.T_gtt+(0)*mod1.T_stt+(0)*mod1.C_gt+(1-epsilon)*mod1.C_st+(0)*mod1.T_gt+(0)*mod1.T_st+(0)*mod1.C_g+(0)*mod1.C_s+(0)*mod1.T_g+(0)*mod1.T_s+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)-(-beta*A_spez*(C_s-C_g)-3*rho_Kat*(k0*exp(-Ea/(R_uni*T_s)))*C_s)))*test(mod1.C_s)-(((0+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)+(mod1.C_g)*(0)+(mod1.C_s)*(0)+(mod1.T_g)*(0)+(mod1.T_s)*(0)-(0)))*(test(mod1.C_sx)))
- Subexpression: )*test(mod1
- Position: 308
Error in multiphysics compilation.

Regards
Till Henrich

1 Reply Last Post 17.11.2011, 10:46 GMT-5
COMSOL Moderator

Hello Till Henrich

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17.11.2011, 10:46 GMT-5
Hello Till,

It looks to me as though you have and extra ")" in your equation. The error message: "Subexpression: )*test(mod1" is trying to tell you that the ")" infront of "*test(mod1" does not have a partner! I copied your expression into another program's script editor, which keeps track of parantheses, and it indicates that there's an extra ")" as well.

The extra ")" was marked by a ► in my script editor.

-((0)*mod1.C_gtt+(0)*mod1.C_stt+(0)*mod1.T_gtt+(0)*mod1.T_stt+(0)*mod1.C_gt+(1-epsilon)*mod1.C_st+(0)*mod1.T_gt+(0)*mod1.T_st+(0)*mod1.C_g+(0)*mod1.C_s+(0)*mod1.T_g+(0)*mod1.T_s+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)-(-beta*A_spez*(C_s-C_g)-3*rho_Kat*(k0*exp(-Ea/(R_uni*T_s)))*C_s))►)*test(mod1.C_s)-(((0+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)+(mod1.C_g)*(0)+(mod1.C_s)*(0)+(mod1.T_g)*(0)+(mod1.T_s)*(0)-(0)))*(test(mod1.C_sx)))

-Steve
Hello Till, It looks to me as though you have and extra ")" in your equation. The error message: "Subexpression: )*test(mod1" is trying to tell you that the ")" infront of "*test(mod1" does not have a partner! I copied your expression into another program's script editor, which keeps track of parantheses, and it indicates that there's an extra ")" as well. The extra ")" was marked by a ► in my script editor. -((0)*mod1.C_gtt+(0)*mod1.C_stt+(0)*mod1.T_gtt+(0)*mod1.T_stt+(0)*mod1.C_gt+(1-epsilon)*mod1.C_st+(0)*mod1.T_gt+(0)*mod1.T_st+(0)*mod1.C_g+(0)*mod1.C_s+(0)*mod1.T_g+(0)*mod1.T_s+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)-(-beta*A_spez*(C_s-C_g)-3*rho_Kat*(k0*exp(-Ea/(R_uni*T_s)))*C_s))►)*test(mod1.C_s)-(((0+(0)*(mod1.C_gx)+(0)*(mod1.C_sx)+(0)*(mod1.T_gx)+(0)*(mod1.T_sx)+(mod1.C_g)*(0)+(mod1.C_s)*(0)+(mod1.T_g)*(0)+(mod1.T_s)*(0)-(0)))*(test(mod1.C_sx))) -Steve

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.