CmaExample.dml
<xml version="1.0" standalone="no"?>
<!DOCTYPE DAVEfunc SYSTEM "/Users/bjax/Documents/Dev/DAVE/Schemas/trunk/validation_lab/DAVEfunc.dtd">
<DAVEfunc>
 
<!--             ==========================                 -->
<!--=============  File Header Components  ===============  -->
<!--             ==========================                 -->
<fileHeader>

  <!--  This is an example of the file header components of the 
         derivative of Cm as a function of angle of attack.  It must
	 remembered that all fileheader components of all functions 	
	 in the file must be grouped together into one file header 	
	 area.

         Also note that there is not much information in this header,
         Mainly because it is mean to be a simple example.  In
         reality, probably the most important information is the
         author, the reference and the modification record, because
         these data describe where the data came from and if it has
         been changed (and how).  See annex B for more complete
         examples.
 -->

  <author name="Bruce Hildreth" org="SAIC" email="bruce.hildreth@saic.com"/>
  <fileCreationDate date="2006-03-18"/>
  <description>
    This is made up data to use as an example of a simple gridded function.
  </description>
  <reference refID="BLHRpt1" author="Joe Smith" 
	     title="A Generic Aircraft Simulation Model (does not really exist)" 
	     accession="ISBN 1-2345-678-9" date="2004-01-01"/>

 <!-- no modifications so far, so we don't need a modificationRecord yet -->

</fileHeader>

<!--             ==================================                 -->
<!--=============  Variable Definition Components  ===============  -->
<!--             ==================================                 -->

 <!-- Input variable -->
 
 <variableDef name="Angle of attack" varID="angleOfAttack_d" units="deg" >
   <isStdAIAA/> <!-- Indicates that this variable is a standard
		     variable, which is why the author omitted
		     description and sign convention 
		     and any other info. (it certainly could
		     be included here)                             -->
 </variableDef>

 <!-- Output (function value) -->

 <variableDef name="Pitching moment coefficient due to angle of attack"
	      varID="CmAlfa" units="nondimensional" sign="+ANU">
   <description>
     The derivative of total pitching moment with respect to
     angle of attack.  
  </description>
 </variableDef>
 
 <!--             =============================                 -->
 <!--=============  Breakpoint Definition Set  ===============  -->
 <!--             =============================                 -->
 
 <breakpointDef bpID="angleOfAttack_d_bp1">

   <!--  
     Note that the bpID can be any name for the breakpoints.  The
     author here chose to use a name related to the independent
     variable that is expected to be used to look up the function.  In
     fact, if this set of breakpoints were shared by many functions
     and different independent variables would be used to look up the
     function, then the bpID of "angleOfAttack_d_BP1" would be
     misleading and a more generic name like "AOA" would probably be
     better.
   -->

   <description>
     Angle of attack breakpoint set for CmAlfa, CdAlfa, and ClAlfa
   </description>

   <bpVals>    <!--  Always comma separated values  -->
     0, 18, 19, 20, 22, 23, 25, 27, 90
   </bpVals>	
 
 </breakpointDef>

 <!--             =============================                -->
 <!--=============  Gridded Table Definition   =============== -->
 <!--             =============================                -->

 <griddedTableDef gtID="CmAlfa_Table1">
   <description>
     The derivate of Cm wrt fuselage AOA in degrees
   </description>

   <provenance>
     <author name="Jake Smith" org="AlCorp"/>
     <functionCreationDate date="2006-12-31"/>
     <documentRef refID="BLHRpt1" />  <!--  This points back to the Header, 
					    which provides the information
					    about BLHRpt1. -->
   </provenance>

   <breakpointRefs>
     <bpRef bpID="angleOfAttack_d_bp1" />
   </breakpointRefs>

   <uncertainty effect="percentage">
     <normalPDF numSigmas="3">
       <bounds>12</bounds>
     </normalPDF>
     <!--  This means that the 3 sigma confidence is +-12% on the Data. --> 
   </uncertainty>
 
   <dataTable>		<!--  Always comma separated values -->
     0.1,-0.1,-0.09, -.08, -0.05, -0.05, -0.07, -0.15, -0.6
   </dataTable>

 </griddedTableDef>
 
 <!--             ========================                -->
 <!--=============  Function Definition   =============== -->
 <!--             ========================                -->

 <!-- The function definition ties together input and output variables
      to table definitions. This allows a level of abstraction such
      that the table, with it's breakpoint definitions, can be reused
      by several functions (such as left and right aileron or multiple
      thruster effect tables). 
 -->

 <function name="Cm_alpha_func">
   <description>
     Variation of pitching moment coefficient with angle of attack (example)
   </description>
   <independentVarRef varID="angleOfAttack_d"/>
   <dependentVarRef varID="CmAlfa"/>
   <functionDefn>
     <griddedTableRef gtID="CmAlfa_Table1"/>
   </functionDefn>
 </function>

 <!--             =====================                -->
 <!--=============  Check Data Cases   =============== -->
 <!--             =====================                -->

 <!-- Checkcase data provides automatic verification of the model by
      specifying the tolerance in output values for a given set of
      input values. One 'staticShot' is required per input/output
      mapping; in this case for a single input, single output model,
      we have a single input signal and a single output signal in each
      test point. 
 -->

 <checkData>
   <staticShot name="case 1">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue> 0.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>0.01</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 2">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue> 5.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>0.04444</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 3">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue>10.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>-0.01111</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 4">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue>15.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>-0.06667</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 5">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue>20.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>-0.08</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 6">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue>25.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>-0.07</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
   <staticShot name="case 7">
     <checkInputs>
       <signal>
	 <signalID>angleOfAttack_d</signalID>							
	 <signalValue>50.</signalValue>
       </signal>
     </checkInputs>
     <checkOutputs>
       <signal>
	 <signalID>CmAlfa</signalID>
	 <signalValue>-0.31429</signalValue>
	 <tol>0.00001</tol>
       </signal>
     </checkOutputs>
   </staticShot>
 </checkData>
</DAVEfunc>