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.

What's the meaning of this error?

Please login with a confirmed email address before reporting spam

Undefined value found.
- Detail: Undefined value found in the stiffness matrix.
There are 50197 equations giving NaN/Inf in the matrix rows for the variable mod1.theta
at coordinates: (0,0), (0,1e-007), (0,2e-007), (6.51016e-008,1.67803e-007), (1.30203e-007,1.35606e-007), ...
and similarly for the degrees of freedom, NaN/Inf in the matrix columns

ps: theta is a dependent variable

Thank you !

9 Replies Last Post 2 août 2012, 13:40 UTC−4
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 22 janv. 2011, 01:57 UTC−5
Hi

For me this means you still have some missing BC's and your system is not fulle defined

--
Good luck
Ivar
Hi For me this means you still have some missing BC's and your system is not fulle defined -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 janv. 2011, 10:43 UTC−5

Hi

For me this means you still have some missing BC's and your system is not fulle defined

--
Good luck
Ivar


Hi Ivar, Thank you for your answer!
There is only one domain (a square) in my model, and the boundary conditions are all Zero Flux, what do you mean of missing BCs?
And, what do you mean for my system is not fully defined? I have set the BCs for all of the boundaries, given the initial condition to the domain, what did the model lack?

ps: I found the coordinates are on or near the boundaries
[QUOTE] Hi For me this means you still have some missing BC's and your system is not fulle defined -- Good luck Ivar [/QUOTE] Hi Ivar, Thank you for your answer! There is only one domain (a square) in my model, and the boundary conditions are all Zero Flux, what do you mean of missing BCs? And, what do you mean for my system is not fully defined? I have set the BCs for all of the boundaries, given the initial condition to the domain, what did the model lack? ps: I found the coordinates are on or near the boundaries

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 22 janv. 2011, 12:42 UTC−5
Hi

COSMOL is set up to solve only coherent BVP so if there are NaNs mostly it is because your equations or Boundary Conditions are not sufficient to make an unique solution, or to define unambiguously the system

--
Good luck
Ivar
Hi COSMOL is set up to solve only coherent BVP so if there are NaNs mostly it is because your equations or Boundary Conditions are not sufficient to make an unique solution, or to define unambiguously the system -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mai 2012, 10:49 UTC−4
I just had the same problem and after a long and tedious debugging process, I found out that the problem was re-defining a variable using units in Matlab.

After saving the mph file as an m file, I have a variable defined as:

model.param.set('alfa', '3.3e4[ohm^-1*m^-1]', 'atenuation');

Later, in a sub-function on my matlab script, I save the value as oldAlfa and set alfa to zero:

oldAlfa=str2double(model.param.get('alfa'));
model.param.set('alfa',0);

After some process (that doesn't involves alfa neither oldAlfa, I reset the old value for alfa:

model.param.set('alfa',[ num2str(oldAlfa,'%6.3e') '[ohm^-1*m^-1]']);

Everything runs fine until the script passes a second time through this sub-function. Then it shows the same error as Xiaoyi Yu says.

The way I handle it was by removing the physical units ('[ohm^-1*m^-1]') in the previous command.

It will be nice if somebody explain us why is this happening.

Cheers,
--
Felipe
I just had the same problem and after a long and tedious debugging process, I found out that the problem was re-defining a variable using units in Matlab. After saving the mph file as an m file, I have a variable defined as: model.param.set('alfa', '3.3e4[ohm^-1*m^-1]', 'atenuation'); Later, in a sub-function on my matlab script, I save the value as oldAlfa and set alfa to zero: oldAlfa=str2double(model.param.get('alfa')); model.param.set('alfa',0); After some process (that doesn't involves alfa neither oldAlfa, I reset the old value for alfa: model.param.set('alfa',[ num2str(oldAlfa,'%6.3e') '[ohm^-1*m^-1]']); Everything runs fine until the script passes a second time through this sub-function. Then it shows the same error as Xiaoyi Yu says. The way I handle it was by removing the physical units ('[ohm^-1*m^-1]') in the previous command. It will be nice if somebody explain us why is this happening. Cheers, -- Felipe

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 2 mai 2012, 17:22 UTC−4
Hi

I have not fiddled COMSOL with Matlab since the arrival of v4, no need averytrhing can be done within COMSOL ;) (for me)
but if I read you correctly you are using alpa as a parameter, but for an equation or a parametric sweep "parameter". If it's for the latter then you should avoid units, in up to 4.2a solver sweep parameters should be unitless.

If this is not the case, I would suspect its the 4.0 issue, get hands on a more up to date version, you will be less frustrated, check with your system admin our your local rep

--
Good luck
Ivar
Hi I have not fiddled COMSOL with Matlab since the arrival of v4, no need averytrhing can be done within COMSOL ;) (for me) but if I read you correctly you are using alpa as a parameter, but for an equation or a parametric sweep "parameter". If it's for the latter then you should avoid units, in up to 4.2a solver sweep parameters should be unitless. If this is not the case, I would suspect its the 4.0 issue, get hands on a more up to date version, you will be less frustrated, check with your system admin our your local rep -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 mai 2012, 10:00 UTC−4
Hi Ivar,

Thanks for your answer. So far I've only used comsol 4.2a, and now I have installed the current latest version (4.2.1.166).

For my model 'alfa' is the conductivity of my PMLs , so its a parameter and (most of the time) is constant.

Some times, when my script finds out the founded eigenvalue does not represents a guided mode (RF module), it calls a subfunctions that "turns off" the PMLs (by setting alfa to zero), finds the effective refractive index and uses it as a target to search modes around this value after resetting alfa (as I explain in my previous post).

So, in conclusion, its not a parametric variable, it is just a parameter that changes only under very specific circumstances.
--
Felipe
Hi Ivar, Thanks for your answer. So far I've only used comsol 4.2a, and now I have installed the current latest version (4.2.1.166). For my model 'alfa' is the conductivity of my PMLs , so its a parameter and (most of the time) is constant. Some times, when my script finds out the founded eigenvalue does not represents a guided mode (RF module), it calls a subfunctions that "turns off" the PMLs (by setting alfa to zero), finds the effective refractive index and uses it as a target to search modes around this value after resetting alfa (as I explain in my previous post). So, in conclusion, its not a parametric variable, it is just a parameter that changes only under very specific circumstances. -- Felipe

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 3 mai 2012, 10:28 UTC−4
Hi

clear if you define it already as an integer then you do not need any uncertainty limit and the mod(1) is one good way ;)

--
Good luck
Ivar
Hi clear if you define it already as an integer then you do not need any uncertainty limit and the mod(1) is one good way ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 juil. 2012, 05:32 UTC−4
Re: how can we find pull-in voltage of silicon diaphragm?
Re: how can we find pull-in voltage of silicon diaphragm?

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 2 août 2012, 13:40 UTC−4
Hi

It should be describd in the doc as an example (not sure where I read it now) but one way is to solve for a increasing voltage sweep and see when the system collapses or the solver fails, which is rather close to the pull in point, when you increas the voltage gently

--
Good luck
Ivar
Hi It should be describd in the doc as an example (not sure where I read it now) but one way is to solve for a increasing voltage sweep and see when the system collapses or the solver fails, which is rather close to the pull in point, when you increas the voltage gently -- Good luck 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.