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.
Posted 16 mar 2012, 12:06 GMT-4 Low-Frequency Electromagnetics, Materials, Mesh, Parameters, Variables, & Functions, Results & Visualization, Studies & Solvers Version 4.2a 2 Replies
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.
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 17 mar 2012, 05:32 GMT-4