Linear multipoint constraints (MPC)
An MPC relates nodal displacements. Unlike a support, it can make one node follow several others without fixing those nodes to ground. MKE-F supports homogeneous linear MPCs in static, modal and transient analysis.
Dependent and master DOFs
Each equation explicitly selects one dependent DOF and expresses it through master DOFs:
ud = Σ cjuj
For example, uy(3) = 0.5·uy(1) + 0.5·uy(2) makes the vertical displacement of node 3 equal to the average of the other two. It leaves ux(3) and any frame rotation unaffected. A master may itself depend on another MPC, provided the dependency graph has no cycles.
The local DOF codes are 1 = ux, 2 = uy, 3 = thetaZ. Truss 112 nodes have only the first two. Coefficients may be negative; when mixing translations and rotations, choose their units consistently.
Case-file record and editor
After an element section, add a repeatable mpc block: the equation count followed by records in this order:
depNode,depDOF,rhs,masterCount,node1,dof1,c1,...
mpc
1
3,2,0,2,1,2,0.5,2,2,0.5
This record is the averaging equation above. rhs must be zero in every analysis; nonzero prescribed displacements are not supported. Equation IDs follow record order across all MPC blocks.
In the preprocessor, open MPC constraints, click Add MPC, choose the dependent node and DOF, and add master rows with coefficients. The displayed equation and purple links identify the relationship; a circle marks the dependent node. Errors prevent export and calculation. Deleting a referenced node removes the entire equation; Undo restores the operation.
Combining MPCs with supports
- A dependent DOF cannot also be restrained by an SPC or dependent in another equation.
- Masters may be fixed: their displacement contribution is zero, but they still receive constraint forces.
- Unknown nodes/DOFs, repeated master DOFs, self references, cycles, nonfinite coefficients and records with all coefficients zero are rejected.
Zero coefficients are permitted alongside nonzero coefficients and do not create dependency edges. The directed form with unique dependent DOFs guarantees independent constraint rows; it does not guarantee a stable structure. The solver checks the reduced stiffness and mass matrices for remaining mechanisms and invalid systems.
Helper: a node on a member axis
Choose axis endpoints i, j and intermediate node k. All three nodes must be distinct; the endpoints must have nonzero separation, and k must lie inside the segment within perpendicular tolerance 1e−9·L.
ξ = ((xk − xi) · (xj − xi)) / L²
n · uk = (1 − ξ)n · ui + ξn · uj
Here n is the unit normal to the original axis. For a horizontal member this interpolates uy; for a vertical member it interpolates ux. An inclined member couples both components. Axial motion remains free. This relation admits rigid translation and infinitesimal rigid rotation.
The helper chooses the intermediate component with the largest absolute normal coefficient (ux on a tie), trying the other nonzero component if the first conflicts with existing constraints. If neither is available, it reports an error.
The result is an ordinary MPC, without a persistent geometric attachment. Moving nodes does not recalculate it. Recreate the equation when the intended axis or interpolation position changes.
Exact elimination in all three analyses
The solver combines SPCs and MPCs into a sparse transformation from independent coordinates q to the complete nodal vector:
u = Tq, Kr = TᵀKT, Mr = TᵀMT, Fr = TᵀF
It solves the static system, generalized eigenproblem or Newmark integration in these coordinates. Modes, velocities and accelerations are also reconstructed with T. Initial displacement and velocity must satisfy every SPC and MPC; incompatible values are rejected.
freeDOFs still means all DOFs not restrained by SPC. dependentDOFs lists MPC dependents in equation order; independentDOFs gives the actual solution coordinates. The original K and M, including consistent element mass, are retained. No penalty stiffness is added.
Constraint forces and signs
Each row of C represents uDependent − Σ c·uMaster = 0. After reconstructing the full solution, the solver separates the residual:
r = supportReactions + Cᵀλ
mpcForces = Cᵀλ, mpcMultipliers = λ
Use r = Ku − F in statics, r = Ma + Ku − F in the undamped transient analysis, and r = Kφ − ω²Mφ for a mode. Positive λ acts positively on the dependent DOF and contributes −c·λ to each master. For the averaging equation and λ = 10 N, the MPC forces are +10 N at node 3 and −5 N at nodes 1 and 2.
At a fixed master, the support reaction is the residual minus the MPC force. The legacy reactions field stores the full residual and must not be interpreted as support reactions alone. The postprocessor provides separate force layers, an equation selector and a transient λ history. Modal values use the stored eigenvector amplitude, not the visual deformation scale.
MPC models without releases export JSON v3. Time decimation applies to all histories; selected-DOF export filters nodal forces while retaining every equation multiplier. Models without MPCs or releases retain v1/v2. Releases use JSON v4 and private end rotations.
Examples and limits
Open CaseMPCFrame.txt in the preprocessor to inspect a loaded dependent DOF. Related cases cover modes, transient response and distributed loading. CaseMPCTruss.txt constrains the spurious transverse motion of an intermediate truss node.
addpath(pwd);
setup;
p = StructFEProblem(fullfile(pwd, 'examples', 'cases', 'CaseMPCFrame.txt'));
r = p.RunSelected();
disp(r.displacements);
disp(r.mpcMultipliers);
disp(r.supportReactions);
MPCs describe linear kinematic relationships. They do not implement contact, finite-rotation following, nonzero prescribed motion or element-end moment releases.
Implementation and verification
- buildConstraintTransform.m — validation, dependency ordering and sparse T;
- recoverConstraintForces.m — forces and residual decomposition;
- shared/mpc.js — browser validation and axis helper;
- test_mpc.m — independent multiplier/nullspace solutions, histories, error cases and refined-truss convergence.