Figure 2. Block triangularization of mod2pend

Figure 1. Sigma of mod2pend DAE

More methods for obtaining structural analysis result


The script below performs SA on mod2pend DAE (formulation encoded in mod2pend.m)

G = 9.81; L = 10; alpha = 0.1; n = 6; 
sadata = daeSA(@mod2pend, n, G, L, alpha);


Its formulation is here.​ We illustrate more "get" and "print" methods for obtaining its SA result, using sa_mod2pend.m.


Sigma = getSigma(sadata)

  • returns signature matrix Sigma of a DAE


​Example:  Sigma = getSigma(sadata)

Sigma =
     2  -Inf     0  -Inf  -Inf  -Inf
     1     2     0  -Inf  -Inf  -Inf
     0     0  -Inf  -Inf  -Inf  -Inf
  -Inf  -Inf  -Inf     2  -Inf     0
  -Inf  -Inf  -Inf  -Inf     3     0
  -Inf  -Inf     2     0     0  -Inf


[p, q, cb, fb] = getBTF(sadata)

  • returns row and column permutation vectors p and q, and coarse and fine

block boundaries cb and fb, resp.

  • SigPerm = Sigma(p,q) is put into a block triangular form (BTF).
  • ​SigPerm(cb(i):cb(i+1)-1, cb(i):cb(i+1)-1) is the ith diagonal block in coarse BTF.
  • ​SigPerm(fb(i):fb(i+1)-1, fb(i):fb(i+1)-1) is the ith diagonal block in fine BTF.


Example: [p,q,cb,fb] = getBTF(sadata)
SigPerm = Sigma(p,q)

​p =
     5     4     6     3     2     1
q =
     5     6     4     1     2     3
cb =
     1     4     7
fb =
     1     2     3     4     7
SigPerm =
     3     0  -Inf  -Inf  -Inf  -Inf
  -Inf     0     2  -Inf  -Inf  -Inf
     0  -Inf     0  -Inf  -Inf     2
  -Inf  -Inf  -Inf     0     0  -Inf
  -Inf  -Inf  -Inf     1     2     0
  -Inf  -Inf  -Inf     2  -Inf     0


Explanations:

  • In BTF, the ordering of equation indices is p=(5,4,6,3,2,1), and that of variable indices is q=(5,6,4,1,2,3).
  • By cb, the coarse diagonal blocks are SigPerm(1:3,1:3) and SigPerm(4:6,4:6).
  • By fb, the fine diagonal blocks are SigPerm(1,1), SigPerm(2,2), SigPerm(3,3), and SigPerm(4:6,4:6).


[c, d, cl, dl] = getOffsets(sadata)

  • returns global offsets c and d, and local (fine) offsets cl and dl.


Example:[c,d,cl,dl] = getOffsets(sadata)

c =
     4     4     6     0     0     2
d =
     6     6     4     2     3     0

cl =
     0     0     2     0     0     0
dl =
     2     2     0     0     3     0


Explanations:

  • Refer to the offsets annotated on the right and at the bottom of Figure 1.
  • The permuted offsets in Figure 2 can be obtained by c(p), cl(p) and d(q), dl(q). See getBTF.

[cql, fql] = getQLdata(sadata)

  • returns quasi-linearity data of each coarse and fine block, resp.
  • cql(l)=1 means the ith​ coarse block is quasi-linear (QL); otherwise it is non-quasi-linear (NQL).
  • fql(l)=1 means the ith​ fine block is QL; otherwise it is NQL.
  • ​​By "quasilinear" we mean the highest-order derivatives in a block occur linearly.


Example: [cql,fql] = getQLdata(sadata)

​cql =
     0     1
fql =
     0     1     0     1


Explanations:

  • Coarse blocks 1 and 2 are NQL and QL, resp.
  • Fine blocks 1:4 are NQL, QL, NQL, QL, resp.
  • Block 1 is NQL because v''' (i.e., x_5''') occurs nonlinearly in f_5.
  • Block 3 is NQL because u (i.e., x_4) occurs nonlinearly in f_6. 


printInitData(sadata)

  • prints variables and derivatives that need initial values.
  • printInitData(sadata, 'varnames', vars)replaces default variable name x by given names vars


Example: vars = {'x','y','lam','u','v','mu'};

printInitData(sadata,'varnames',vars)

mod2pend problem
---------------------------------------------------------------------------
Initialization summary:
x, x', y, y', u, v, v', v'', v'''


Explanation: These printed variables and derivatives need initial values for integrating this DAE.


printConstr(sadata)

  • prints equations that comprise the set of constraints.
  • printConstr(sadata, 'fcnnames', fcns) replaces default function name f by given names fcns


​Example: printConstr(sadata,'fcnnames','f_')
mod2pend problem
---------------------------------------------------------------------------
Constraints:
f_1, f_1', f_1'', f_1''', f_2, f_2', f_2'', f_2''', f_3, f_3', f_3'', 
f_3''', f_3'''', f_3^(5), f_5, f_6, f_6', f_6''


Explanation: These printed equations and their derivatives comprise the constraints of this DAE.


printSolScheme(sadata)

  • prints a solution scheme using a Taylor series method. This scheme is both stage-by-stage and block-by-block.
  • ​An optional call is printSolScheme(sadata, 'varnames', vars, 'fcnnames', fcns) 


​Example: vars = {'x','y','lam','u','v','mu'};

printSolScheme(sadata,'varnames',vars,'fcnnames','f_')

Compact solution scheme for 'mod2pend' problem
---------------------------------------------------------------------------
Initialization summary:
x, x', y, y', u, v, v', v'', v'''
---------------------------------------------------------------------------
k = -6: ~[f_3] : x, y
k = -5:  [f_3'] : x', y'
k = -4:  [f_1, f_2, f_3''] : x'', y'', lam
k = -3:  [f_1', f_2', f_3'''] : x''', y''', lam'
         [] : v
k = -2:  [f_1'', f_2'', f_3''''] : x'''', y'''', lam''
        ~[f_6] : u
         [] : v'
k = -1:  [f_1''', f_2''', f_3^(5)] : x^(5), y^(5), lam'''
         [f_6'] : u'
         [] : v''
k =  0:  [f_1'''', f_2'''', f_3^(6)] : x^(6), y^(6), lam''''
         [f_6''] : u''
         [f_4] : mu
        ~[f_5] : v'''


Explanation: See block solution scheme.


© Gary Guangning Tan, 2015