Difference between revisions of "Reading Material Points from a Previous Simulation"
Jump to navigation
Jump to search
(Created page with "Sometimes it is useful to run a simulation, output the material point locations, and them use those settings for a new MPM simulation. One approach is to extract all material ...") |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
</pre> | </pre> | ||
where <tt>Archive.1843</tt> is desired time archive containing material point locations. The points will be written to an <tt>XML</tt> file called <tt>particles.xml</tt>. The output file will have one [[PointList Block|<tt><PointList</tt> block]] with one<tt><mp></tt>element for each material point. See the [[ExtractMPM]] tool documentation for more details on an XML extraction.</li> | where <tt>Archive.1843</tt> is desired time archive containing material point locations. The points will be written to an <tt>XML</tt> file called <tt>particles.xml</tt>. The output file will have one [[PointList Block|<tt><PointList></tt> block]] with one<tt><mp></tt>element for each material point. See the [[ExtractMPM]] tool documentation for more details on an XML extraction.</li> | ||
<li>Finally, include this saved file in another commands file using an <tt>XML</ | <li>Finally, include this saved file in another commands file using an <tt>XML</tt> entity reference. First, define the path to the new file using an [[Entity Command|<tt>Entity</tt> command]] such as: | ||
<pre>Entity mpfile,particles.xml | |||
</pre> | |||
where its value is a relative path to the file with the particle locations. In <tt>XML</tt> files, the entity is defined in the file's <tt>DOCTYPE</tt> element such as: | |||
<pre><!DOCTYPE JANFEAInput SYSTEM '/full path to/NairnMPM.dtd' | <pre><!DOCTYPE JANFEAInput SYSTEM '/full path to/NairnMPM.dtd' | ||
Line 19: | Line 24: | ||
</pre> | </pre> | ||
Secon, include that file in the section that defines material points using and [[XMLData Command|<tt>XMLData</tt> command]] such as: | |||
<pre>XMLData,MaterialPoints | |||
&mpfile; | |||
EndXMLData | |||
</pre> | |||
In <tt>XML</tt> files, the file is include in the <tt><MaterialPoints></tt> element using | |||
<pre><MaterialPoints> | <pre><MaterialPoints> | ||
&mpfile; | &mpfile; |
Latest revision as of 08:45, 7 December 2013
Sometimes it is useful to run a simulation, output the material point locations, and them use those settings for a new MPM simulation. One approach is to extract all material point locations to an XML file using the ExtractMPM tool, and then input that file to a new commands file. The process is:
- Run an MPM simulation
- Select an archive time and use ExtractMPM to extract particle data to an XML file. A typical command would be:
ExtractMPM -Xh -q mass -o particles Archive.1843
where Archive.1843 is desired time archive containing material point locations. The points will be written to an XML file called particles.xml. The output file will have one <PointList> block with one<mp>element for each material point. See the ExtractMPM tool documentation for more details on an XML extraction. - Finally, include this saved file in another commands file using an XML entity reference. First, define the path to the new file using an Entity command such as:
Entity mpfile,particles.xml
where its value is a relative path to the file with the particle locations. In XML files, the entity is defined in the file's DOCTYPE element such as:
<!DOCTYPE JANFEAInput SYSTEM '/full path to/NairnMPM.dtd' [ <!ENTITY mpfile SYSTEM "pointlist.xml"> ]>
Secon, include that file in the section that defines material points using and XMLData command such as:
XMLData,MaterialPoints &mpfile; EndXMLData
In XML files, the file is include in the <MaterialPoints> element using
<MaterialPoints> &mpfile; </MaterialPoints>