Difference between revisions of "FEA Input Files"

From OSUPDOCS
Jump to navigation Jump to search
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following are all the possible sections for input XML files for running NairnFEA. When input files are validated using the DTD file (as recommended), the sections must appear in this specified order. Optional sections that are not needed may be omitted. A sample NairnFEA input file shows a sample calculation of a cantilever beam.
FEA simulations are run using [[NairnFEA]]. Some of the key features of this code engine (with links) are listed [[NairnFEA|here]]. The documentation on this page explains how to run FEA calculations by describing all the options of input command files.
 
== Introduction ==
 
List key features with links


== Input Command File Overview ==
== Input Command File Overview ==


When using [[NairnFEAMPM]] or [[NairnFEAMPMViz]] to set up calculations, the input command files are script files. When you interpret these scripts, the applications will create an <tt>XML</tt> input command file that is needed to drive the code engines. Because the scripting language handles all the <tt>XML</tt> formatting, you can skip this section. See the help documentation in [[NairnFEAMPM]] or [[NairnFEAMPMViz]] for syntax and features of the scripting languages. Click this link to see a [[Sample FEA Input Command File|sample scripted FEA input command file]] for analysis of an end-loaded cantilever beam.
When using [[NairnFEAMPM]] or [[NairnFEAMPMViz]] to set up calculations, the input command files are usually script files written using the custom [[Scripting Language Syntax|scripting language]]. When you interpret these scripts, the applications will create an <tt>XML</tt> input command file that is needed to drive the code engines. Click this link to see a [[Sample FEA Input Command File|sample scripted FEA input command file]] for analysis of an end-loaded cantilever beam.
 
Alternatively, you can directly create <tt>XML</tt> input command files (although usually much less powerful then learning the scripting methods). If you use the manual method, the files must conform to the structure defined in this section. 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:
 
<pre>
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE JANFEAInput SYSTEM &quot;NairnFEA.dtd&quot;
[
  &lt;!ENTITY force &quot;100&quot;&gt;
]&gt;
&lt;JANFEAInput version='3'&gt;
  ...
  (XML Commands to define the calculation)
  ...
