Skip to content

How to fix NotPosDef error

epsi1on edited this page Apr 10, 2020 · 1 revision

NotPosDef error happens when stiffness matrix is not Positive Definite! Usual cause is instability of model, and usually there is a node in the model that is not connected to any element, also it is not Fixed to ground so it can freely move and makes the model unstable. To see what DoF or node is so, user can use a class named PosdefChecker in namespace BriefFiniteElementNet.Validation:

using BriefFiniteElementNet.Controls;
using BriefFiniteElementNet.Validation;
using BriefFiniteElementNet;

...

PosdefChecker.CheckModel(model, LoadCase.DefaultLoadCase);

The method return type is void. It will write the result into the Model.Trace. To see the trace, we should use a TraceListener. PosdefChecker.CheckModel(Model model,LoadCase lc) have a parameter of type LocaCase because it is possible that model be not stable in a specific LoadCase (because of MPC elements that are applied in specific load cases). Here are two examples:


If you are working with a Console project without GUI:

model.Trace.Listeners.Add(new ConsoleTraceListener());
PosdefChecker.CheckModel_mpc(model, LoadCase.DefaultLoadCase);

ConsoleTraceListener output


If you are working with a WPF project:

var listener = new BriefFiniteElementNet.Controls.WpfTraceListener();
model.Trace.Listeners.Add(listener);
PosdefChecker.CheckModel_mpc(model, LoadCase.DefaultLoadCase);
listener.ShowDialog();

WpfTraceListener output

Clone this wiki locally