# OS-T: 1365 NLSTAT Analysis of Solid Blocks in Contact

This tutorial demonstrates how to carry out nonlinear implicit small displacement analysis in OptiStruct, involving elasto-plastic materials, contact and continuing the nonlinear solution sequence from a preceding nonlinear loadcase.

Before you begin, copy the file(s) used in this tutorial to your working directory.

Figure 1 illustrates the structural model used for this tutorial, which is two square solid blocks made of elasto-plastic steel material. The dimensions of the blocks and the material parameters are outlined below Figure 1.

In the first nonlinear subcase, pressure loading is be applied to the top solid block, the top corners of which are constrained in X and Y directions. The top solid is in contact with the bottom solid, the bottom corners of which are constrained in X, Y and Z directions. The second nonlinear subcase is to simulate the unloading and is a continuation of the nonlinear solution sequence from the previous loading subcase.
Units
Length: mm; Time: s; Mass: Mgg; (Force: N; Stress: MPa)
Top block
72 mm x 72 mm
Bottom block
100 mm x 100 mm
Thickness of blocks
20. mm
Material
Steel, Elasto-plastic
Initial density ($\rho$): 7.90e-9 kg/mm3
Young's modulus (E): 210000 MPa
Poisson coefficient ($\upsilon$): 0.3
Yield Stress ($\sigma$0): 850.0 MPa
Imposed pressure
1000.0 MPa, applied at the center of top block

## Launch HyperMesh and Set the OptiStruct User Profile

1. Launch HyperMesh.
The User Profile dialog opens.
2. Select OptiStruct and click OK.
This loads the user profile. It includes the appropriate template, macro menu, and import reader, paring down the functionality of HyperMesh to what is relevant for generating models for OptiStruct.

## Open the Model

1. Click File > Open > Model.
2. Select the nlstat.hm file you saved to your working directory.
3. Click Open.
The nlstat.hm database is loaded into the current HyperMesh session, replacing any existing data.

## Set Up the Model

### Create Elasto-plastic Material

First, the stress versus plastic strain curve for the material needs to be defined.

1. In the Model Browser, right-click and select Create > Curve.
A new Curve editor window opens.
2. For Name, enter stress-strain.
3. In the pop-up window, enter the following X and Y values.
4. Close the window.
5. In the Model Browser, under Curve select stress-strain.
6. Click Color and select a color from the color palette.
7. For Card Image, select TABLES1 from the drop-down menu.

Now, the elasto-plastic material needs to be updated.

1. In the Model Browser, click the material steel.
The Entity Editor opens.
2. Click on the checkbox next to MATS1 to define the elastic-plastic material for NLSTAT analysis.
3. For TID, click Unspecified > Curves.
4. In the Select Curves dialog, select the stress_strain curve and click OK.
5. Input the values, as shown below.
TYPSTRN of 1 signifies specifying stress (Y) versus plastic strain (X).

### Define Contact between the Blocks

The contact surfaces for the two blocks need to be defined.
1. In the Model Browser, right-click and select Create > Set.
2. For Name, enter top.
3. For Card Image, select SET_ELEM from the drop-down menu.
4. Leave the Set Type switch set to non-ordered type.
5. For Entity IDs, click Unspecified > Property.
6. In the Select Properties dialog, select the top solid block Solid1 and click OK.
7. Similarly create another set named bottom.
8. Repeat steps 3 through 6 for bottom block select the bottom solid Solid2.

Next, the interface needs to be defined.

1. In the Model Browser, right-click and select Create > Contact.
2. For Name, enter SOLID_CONTACT.
3. Click Color and select a color from the color palette.
4. For Card Image, select CONTACT from the drop-down menu.
5. For Main Entity IDs and select Set from the extended selection menu.
6. Click the yellow Set panel and select the bottom block bottom in the pop-up window and click OK.
7. Similarly, for Secondary Entity IDs, select the top set.
8. For TYPE, select SLIDE from the drop-down menu.
9. For MORIENT, select NORM from the drop-down menu.

### Create NLPARM Load Step Input

1. In the Model Browser, right-click and select Create > Load Step Inputs.
2. For Name, enter NLPARM.
3. Enter the values as shown below:

### Create the 1st Nonlinear Load Step

1. In the Model Browser, right-click and select Create > Load Step.
3. Click Analysis type and select Nonlinear static from the drop-down menu.
4. For SPC, click Unspecified > Loadcol.
5. From the Select Loadcol dialog, select SPC from the list of load collectors and click OK.
7. From the Select Loadcol dialog, select pressure from the list of load collectors and click OK.
8. For NLPARM, click Unspecified > Load step inputs.
9. From the Select load step inputs dialog, select nlparm from the list of load step inputs and click OK.

### Create the 2nd Nonlinear Load Step

2. The Analysis type should, again, be set to Nonlinear static from the drop-down menu.
3. For SPC, select SPC from the list of load collectors.
4. For NLPARM, select nlparm from the list of load step inputs.

### Define Output Control Parameters

1. From the Analysis page, select control cards.
2. Click on GLOBAL_OUTPUT_REQUEST.
3. Below CONTF, DISPLACEMENT, STRAIN and STRESS, set Option to Yes.
4. Under STRAIN, set TYPE(1) to PLASTIC.
5. Click return twice to go to the main menu.

## Submit the Job

1. From the Analysis page, click the OptiStruct panel.
2. Click save as.
3. In the Save As dialog, specify location to write the OptiStruct model file and enter nlstat_complete for filename.
For OptiStruct input decks, .fem is the recommended extension.
4. Click Save.
The input file field displays the filename and location specified in the Save As dialog.
5. Set the export options toggle to all.
6. Set the run options toggle to analysis.
7. Set the memory options toggle to memory default.
8. Click OptiStruct to launch the OptiStruct job.
If the job is successful, new results files should be in the directory where the nlstat_complete.fem was written. The nlstat_complete.out file is a good place to look for error messages that could help debug the input deck if any errors are present.

## View the Results

Using HyperView, plot the Displacement, the von Mises stress, plastic strains and contact pressure contours at the end of the 1st (loading) step.

Next, change the subcase to the 2nd that is unloading subcase and plot the displacement contour to see the change in displacements in the blocks subject to unloading.