n GetPageOffset(el) {
  var x = el.offsetLeft;
  var y = el.offsetTop;
  if (el.offsetParent != null) {
    var pos = GetPageOffset(el.offsetParent);
    x += pos.x;
    y += pos.y;
  }
  return {x: x, y: y};
}

function GetPageOffsetRight(el) {
  return GetPageOffsetLeft(el) + el.offsetWidth;
}

function GetPageOffsetBottom(el) {
  return GetPageOffsetTop(el) + el.offsetHeight;
}

// Get the y position scroll offset.
function GetScrollTop(win) {
  // all except Explorer
  if ("pageYOffset" in win) {
    return win.pageYOffset;
  }
  // Explorer 6 Strict Mode
  else if ("documentElement" in win.document &&
           "scrollTop" in win.document.documentElement) {
    return win.document.documentElement.scrollTop;
  }
  // other Explorers
  else if ("scrollTop" in win.document.body) {
    return win.document.body.scrollTop;
  }

  return 0;
}

// Get the x position scroll offset.
function GetScrollLeft(win) {
  // all except Explorer
  if ("pageXOffset" in win) {
    return win.pageXOffset;
  }
  // Explorer 6 Strict Mode
  else if ("documentElement" in win.document &&
           "scrollLeft" in win.document.documentElement) {
    return win.document.documentElement.scrollLeft;
  }
  // other Explorers
  else if ("scrollLeft" in win.document.body) {
    return win.document.body.scrollLeft;
  }

  return 0;
}

//------------------------------------------------------------------------
// String utilities
//------------------------------------------------------------------------
// Do html escaping
var amp_re_ = /&/g;
var lt_re_ = /</g;
var gt_re_ = />/g;

// Convert text to HTML format. For efficiency, we just convert '&', '<', '>'
// characters.
// Note: Javascript >= 1.3 supports lambda expression in the replacement
// argument. But it's slower on IE.
// Note: we can also implement HtmlEscape by setting the value
// of a textnode and then reading the 'innerHTML' value, but that
// that turns out to be slower.
// Params: str: String to be escaped.
// Returns: The escaped string.
function HtmlEscape(str) {
  if (!str) return "";
  return str.replace(amp_re_, "&amp;").replace(lt_re_, "&lt;").
    replace(gt_re_, "&gt;").replace(quote_re_, "&quot;");
}

/** converts html entities to plain text.  It covers the most common named
 * entities and numeric entities.
 * It does not cover all named entities -- it covers &{lt,gt,amp,quot,nbsp}; but
 * does not handle some of the more obscure ones like &{ndash,eacute};.
 */
function HtmlUnescape(<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <meta name="date" content="2015-03-15 19:55:56-04:00"><title>14.18.&nbsp;Reduced-Order Modeling for State-Space Matrices Export</title><link rel="stylesheet" type="text/css" href="gifplayer.css"><link rel="stylesheet" type="text/css" href="viewer.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="ansys.theory.html" title="Mechanical APDL Theory Reference"><link rel="up" href="thy_tool.html" title="Chapter&nbsp;14:&nbsp;Analysis Tools"><link rel="prev" href="thy_tool16.html" title="14.17.&nbsp;Energies"><link rel="next" href="str_EnMoinStAn.html" title="14.19.&nbsp;Enforced Motion in Structural Analysis"><script type="text/javascript"><!--
function toggleElementDisplay (id) {
  var elem = document.getElementById(id);
  if (elem.style.display != "block") {
    elem.style.display = "block";
  } else {
    elem.style.display = "none";
  }
}
//--></script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" title="14.18.&nbsp;Reduced-Order Modeling for State-Space Matrices Export"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="thystatespacemat"></a>14.18.&nbsp;Reduced-Order Modeling for State-Space Matrices Export</h2></div></div></div><p>The n second order modal equations (<a class="xref" href="thy_tool9.html#thyeq21superpositionnov2101" title="(14&#8211;118)"><i>Equation&nbsp;14&#8211;118</i></a>) are transformed into 2n first
order equations, where n is input as <em class="replaceable"><code>NMODE</code></em> on the <a href="../ans_cmd/Hlp_C_SPMWRITE.html" class="olink"><span class="command"><strong>SPMWRITE</strong></span></a> command, using the following
coordinate transformation:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e380938.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;306)</b></p></td></tr></table><p>The equation becomes:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381021.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;307)</b></p></td></tr></table><p>[A] is a (2n x 2n) state-space matrix defined by:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381076.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;308)</b></p></td></tr></table><p>Where &#969;<sub>j</sub> is the frequency of mode
j, &#958;<sub>j</sub> is the effective modal damping of
mode j (see <a class="xref" href="thy_tool9.html#eltmoddamp" title="14.9.4.&nbsp;Modal Damping"><i>Modal Damping</i></a>), and {F} is the vector of
input forces:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381477.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;309)</b></p></td></tr></table><p>Where ninput is the number of scalar input forces derived from <em class="replaceable"><code>Inputs</code></em> on the <a href="../ans_cmd/Hlp_C_SPMWRITE.html" class="olink"><span class="command"><strong>SPMWRITE</strong></span></a> command.</p><p>[B] is a (2n x ninput) state-space matrix defined by:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381576.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;310)</b></p></td></tr></table><p>With</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381632.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;311)</b></p></td></tr></table><p>Where [&#934;] is the matrix of eigenvectors and [F<sub>u</sub>] is a unit force matrix with size (ndof x ninput).
It has 1 at the degrees of freedom where input forces are active and
0 elsewhere.</p><p>Now that the states {z} have been expressed as a function of
the input loads, the equation for the degrees of freedom observed
(outputs {w}) is written as:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381688.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;312)</b></p></td></tr></table><p>[C] is a (3*noutput x 2*n) state-space matrix, where noutput
is derived from <em class="replaceable"><code>Outputs</code></em> on the <a href="../ans_cmd/Hlp_C_SPMWRITE.html" class="olink"><span class="command"><strong>SPMWRITE</strong></span></a> command, and is defined by:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381832.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;313)</b></p></td></tr></table><p>with</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e381979.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;314)</b></p></td></tr></table><p>[U<sub>u</sub>] is a unit displacement matrix with
size (noutput x ndof). It has 1 on degrees of freedom where output
is requested and 0 elsewhere. </p><p>[D] is a (3*noutput x ninput) state-space matrix defined by:</p><table width="100%"><colgroup><col width="95%" align="center"><col width="5%" align="right"></colgroup><tr><td align="center"><div><img src="graphics/md0e382031.svg"></div></td><td nowrap="yes" align="right" valign="middle"><p class="title"><b>(14&#8211;315)</b></p></td></tr></table><p><span class="inlineequation" style="&#xA;        vertical-align:-5.000000px"><img src="graphics/md0e382103.svg"></span> and <span class="inlineequation" style="&#xA;        vertical-align:-5.000000px"><img src="graphics/md0e382123.svg"></span> are included only if <em class="replaceable"><code>VelAccKey</code></em> = ON on the <a href="../ans_cmd/Hlp_C_SPMWRITE.html" class="olink"><span class="command"><strong>SPMWRITE</strong></span></a> command,
otherwise the last two rows of [C] are not written and [D] is zero
so it is not written.</p></div><hr><p class="legalfooter"><small><i>Release 16.1 - &copy; SAS IP, Inc. All rights reserved.</i></small></p></body></html>