Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Nov 5, 2014, 3:32 a.m. EST
I guess the problem is not in Comsol. Your initial condition ∂a/∂t (at t=0 ) = 0 makes a(t=0) = f(308K). But the numerical integration cannot start as the time derivative is initially zero. Try a small number like 0.001 instead. I do not know if you have to explicitly define also the initial condition of a.
Good luck
Lasse
I guess the problem is not in Comsol. Your initial condition ∂a/∂t (at t=0 ) = 0 makes a(t=0) = f(308K). But the numerical integration cannot start as the time derivative is initially zero. Try a small number like 0.001 instead. I do not know if you have to explicitly define also the initial condition of a.
Good luck
Lasse
Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Nov 5, 2014, 5:19 a.m. EST
Hi,
This error message means that a variable somewhere is defined in terms of itself. It cannot be seen directly from your equations. It is more a matter of how you have implemented them.
Using an example from structural mechanics, we sometimes see this error in the following context:
The constitutive law (built into the Linear Elastic material) is
stress = E*strain
It a user tries to enter a variable in the text field for E, say 'my_E', defined as
my_E = 2E11 - 1E3*stress,
then this error will be triggered, since the stress implicitly defines itself. A substitution will give
stress = (2E11 - 1E3*stress)*strain
The symbolic algebra machinery detects this, and issues the error message.
There are two types of remedies:
1. Reformulate your expressions. This works in most cases. In the case above, the equivalent expression
my_E = 2E11/(1+1E3*strain)
would work.
2. If this type of dependency is really necessary, then there are more sophisticated ways of dealing with it. The basic idea is to use an intermediate variable, which does not provide a circular dependency. This technique is explained in the Model Library example stress_dependent_elasticity.
www.comsol.com/model/modeling-stress-dependent-elasticity-14441
Regards,
Henrik
Hi,
This error message means that a variable somewhere is defined in terms of itself. It cannot be seen directly from your equations. It is more a matter of how you have implemented them.
Using an example from structural mechanics, we sometimes see this error in the following context:
The constitutive law (built into the Linear Elastic material) is
stress = E*strain
It a user tries to enter a variable in the text field for E, say 'my_E', defined as
my_E = 2E11 - 1E3*stress,
then this error will be triggered, since the stress implicitly defines itself. A substitution will give
stress = (2E11 - 1E3*stress)*strain
The symbolic algebra machinery detects this, and issues the error message.
There are two types of remedies:
1. Reformulate your expressions. This works in most cases. In the case above, the equivalent expression
my_E = 2E11/(1+1E3*strain)
would work.
2. If this type of dependency is really necessary, then there are more sophisticated ways of dealing with it. The basic idea is to use an intermediate variable, which does not provide a circular dependency. This technique is explained in the Model Library example stress_dependent_elasticity.
http://www.comsol.com/model/modeling-stress-dependent-elasticity-14441
Regards,
Henrik
Please login with a confirmed email address before reporting spam
Posted:
7 years ago
Jun 6, 2017, 7:32 a.m. EDT
Hi Henrik,
I tried to use the alternative method you suggest, to create an intermediate variable, unsuccessfully. I need to use the Moving Mesh method in 2D, using as prescibed deformation dx = ux and dy = uy, i.e. the gradient of the solution. When I do this, the circular variable dependency triggers: could you please suggest a solution?
Regards
Antonino
Hi Henrik,
I tried to use the alternative method you suggest, to create an intermediate variable, unsuccessfully. I need to use the Moving Mesh method in 2D, using as prescibed deformation dx = ux and dy = uy, i.e. the gradient of the solution. When I do this, the circular variable dependency triggers: could you please suggest a solution?
Regards
Antonino