#acl Default -All:read,write,revert,delete,admin
#format wiki
#language en
<<Include(Specifications/FebioFeatures, "Specifications", 2, from="== Set Definitions for Elements, Nodes, and Surfaces ==", to="=== Progress ===")>>

== Progress ==
As part of the release of FEBio2 a new file format for the input files is planned. This new format defines the Geometry in terms of named element sets, where an element set groups elements of the same type and material. Multiple named element sets can be defined. The structure is very similar to the Abaqus format in terms of element definitions. For example:

{{{
<Elements type="hex8" mat="1" name="Part01">
   <elem id="1">1,2,3,4,5,6,7,8</elem>
   <elem id="2">9,10,11,12,13,14,15,16</elem>
</Elements>
<Elements type="quad4" mat="2" name="Part02">
   <elem id="3">17,18,19,20</elem>
</Elements>
}}}
A similar structure can be added for surfaces and node sets. A specific case study might be helpful in determining the specifics of this capability.

-- [[aerdemir]] <<DateTime(2013-12-20T09:20:59Z)>> This is great initiative. Will it be possible to add the same element(node/surface) to different sets? Will set information be available in the output file? We will provide a test problem.

I've implemented support for surfaces in the new FEBio file format. Users defines surfaces in the Geometry section of the input file. These surfaces can be used in the contact and surface_load sections of the input file to define the contacting or loaded surfaces. For example:

{{{
<Geometry>
        <Elements type="hex8" name="Part01">
                ...
        </Elements>
        <Surface name="surface01">
                <quad4 id="1">1,2,3,4</quad4>
                ...
        </Surface>
        <Surface name="surface02">
                <quad4 id="1">1,2,3,4</quad4>
                ...
        </Surface>
</Geometry>
<Contact>
        <contact type="sliding_with_gaps">
                <laugon>0</laugon>
                <penalty>1</penalty>
                <surface type="master" set="surface01"/>
                <surface type="slave"  set="surface02"/>
        </contact>
</Contact>
}}}
This example defines two surfaces through the "surface" elements. Each surface defines a name which will be used to reference back to this surface. In the contact definition the master and slave surfaces are then defined using the "set" attribute which references the previously defined surfaces using the name.

A similar capability was added for node sets. A user can now define a node set in the Geometry section and then use this node set in the fix and prescribe boundary conditions.

{{{
<Geometry>
        <NodeSet name="nodeset1">1:100:5,101,102,103,120:130</NodeSet>
</Geometry>
<Boundary>
        <fix bc="x" set="nodeset1"/>
</Boundary>
}}}
The following example implements the test problem using the set definitions [[attachment:sets01.feb]] .

-- [[belgiansteve]] <<DateTime(2014-06-04T16:49:31Z)>> Support for exporting surfaces was added to PreView. In version 1.14 you can name the surfaces for boundary loads and contact definitions. When the surfaces are named, PreView will create a surface section for each named surface in the output file and only puts a reference to the surface in the load or contact definition (as in the examples above).

-- [[belgiansteve]] <<DateTime(2014-06-25T17:00:32Z)>> The FEBio plotfile format now stores the names of all sets, including node sets, surfaces and parts as they are defined in the FEBio input file. It now also includes the node list for all user-defined node sets. Preliminary support was added to PostView for reading the node sets and the set names. Custom file parsers can now use this information to extract data specific to a certain set from the plot file. For domains and surfaces, data can be extracted directly for a given set and state (i.e. time step). Nodal values are still stored for all nodes, but by extracting the node set list, it should be easy to figure out the values just for the nodes belonging to that specific node set.

-- [[belgiansteve]] <<DateTime(2014-11-26T17:33:02Z)>> I decided to modify the definition of node sets. Instead of defining the node list as the value of the NodeSet element, users must now define a node tag for each node of the node list. The problem was that supporting a potentially very large xml value turned out to be challenging and would have required rewriting some of the xml parsing routines. The new format fits nicely within the current framework. The added advantage is that this new format for the node sets is more consistent with how the other sets (surface, part) are defined and how the node sets are defined through boundary conditions. As an example, here is the "old" format

{{{
<NodeSet name="set01">1,2,3</NodeSet> }}}
 . and the "new" format:
{{{
<NodeSet name="set01">
        <node id="1"/>
        <node id="2"/>
        <node id="3"/>
</NodeSet>}}}
Since the format specs of the 2.0 file format have already been released, for the time being FEBio will support both formats, both the new format is obviously the preferred one. PreView will only write the newer format. The user's manual has been updated to reflect this change and the example file above has also been modified to the new format.