Difference between revisions of "XML Input Files for NairnFEA"
Jump to navigation
Jump to search
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Input <tt>XML</tt> files for [[NairnFEA]] must conform to the definition on this page. | |||
__TOC__ | |||
== FEA Input XML File Definition == | |||
<table | All <tt>XML</tt> input command files for FEA calculationsin [[NairnFEA]] must conform to the following document definition including order of all <tt>XML</tt> elements. This template lists only the top-level 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 <tt>XMlL</tt> files is given in the <tt>DTD</tt> file provided in the source code files at <tt>NairnFEA/input/NairnFEA.dtd</tt>. | ||
<table cellspacing="0" border="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;"> | |||
<?xml version='1.0'?> | <?xml version='1.0'?> | ||
<!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" | <!DOCTYPE JANFEAInput SYSTEM "NairnFEA.dtd" | ||
Line 11: | Line 16: | ||
]> | ]> | ||
</pre></td> | </pre></td> | ||
<td>XML | <td style="padding-left:10px;">XML declaration[[#Notes|<sup>1,2</sup>]]</td> | ||
</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;"> | |||
<JANFEAInput version='3'> | <JANFEAInput version='3'> | ||
</pre></td> | </pre></td> | ||
<td> | <td style="padding-left:10px;">Top level element[[#Notes|<sup>3</sup>]]</td> | ||
</tr> | </tr> | ||
< | <tr> | ||
<td style="border-left:thin dashed blue;border-right:thin dashed blue;"> | |||
< | <pre style="border-style:none;margin:0px;padding:0px 10px;"> | ||
<Header> | <Header> | ||
( Analysis | Description | Output | Select | DevelFlag ) | ( Analysis | Description | Output | ||
| Select | DevelFlag ) | |||
</Header> | </Header> | ||
</pre></td> | |||
<td style="padding-left:10px;">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 | ( Keypoints, Path, Area ) | ||
or | |||
( NodeList, ElementList) | |||
</Mesh> | |||
</pre></td> | |||
<td style="padding-left:10px;">The mesh can be generated (with keypoints, paths and areas) or explicit, but not both</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;"> | |||
<BMP>…</BMP> | |||
<Region>…</Region> | |||
<Hole>…</Hole> | |||
</pre></td> | |||
<td style="padding-left:10px;">These blocks used when [[Create a Mesh with Images and Shapes|creating a mesh with images and shapes]]</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;"> | |||
<Material> | |||
( property commands ) | |||
</Material > | |||
</pre></td> | |||
<td style="padding-left:10px;">Define each material in a separate <tt>Material</tt> block</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;"> | |||
<GridBCs> | |||
( Cracktip ) | |||
( DisplacementBCs | LoadBCs | EdgeBCs | |||
| BCLine | BCPt | Periodic ) | |||
( Resequence ) | |||
</GridBCs> | |||
</pre></td> | |||
<td style="padding-left:10px;">Define all boundary conditions[[#Notes|<sup>4</sup>]]</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;"> | |||
<Thermal> | |||
( Temperature, StressFreeTemp) | |||
</Thermal> | |||
</pre></td> | |||
<td style="padding-left:10px;">Optional</td> | |||
</tr> | |||
<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;"> | |||
</JANFEAInput> | </JANFEAInput> | ||
</pre> | </pre></td> | ||
<td style="padding-left:10px;"> </td> | |||
</tr> | |||
</table> | |||
== Sample Input XML File == | |||
Click this link to see a [[Sample FEA Input Command File#XML 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. | |||
# if the optional <tt>CrackTip</tt> and <tt>Resequence</tt> commands are used, they must be first and last, respectively, in the <tt>GridBCs</tt> element. The rest of the subordinate commands can be in any order. |
Latest revision as of 23:06, 14 January 2014
Input XML files for NairnFEA must conform to the definition on this page.
FEA Input XML File Definition
All XML input command files for FEA calculationsin NairnFEA must conform to the following document definition including order of all XML elements. This template lists only the top-level 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 XMlL files is given in the DTD file provided in the source code 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> |
One Analysis is required. |
<Mesh> ( Keypoints, Path, Area ) or ( NodeList, ElementList) </Mesh> |
The mesh can be generated (with keypoints, paths and areas) or explicit, but not both |
<BMP>…</BMP> <Region>…</Region> <Hole>…</Hole> |
These blocks used when creating a mesh with images and shapes |
<Material> ( property commands ) </Material > |
Define each material in a separate Material block |
<GridBCs> ( Cracktip ) ( DisplacementBCs | LoadBCs | EdgeBCs | BCLine | BCPt | Periodic ) ( Resequence ) </GridBCs> |
Define all boundary conditions4 |
<Thermal> ( Temperature, StressFreeTemp) </Thermal> |
Optional |
</JANFEAInput> |
Sample Input XML File
Click this link to see a sample XML FEA input command file for analysis of an end-loaded cantilever beam.
Notes
- 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.
- All input commands are in the top-level <JANFEAInput> element. The version attribute is option, but might be used in the future.
- if the optional CrackTip and Resequence commands are used, they must be first and last, respectively, in the GridBCs element. The rest of the subordinate commands can be in any order.