Difference between revisions of "XMLData Command"

From OSUPDOCS
Jump to navigation Jump to search
(Created page with "The <tt>XMLData</tt> command inserts raw <tt>XML</tt> data into command-interpretation results. __TOC__ == Introduction == As the NairnMPM and NairnFEA code engines d...")
 
Line 19: Line 19:
* <tt>(section)</tt> indicates the section where the XML data will be inserted (if it is omitted, it is set to "End"). The possible sections are:
* <tt>(section)</tt> indicates the section where the XML data will be inserted (if it is omitted, it is set to "End"). The possible sections are:
** "DocType" to insert within square braces ("[ ... ]") in the <tt>DocType</tt> specification.
** "DocType" to insert within square braces ("[ ... ]") in the <tt>DocType</tt> specification.
** "Header" to insert at the end of the Header section.
** "Header" to insert at the end of the <tt><Header></tt> section.
** "MPMHeader" to insert at the end of the MPMHeader section (MPM Only).
** "MPMHeader" to insert at the end of the <tt><MPMHeader></tt> section (MPM Only).
** "Mesh" to insert at the end of the Mesh section.
** "Mesh" to insert at the end of the <tt><Mesh></tt> section.
** "MaterialPoints" to insert in the MaterialPoints definition section. It may be interspersed with [[Region Command|Region]], Hole, and BMPRegion commands (MPM Only).
** "MaterialPoints" to insert in the <tt><MaterialPoints></tt> definition section. It may be interspersed with Region, Hole, and BMPRegion commands (MPM Only).
** "Materials" to insert a custom material definition along with other materials. Each insertion for this section must define a single [[Material Models|material]] (see [[#Notes|below]])
** "Materials" to insert a custom material along with other materials. Each insertion for this section must define a single [[Material Models|material]] (see [[#Notes|below]])
** "GridBCs" to insert in the GridBCs section. it may be interspersed with of grid boundary conditions.
** "GridBCs" to insert in the <tt><GridBCs></tt> section. it may be interspersed with of grid boundary conditions.
** "ParticleBCs" to insert in the ParticleBCs section. it may be interspersed with of particle boundary conditions (MPM Only).
** "ParticleBCs" to insert in the <tt><ParticleBCs></tt> section. it may be interspersed with of particle boundary conditions (MPM Only).
** "Thermal" to insert at the end of the Thermal section.
** "Thermal" to insert at the end of the <tt><Thermal></tt> section.
** "End" to insert at the end of all other XML data.
** "End" to insert at the end of all other <tt>XML</tt> data.
* <tt>(id)</tt> specifies a material ID whenever <tt>(section)</tt> is "Materials" (see [[#Notes|below]])
* <tt>(id)</tt> specifies a material ID whenever <tt>(section)</tt> is "Materials" (see [[#Notes|below]])



Revision as of 15:20, 12 September 2013

The XMLData command inserts raw XML data into command-interpretation results.

Introduction

As the NairnMPM and NairnFEA code engines develop, they sometimes add new features that cannot be used with the current script commands. Rather than wait for new scripting commands or reverting to using XML input files, the XMLData command lets you insert raw XML data needed to try the new features.

XMLData Command

The XMLData command allows you to insert XML commands into the interpretation results. The format is:

XMLData <(section)>,<(matid)>
  <tag>
    Inserted xml characters
  </tag>
EndXMLData

where

  • (section) indicates the section where the XML data will be inserted (if it is omitted, it is set to "End"). The possible sections are:
    • "DocType" to insert within square braces ("[ ... ]") in the DocType specification.
    • "Header" to insert at the end of the <Header> section.
    • "MPMHeader" to insert at the end of the <MPMHeader> section (MPM Only).
    • "Mesh" to insert at the end of the <Mesh> section.
    • "MaterialPoints" to insert in the <MaterialPoints> definition section. It may be interspersed with Region, Hole, and BMPRegion commands (MPM Only).
    • "Materials" to insert a custom material along with other materials. Each insertion for this section must define a single material (see below)
    • "GridBCs" to insert in the <GridBCs> section. it may be interspersed with of grid boundary conditions.
    • "ParticleBCs" to insert in the <ParticleBCs> section. it may be interspersed with of particle boundary conditions (MPM Only).
    • "Thermal" to insert at the end of the <Thermal> section.
    • "End" to insert at the end of all other XML data.
  • (id) specifies a material ID whenever (section) is "Materials" (see below)

The XML data that is inserted will be all lines between the XMLData command and the EndXMLData Command. You can have multuple XMLData blocks for each section and subsquent blocks will be appended to previous blocks for each section.

Notes

  1. Each insertion into "Materials" must define a single Material command block:
    <Material Type="20" Name="New Material">
      (property commands)
    </Material>
    

    where the property commands set the material properties. The second (matid) parameter to the XMLData command must be provided and it must have a unique material ID (which can be used like regular material IDs). This insertion option is provided to work with materials in the code engines that are not yet supported by NairnFEAMPM or NairnFEAMPMViz.

  2. For "MaterialPoints", "Materials", "GridBCs", and "ParticleBCs", the data will be inserted when the XMLData command is used. This approach allows you to intersperse XML features with scripted features in these sections. For other section the XML is ad the end of other commands in that section.