The variable definition element

The variableDef element is used to define each constant, parameter, or variable used within or generated by the defined subsystem model. It contains attributes including the variable name (used for documentation), an XML-unique varID identifier (used for automatic code generation), the units of measure of the variable, and optional axis system, sign convention, alias, and symbol declarations. Optional sub-elements include a description and a mathematical description, in MathML 2 markup, of the calculations needed to derive the variable from other variables or function table outputs. A final optional sub-element, isOutput, serves to indicate an intermediate calculation that should be brought out to the rest of the simulation.

There must be a single variableDef for each and every input, output or intermediate constant or variable within the DAVEfunc model.

    variableDef+ : name, varID, units, [axisSystem, sign, alias, symbol]
	description? :
            (description character data)
	calculation? :
	    math (defined in mathML2.0 DTD) :
	isOutput? :
          

variableDef attributes:

name

A UNICODE name for the table (may be same as gtID.

varID

An XML-legal name that is unique within the file

units

The units-of-measure for the signal.

axsiSystem

An optional brief indicator of the axis system (body, inertial, etc.) in which the signal is measured

sign

An optional brief indicator of which direction is considered positive (+RWD, +UP, etc.)

symbol

A UNICODE Greek symbol for the signal [to be superceded with more formal MathML or Tex element in a later release]

varID

An XML-legal name that is unique within the file

variableDef sub-elements:

description

An optional text description of the variable

calculation

An optional container for the the MathML markup that describes how this variable is calculated from other variables or function table outputs. This element contains a single math element which is defined in the MathML 2 markup language.

isOutput

This optional element, if present, identifies this variable needs to be passed as an output. How this is accomplished is up to the implementer. Unless specified by this element, a variable is considered an output only if it is the result of a calculation or function AND is not used elsewhere in this DAVEfunc model.

Example�2.�Two examples of variableDef elements defining input signals

<!--                          ==========================                          -->
<!-- =========================   VARIABLE DEFINITIONS   ========================= -->
<!--                          ==========================                          -->


      <!-- ================== -->
      <!--  Input variables   -->
      <!-- ================== -->

  <variableDef name="Mach"1 varID="XMACH"2 units="" symbol="M">
    <description> 3
	Mach number (dimensionless) 
    </description>
  </variableDef>

  <variableDef name="dbfll" varID="DBFLL" units="deg"4 sign="ted"5 symbol="&#x3B4;bfll"6>
    <description>
	Lower left body flap deflection, deg, +TED (so deflections are
	always zero or positive).
    </description>
  </variableDef>
	    
1

The name attribute is intended for humans to read, perhaps as the signal name in an automated wiring diagram.

2

The varID attribute is intended for the processing application to read. This must be an XML-valid identifier and must be unique within this model.

3

The description element may be used in an automated data dictionary entry associated with the name attribute.

4

The optional units attribute describes the units of measure of the variable. See the section on Conventions below for a recommended list of units-of-measure abbreviations.

5

The optional sign attribute describes the sign convention that applies to this variable. In this case, the lower-left body-flap is positive when with trailing-edge-down deflection. See the section on Conventions below for a recommended list of sign abbreviations.

6

The optional symbol attribute allows a UNICODE character string that might be used for this variable in a symbols listing.

In this example, two input variables are defined: XMACH and DBFLL. These two variables are inputs to a table lookup function shown in example [FIXME] below.

Example�4.�A more complete example using a calculation element

<!--    lower left body flap lift buildup -->
  <variableDef name="CLdbfll" varID="CLBFLL" units="">
    <description>
	Lift contribution of lower left body flap deflection
	CLdbfll = CLdbfll_0 + alpha*(CLdbfll_1 + alpha*(CLdbfll_2 + alpha*CLdbfll_3)) 1
    </description>
    <calculation>  2
      <math>
	<apply>  3
	  <plus/>
	  <ci>CLBFLL0</ci>
	  <apply>
	    <times/>
	    <ci>ALP</ci>
	    <apply>
	      <plus/>
	      <ci>CLBFLL1</ci>
	      <apply>
		<times/>
		<ci>ALP</ci>
		<apply>
		  <plus/>
		  <ci>CLBFLL2</ci>
		  <apply>
		    <times/>
		    <ci>ALP</ci>
		    <ci>CLBFLL3</ci>
		  </apply> <!--            a*c3   -->  4
		</apply> <!--        (c2 + a*c3)  -->
	      </apply> <!--        a*(c2 + a*c3)  -->
	    </apply> <!--    (c1 + a*(c2 + a*c3)) -->
	  </apply> <!--    a*(c1 + a*(c2 + a*c3)) -->
	</apply> <!-- c0 + a*(c1 + a*(c2 + a*c3)) -->
      </math>
    </calculation>
  </variableDef>
	    
1

This FORTRANish equation is simply for human readers and is not parsed by the processing application.

2

A calculation element always embeds a MATHML-2 math element.

3

Each apply tag pair surrounds a math operation (in this example, a plus) opertor) and the arguments to that operation (in this case, a variable CLBFLL defined elsewhere is added to the results of the nested apply operation).

4

The comments here are useful for humans to understand how the equation is being built up; the processing application doesn't use these comments.

Here the local variable CLBFLL is defined as a calculated quantity, based on several other input or local variables (not shown). Note the description element is used to describe the equation, in FORTRANish human-readable text. The calculation element describes this same equation in MathML 2 syntax; this portion should be used by parsing applications to create either source code, documentation, or run-time calculation structures.