Difference between revisions of "XML Input Files for NairnFEA"
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 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: | ||
<table> | <table rowspacing="0"> | ||
<tr> | <tr> | ||
<td> | <td><pre style="border-style:none;"> | ||
<pre | |||
<?xml version='1.0'?> | <?xml version='1.0'?> | ||
<!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" | <!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" | ||
Line 10: | Line 10: | ||
<!ENTITY force "100"> | <!ENTITY force "100"> | ||
]> | ]> | ||
</pre> | </pre></td> | ||
<td>XML file start with optional entity</td> | <td>XML file start with optional entity</td> | ||
</tr> | </tr> | ||
<t> | |||
<td><pre style="border-style:none;"> | |||
<JANFEAInput version='3'> | |||
</pre></td> | |||
<td>This element encloses all input commands</td> | |||
</tr> | |||
</table> | </table> | ||
Revision as of 07:29, 15 September 2013
All XML input command files for FEA calculations must begin with an XML
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:
<?xml version='1.0'?> <!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" [ <!ENTITY force "100"> ]> |
XML file start with optional entity |
<JANFEAInput version='3'> |
This element encloses all input commands |
<?xml version='1.0'?> <!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" [ <!ENTITY force "100"> ]> <JANFEAInput version='3'> <Header> ( Analysis | Description | Output | Select | DevelFlag ) </Header> <Mesh> ( Keypoints, Path+, Area+ ) (XML Commands to define the calculation) ... </JANFEAInput>
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.
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.
The remainder of the file is included within a JANFEAInput block. The version attribute is currently not needed, but may be important in the future. To be consistent with the document definition in the DTD file, all elements with the JANFEAInput block must be entered in the ordered defined in the 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 XML FEA input command file for analysis of an end-loaded cantilever beam.