&lt;/JANFEAInput&gt;
</pre>
 
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 [[Running_FEA_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.
Alternatively, you can directly create <tt>XML</tt> input command files. Because this approach cannot use the language control options of a [[Scripting Language Syntax|scripting language]], it is much less powerful then scripting methods and much harder to customize for a range of simulations. If you do use the manual <tt>XML</tt> method, the files must conform to the structure defined [[XML Input Files for NairnFEA|here]]. 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.


The remainder of the file is included within a <tt>JANFEAInput</tt> block. The <tt>version</tt> attribute is currently not needed, but may be important in the future. To be consistent with the document definition in the <tt>DTD</tt> file, all elements with the <tt>JANFEAInput</tt> block must be entered in the ordered 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. 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.
Some commands support the use of [[User Defined Functions|user defined functions]] to increase options for setting up simulations. These functions can be used in both scripting commands in and <tt>XML</tt> commands. Scripting commands can build  functions using [[Expression Syntax|string expressions]]. In <tt>XML</tt> files, you enter the entire function.


==Header==
==Header==
Line 40: Line 19:
The possible header commands are
The possible header commands are


* [[Analysis Command]]
* [[Analysis Command]] - pick the type of FEA analysis.
* [[Description Command]]
* [[ConsistentUnits Command]] - pick input and output units for the calculations
* [[Description Command|Annotation Commands]] - these commands let you annotate the calculations.
* [[Controlling FEA Output]]
* [[Controlling FEA Output]]
* [[Processors Command]] - pick number of processors for parallel code.
* [[RandSeed Command]] - to pick a seed for random number generation
* [[Setting Developer Flags]]
* [[Setting Developer Flags]]


==Defining the FEA Mesh==
==Defining the FEA Mesh==


==Explicit Mesh Definition==
FEA calculations are done within a mesh of elements. There are two ways to specify the mesh. The most common is to [[FEA Mesh Generation Commands|generate the mesh]] by defining [[Keypoint Command|keypoints]] and [[Path Command|paths]] and then using them to [[Area Command|mesh areas]]. The second mesh method is to [[Explicit FEA Mesh Generation|explicitly define the mesh]] by defining every node and element. This uncommon method can only be used in <tt>XML</tt> input files. The [[FEA Mesh Generation Commands|generate]] and [[Explicit FEA Mesh Generation|explicit]] methods cannot be mixed.
 
An advanced mesh generation option is to [[Create a Mesh with Images and Shapes|create the mesh with image and shape commands]]. When using this procedure, you first [[FEA Mesh Generation Commands|generate]] or [[Explicit FEA Mesh Generation|explicitly define]] a mesh and then follow that with  [[Create a Mesh with Images and Shapes|image and shape commands]] to define material types, define material angles, and create the final mesh geometry.
 
=== Element Types ===
 
Calculations can use various [[Element Types|types of elements]] and can mix compatible element types.
 
=== Explicit Cracks ===
 
[[Explicit FEA Cracks|Defining explicit cracks]] in a finite element mesh is simply a matter of having two separate paths joined at a crack tip. When FEA calculations include cracks in the proper form, [[NairnFEAMPM]] can do crack closure calculations to find energy release once the calculation are done (crack closure calculations are not yet available in [[NairnFEAMPMViz]]).
 
=== Imperfect Interfaces ===


==Generated Mesh==
[[NairnFEA]] supports modeling of [[Imperfect Interfaces|imperfect interfaces]] between phases in composite materials by including imperfect [[FEA Elements|interface elements]] at phase boundaries.


==Defining Materials==
==Defining Materials==
Line 57: Line 51:
==Boundary Conditions==
==Boundary Conditions==


==Temperature==
All FEA calculations require [[FEA Boundary Conditions|boundary conditions]] to define the problem. This conditions specify nodal displacements, nodal loads, or stresses on element faces. In [[NairnFEA]], additional boundary conditions can set up [[FEA Periodic Boundaries|periodic problems]].
 
== Temperature ==
 
FEA calculations can do [[Thermal FEA Calculations|thermal calculations]] involving thermal stresses.
 
== XML Insertion ==
 
When writing scripted input files, it is sometimes useful to insert raw <tt>XML</tt> commands into the automatically-format <tt>XML</tt> input file. The two commands that help in this task are:
 
* [[Entity Command]] - to define entities that will appear in the automatically-format <tt>XML</tt> input file.
* [[XMLData Command]] - to insert raw <tt>XML</tt> data into various sections of the automatically-format <tt>XML</tt> input file.

Latest revision as of 17:40, 17 April 2024

FEA simulations are run using NairnFEA. Some of the key features of this code engine (with links) are listed here. The documentation on this page explains how to run FEA calculations by describing all the options of input command files.

Input Command File Overview

When using NairnFEAMPM or NairnFEAMPMViz to set up calculations, the input command files are usually script files written using the custom scripting language. When you interpret these scripts, the applications will create an XML input command file that is needed to drive the code engines. Click this link to see a sample scripted FEA input command file for analysis of an end-loaded cantilever beam.

Alternatively, you can directly create XML input command files. Because this approach cannot use the language control options of a scripting language, it is much less powerful then scripting methods and much harder to customize for a range of simulations. If you do use the manual XML method, the files must conform to the structure defined here. Click this link to see a sample XML FEA input command file for analysis of an end-loaded cantilever beam.

Some commands support the use of user defined functions to increase options for setting up simulations. These functions can be used in both scripting commands in and XML commands. Scripting commands can build functions using string expressions. In XML files, you enter the entire function.

Header

This section defines the type of analysis to run, provides an optional description of the calculations, and sets some output options. When using a scripting language, the header is created automatically and its content is controlled by commands defined below. When manually writing XML files, the header, which is required, is defined in a single header block:

<Header>
  (commands)
</Header>

The possible header commands are

Defining the FEA Mesh

FEA calculations are done within a mesh of elements. There are two ways to specify the mesh. The most common is to generate the mesh by defining keypoints and paths and then using them to mesh areas. The second mesh method is to explicitly define the mesh by defining every node and element. This uncommon method can only be used in XML input files. The generate and explicit methods cannot be mixed.

An advanced mesh generation option is to create the mesh with image and shape commands. When using this procedure, you first generate or explicitly define a mesh and then follow that with image and shape commands to define material types, define material angles, and create the final mesh geometry.

Element Types

Calculations can use various types of elements and can mix compatible element types.

Explicit Cracks

Defining explicit cracks in a finite element mesh is simply a matter of having two separate paths joined at a crack tip. When FEA calculations include cracks in the proper form, NairnFEAMPM can do crack closure calculations to find energy release once the calculation are done (crack closure calculations are not yet available in NairnFEAMPMViz).

Imperfect Interfaces

NairnFEA supports modeling of imperfect interfaces between phases in composite materials by including imperfect interface elements at phase boundaries.

Defining Materials

Each element in the mesh is assigned a material type. NairnFEA support numerous material models, but currently all are linear elastic. The information on these materials is found in are in FEA Material Models.

Boundary Conditions

All FEA calculations require boundary conditions to define the problem. This conditions specify nodal displacements, nodal loads, or stresses on element faces. In NairnFEA, additional boundary conditions can set up periodic problems.

Temperature

FEA calculations can do thermal calculations involving thermal stresses.

XML Insertion

When writing scripted input files, it is sometimes useful to insert raw XML commands into the automatically-format XML input file. The two commands that help in this task are:

  • Entity Command - to define entities that will appear in the automatically-format XML input file.
  • XMLData Command - to insert raw XML data into various sections of the automatically-format XML input file.