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.

need help on how to input the syntacs

Please login with a confirmed email address before reporting spam

Hello everyone.
I am a newbie on using COMSOL.
I would like to ask from someone who knows how to input the syntacs a command in COMSOL 3.5.
Right at the moment i am doing a study diffusion of moisture into a semi porous solid media and based on my literature reviews the diffusion coefficient of this semi porous solid media is dependent on temperature.
i have tried inputting the equation

Deff = 9.60 exp(-(4109.6/273+C))
It is the Deff that i would like to input as a function of Tenperature in Celsius represented by the variable C.
but an error occurs that tells me below as

Exception:
com.femlab.util.FlException: Syntax error in expression
Messages:
Syntax error in expression
- Expression: -9.60exp(-(4109.6/273+C)
- Variable: D_c_di
- Description: Diffusion coefficient c
- Subdomain: [1]


what i would like to ask if somebody could help me out how to input the syntax of this equation into the diffusion coefficient.
Thank you so much in advance for reading and the help extended.
god bless you.

Jonathan

3 Replies Last Post Jul 10, 2010, 11:33 a.m. EDT
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 Jun 28, 2010, 3:12 a.m. EDT
Hi


what if you try

Deff = 9.60 * exp(-(4109.6/273+C))

with an explicit " * " for the multiplication ?

Ivar
Hi what if you try Deff = 9.60 * exp(-(4109.6/273+C)) with an explicit " * " for the multiplication ? Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 6, 2010, 4:28 a.m. EDT
how to give a Sine wave input to a port.

when typed "4*sin(pi*t)" with time varying from 0 to 2 in steps of 0.2.........

its showing an error of non defined constant.

cAN you please tell me how to give an AC input to a port ?
how to give a Sine wave input to a port. when typed "4*sin(pi*t)" with time varying from 0 to 2 in steps of 0.2......... its showing an error of non defined constant. cAN you please tell me how to give an AC input to a port ?

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 Jul 10, 2010, 11:33 a.m. EDT
Hi

First "t" for time is only valid in transient solver mode (else t=0 in V4 at least).
Now, normally if you have a sinus excitation you are in the "harmonic load case" and you do a development of the equations in the harmonic weay, then you define mainly the amplitude and the frequency (or omega w=2*pi*freq check your application mode / physics) .

By changing frm static to transient to harmonic mode you change the equations somewhat too, see the v3.5a "Physics - Equation setting s ..." or better look it up in the doc

Have fun Comsoling
Ivar
Hi First "t" for time is only valid in transient solver mode (else t=0 in V4 at least). Now, normally if you have a sinus excitation you are in the "harmonic load case" and you do a development of the equations in the harmonic weay, then you define mainly the amplitude and the frequency (or omega w=2*pi*freq check your application mode / physics) . By changing frm static to transient to harmonic mode you change the equations somewhat too, see the v3.5a "Physics - Equation setting s ..." or better look it up in the doc Have fun Comsoling Ivar

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.