0
votes

Solving system of constrained linear and non-linear equations in MATLAB

I'm solving a FEM problem in MATLAB with use of the direct stiffness method. The problem is now formulated as a system of non linear equations:

KU=F or CF=U with C = K^{-1}.

the problem is formulated in 3-Dd and has over 200 nodes. The model is used as a deformation estimator, the force is always the input and the deformation output. So there are a lot of linear equations. Now this problem needs to be extended, 2 types of constraints need to be implemented. Some of the nodes have to be constrained so that they only can move in a circular motion around a given point. And some of the nodes have to be bound with a maximum amount of deformation.

in total there will hundreds of equations of the form equations of the form:

a_1 X(1) + a_2 X(2) + ... - F(1) = 0

about 10 equality constraints of a nonlinear form like (could also be a sinusoid):

X(1)^2 + X(2)^2 = L

and 10 inequality constraints of the form:

X(1) < 30\pi/180

What is the best method to solve a nonlinear system of equations with constraints of this type simultaneously? Is it possible to use fsolve? Or fmincon? I've been looking into solvers but I can't find a solid conclusion on what solver can handle all these equation types at once and what would be most efficient in terms of computation time.

1

1 Answers

0
votes

Without knowing too much of your type of problem, you should have a look on more specific mathematical-optimisation tools, where you can write your "similar" constraints only once, decide to which dimensions do they apply, and the language then expand them accordingly.

For the solver-engine for non-linear problem I would suggest IPOPT. It's free and it has very good performances.

For the modelling tools, you have the choice between dedicated mathematical-optimisation packages, like GAMS or AMPL, or - more and more common nowadays - libraries that extend general-purposes languages into the domain of mathematical optimisation (in this second case I would suggest Pyomo for Python or JuML for Julia)