Difference between revisions of "XML Input Files for NairnMPM"

From OSUPDOCS
Jump to navigation Jump to search
(Created page with "All <tt>XML</tt> input command files for MPM calculations must begin with an <tt>XML</tt> declaration, an optional document type declaration, and the main input file tag and e...")
 
Line 1: Line 1:
All <tt>XML</tt> input command files for MPM calculations must begin with an <tt>XML</tt> declaration, an optional document type declaration, and the main input file tag and end with the corresponding closing tags. For MPM calculations, the global file structure is:
Input <tt>XML</tt> files for [[NairnMPM]] must conform to the definition on this page.
__TOC__
== FEA Input XML File Definition ==


<pre>
All <tt>XML</tt> input command files for MPM calculations in [[NairnMPM]] 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 MPM input <tt>XMlL</tt> files is given in the <tt>DTD</tt> file provided in the source code files at <tt>NairnMPM/input/NairnMPM.dtd</tt>.
 
<table cellspacing="0" border="0">
 
<tr>
<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;NairnMPM.dtd&quot;
&lt;!DOCTYPE JANFEAInput SYSTEM &quot;NairnMPM.dtd&quot;
[
[
   &lt;!ENTITY maxtime &quot;1e-03&quot;&gt;
   &lt;!ENTITY force &quot;100&quot;&gt;
  &lt;!ENTITY width &quot;100&quot;&gt;
]&gt;
]&gt;
</pre></td>
<td style="padding-left:10px;">XML declaration[[#Notes|<sup>1,2</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;">
&lt;JANFEAInput version='3'&gt;
&lt;JANFEAInput version='3'&gt;
  ...
</pre></td>
  (XML Command to define the calculation)
<td style="padding-left:10px;">Top level element[[#Notes|<sup>3</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;">
  <Header>
    ( Analysis | Description | DevelFlag )
  </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;">
  <MPMHeader>
    ( MatlPtsPerElement | Cracks | MPMMethod | TimeStep
    | TimeFactor | MaxTime | ArchiveTime | ArchiveRoot
    | MPMArchiveOrder | CrackArchiveOrder | ProgSteps
    | Damping | FeedbackDamping | GlobalArchiveTime
    | GlobalArchive | DefGradTerms | Diffusion
    | StressFreeTemp | FirstArchiveTime | GIMP |
    | LeaveLimit | MultiMaterialMode )
  </MPMHeader>
 
</pre></td>
<td style="padding-left:10px;">One <tt>MPMHeader</tt> has many options for MPM simulations methods, timing, and archiving.</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;">
  <Mesh>
    ( Keypoints, Path, Area )
        or
    ( NodeList, ElementList)
  </Header>
 
</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 | Region | Hole )
</pre></td>
<td style="padding-left:10px;">These are 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 )
 
</pre></td>
<td style="padding-left:10px;">Define each material in a separate element</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;">
&lt;/JANFEAInput&gt;
&lt;/JANFEAInput&gt;
</pre>
</pre></td>
<td style="padding-left:10px;">&nbsp;</td>
</tr>
 
</table>


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. This path is needed when you [[Running_MPM_Calculations|run the code]] with the validation option (<tt>-v</tt>), which is highly recommended. The required <tt>DTD</tt> file for MPM calculations is provided in the <tt>/input</tt> folder of the source code files.
== Sample Input XML File ==


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. For example, the above MPM file can use the entity <tt>&amp;maxtime;</tt> and it will be replaced with the text <tt>1e-03</tt>. Entities can define values that make it easier to read input <tt>XML</tt> files and easier to modify them for new calculations.
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.


The remainder of the file is included withing a <tt>JANFEAInput</tt> block. The <tt>version</tt> attribute is currently not needed, but may be important in the future. When input files are validated using the DTD file (as recommended), the sections must appear in the specified order 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.
== Notes ==


Click this link to see a [[Sample MPM Input Command FIle|sample XML MPM input command file]] for simulation of two colliding disks.
# 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 MPM 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 optional, but might be used in the future.

Revision as of 21:45, 14 January 2014

Input XML files for NairnMPM must conform to the definition on this page.

FEA Input XML File Definition

All XML input command files for MPM calculations in NairnMPM 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 MPM input XMlL files is given in the DTD file provided in the source code files at NairnMPM/input/NairnMPM.dtd.

<?xml version='1.0'?>
<!DOCTYPE JANFEAInput SYSTEM "NairnMPM.dtd"
[
  <!ENTITY force "100">
]>
XML declaration1,2
<JANFEAInput version='3'>
Top level element3
  <Header>
    ( Analysis | Description | DevelFlag )
  </Header>

One Analysis is required.
  <MPMHeader>
    ( MatlPtsPerElement | Cracks | MPMMethod | TimeStep
    | TimeFactor | MaxTime | ArchiveTime | ArchiveRoot
    | MPMArchiveOrder | CrackArchiveOrder | ProgSteps
    | Damping | FeedbackDamping | GlobalArchiveTime
    | GlobalArchive | DefGradTerms | Diffusion
    | StressFreeTemp | FirstArchiveTime | GIMP |
    | LeaveLimit | MultiMaterialMode )
  </MPMHeader>

One MPMHeader has many options for MPM simulations methods, timing, and archiving.
  <Mesh>
    ( Keypoints, Path, Area )
        or
    ( NodeList, ElementList)
  </Header>

The mesh can be generated (with keypoints, paths and areas) or explicit, but not both
  ( BMP | Region | Hole )
 
These are used when creating a mesh with images and shapes
  ( Material )

Define each material in a separate element
  <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

  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 MPM 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 optional, but might be used in the future.