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.

Problem with coupling time derivatives from "Definitions" with ODE Physics.

Please login with a confirmed email address before reporting spam

Hello,

in general I want to solve following kind of time dependent differential equation in my model of an electrical machine:

i(t)= a(t) + b(t) + d/(dt)*i(t) +d/(dt)*c(t)

in the ODE table this equation would like:

i-a-b-it-ct=0

Comsol does now think, that "ct" is a new Variable. So I tried to do the derivation "d/(dt)*c(t)" in the normal definitions.

I picked a more simple example and disabled my whole model, just to test if the ODE works.
Follwing was defined in the "mod1-Definitions":

u = t
b = 2*d(u,t)

In the ODE Physics I defined:

i-u-b=0

the result is a graph:

i=2+t

which is right ofc.
When I change the time- operator in b to "TIME" like:

b=2*d(u,TIME),

the result is wrong because the derivation is zero. So I thought I have to use the "t"- operator in my model, if I want to couple equations of the "mod1-definitions" with the ODE- Physics.

But when I use my complete model with the electrical machines physics, I get the following error message:

"Time derivative only allowed with respect to mesh time.
- Expression: d(mod1.Az,t)"

So I tried to change "t" to "TIME" and check if the error still occurs. But it doesn't. The problem is now, that the "TIME"- operator didn't work properly in the easy example. So it wouldn't work in the big model either...


Is ODE maybe the wrong physic for this? Should I maybe define something in the "global Definitions"?

I'd be glad if you can help me.

Thanks in advance.



2 Replies Last Post Mar 17, 2012, 5:32 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 16, 2012, 12:27 p.m. EDT
Maybe I should add what the equation would look like when it got coupled with the definitions derivative
i(t)= a(t) + b(t) + d/(dt)*i(t) +d/(dt)*c(t)

in the ODE Physics:

i-a-b-it-d(c,t)=0

or with the "TIME" operator:

i-a-b-it-d(c,TIME)=0


Is there a different way to realize this?
Maybe I should add what the equation would look like when it got coupled with the definitions derivative i(t)= a(t) + b(t) + d/(dt)*i(t) +d/(dt)*c(t) in the ODE Physics: i-a-b-it-d(c,t)=0 or with the "TIME" operator: i-a-b-it-d(c,TIME)=0 Is there a different way to realize this?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 17, 2012, 5:32 a.m. EDT
I really have no idea how I can define/ solve a differential equation like:

i(t)= a(t) + b(t) + d/(dt)*i(t) +d/(dt)*c(t)

in COMSOL...


Does anybody know?
I really have no idea how I can define/ solve a differential equation like: i(t)= a(t) + b(t) + d/(dt)*i(t) +d/(dt)*c(t) in COMSOL... Does anybody know?

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.