Difference between revisions of "XML Input Files for NairnFEA"

From OSUPDOCS
Jump to navigation Jump to search
Line 1: Line 1:
All <tt>XML</tt> input command files for FEA calculations must begin with an <code>XML</code> declaration, an optional document type declaration, and the main input file tag and end with the corresponding closing tags. For FEA calculations, the global file structure is:
All <tt>XML</tt> input command files for FEA calculations must conform to the following document definition including order of all <tt>XML</tt> elements. This template lists the main element and their next-level subordinate elements. For the subordinate elements, those separated by a vertical bar (|) mean any one of those elements in any order while those separated by commas mean in exactly that order. A more formal definition for FEA input files in given in the <tt>DTD</tt> file provided in the source files at <tt>NairnFEA/input/NairnFEA.dtd</tt>.
 
<table cellspacing="0" border="0">
<table cellspacing="0" cellpadding="0">


<tr>
<tr>
<td><pre style="border-style:none;">
<td style="border-top:thin dashed blue;border-left:thin dashed blue;border-right:thin dashed blue;">
<pre style="border-style:none;margin:0px;padding:0px 10px;">
&lt;?xml version='1.0'?&gt;
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE JANFEAInput SYSTEM &quot;NairnFEA.dtd&quot;
&lt;!DOCTYPE JANFEAInput SYSTEM &quot;NairnFEA.dtd&quot;
Line 11: Line 11:
]&gt;
]&gt;
</pre></td>
</pre></td>
<td>XML file start with optional entity</td>
<td style="padding-left:10px;">XML declaration[[#Notes|<sup>1,2</sup>]]</td>
</tr>
</tr>


<tr>
<tr>
<td><pre style="border-style:none;">
<td style="border-left:thin dashed blue;border-right:thin dashed blue;">
<pre style="border-style:none;margin:0px;padding:0px 10px;">
&lt;JANFEAInput version='3'&gt;
&lt;JANFEAInput version='3'&gt;
</pre></td>
</pre></td>
<td>This element encloses all input commands</td>
<td style="padding-left:10px;">Top level element[[#Notes|<sup>3</sup>]]</td>
</tr>
</tr>


</table>
<tr>
 
<td style="border-left:thin dashed blue;border-right:thin dashed blue;">
 
<pre style="border-style:none;margin:0px;padding:0px 10px;">
<pre>
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE JANFEAInput SYSTEM &quot;NairnFEA.dtd&quot;
[
  &lt;!ENTITY force &quot;100&quot;&gt;
]&gt;
&lt;JANFEAInput version='3'&gt;
 
   <Header>
   <Header>
     ( Analysis | Description | Output | Select | DevelFlag )
     ( Analysis | Description | Output | Select | DevelFlag )
   </Header>
   </Header></pre></td>
<td style="padding-left:10px;">The subordinate elements are in any order and one <tt>Analysis</tt> is required.</td>
</tr>


<tr>
<td style="border-left:thin dashed blue;border-right:thin dashed blue;">
<pre style="border-style:none;margin:0px;padding:0px 10px;">
   <Mesh>
   <Mesh>
     ( Keypoints, Path+, Area+ )
     ( Keypoints, Path, Area )
  (XML Commands to define the calculation)
        or
  ...
    ( NodeList, ElementList)
&lt;/JANFEAInput&gt;
  </Header></pre></td>
</pre>
<td style="padding-left:10px;">The mesh can be generated (with keypoints, paths and areas) or explicit, but not both.</td>
</tr>


The <tt>!DOCTYPE</tt> element defines the file type and has the <tt>SYSTEM</tt> option to provide a path to a Document Type Definition (or <tt>DTD</tt>) file. The path is needed when you [[Options for Running Calculations|run the code]] with the validation option (<tt>-v</tt>), which is highly recommended. The required <tt>DTD</tt> file for FEA calculations is provided in the <tt>/input</tt> folder of the source code files.
<tr>
<td style="border-left:thin dashed blue;border-right:thin dashed blue;border-bottom:thin dashed blue">
<pre style="border-style:none;margin:0px;padding:0px 10px;">
&lt;/JANFEAInput&gt;;
</pre></td>
<td style="padding-left:10px;">&nbsp;</td>
</tr>


The <tt>!DOCTYPE</tt> element can define any number of entities. These entities can be used elsewhere in the text of the <tt>XML</tt> file and they will be replaced by the text in the entity definition. Entities can define values that make it easier to read input <tt>XML</tt> files and easier to modify them for new calculations.
</table>


The remainder of the file is included within a <tt>JANFEAInput</tt> block. The <tt>version</tt> attribute is currently not needed, but may be important in the future. To be consistent with the document definition in the <tt>DTD</tt> file, all elements with the <tt>JANFEAInput</tt> block must be entered in the ordered defined in the [[#toc|table of contents]] on this page. Elements that are not used can be omitted, but all needed elements must be in that specific order.
Click this link to see a [[Sample FEA Input Command File|sample XML FEA input command file]] for analysis of an end-loaded cantilever beam.


Click this link to see a [[Sample FEA Input Command File|sample XML FEA input command file]] for analysis of an end-loaded cantilever beam.
== Notes ==
 
# The <tt>!DOCTYPE</tt> element defines the file type and has the <tt>SYSTEM</tt> option to provide a path to a Document Type Definition (or <tt>DTD</tt>) file. The path is needed when you [[Options for Running Calculations|run the code]] with the validation option (<tt>-v</tt>), which is highly recommended. The required <tt>DTD</tt> file for FEA calculations is provided in the <tt>/input</tt> folder of the source code files.
# The <tt>!DOCTYPE</tt> element can define any number of entities. These entities can be used elsewhere in the text of the <tt>XML</tt> file and they will be replaced by the text in the entity definition. Entities can define values that make it easier to read input <tt>XML</tt> files and easier to modify them for new calculations.
# All input commands are in the top-level <JANFEAInput> element. The <tt>version</tt> attribute is option, but might be used in the future.

Revision as of 08:06, 15 September 2013

All XML input command files for FEA calculations must conform to the following document definition including order of all XML elements. This template lists the main element and their next-level subordinate elements. For the subordinate elements, those separated by a vertical bar (|) mean any one of those elements in any order while those separated by commas mean in exactly that order. A more formal definition for FEA input files in given in the DTD file provided in the source files at NairnFEA/input/NairnFEA.dtd.

<?xml version='1.0'?>
<!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd"
[
  <!ENTITY force "100">
]>
XML declaration1,2
<JANFEAInput version='3'>
Top level element3
  <Header>
    ( Analysis | Description | Output | Select | DevelFlag )
  </Header>
The subordinate elements are in any order and one Analysis is required.
  <Mesh>
    ( Keypoints, Path, Area )
        or
    ( NodeList, ElementList)
  </Header>
The mesh can be generated (with keypoints, paths and areas) or explicit, but not both.
</JANFEAInput>;
 

Click this link to see a sample XML FEA input command file for analysis of an end-loaded cantilever beam.

Notes

  1. The !DOCTYPE element defines the file type and has the SYSTEM option to provide a path to a Document Type Definition (or DTD) file. The path is needed when you run the code with the validation option (-v), which is highly recommended. The required DTD file for FEA calculations is provided in the /input folder of the source code files.
  2. The !DOCTYPE element can define any number of entities. These entities can be used elsewhere in the text of the XML file and they will be replaced by the text in the entity definition. Entities can define values that make it easier to read input XML files and easier to modify them for new calculations.
  3. All input commands are in the top-level <JANFEAInput> element. The version attribute is option, but might be used in the future.