Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before going through this step, make sure you have gone through the first four steps of the

newwindow
redAnTS Tutorial #1
redAnTS Tutorial #1
https://confluence.cornell.edu/display/SIMULATION/redAnTS+TUTORIAL+1+Problem+Specification
. If you have saved the mesh and input data from the tutorial previously, launch redAnTS, read in the mesh and input data and solve to obtain the nodal displacements.

Introduction

MATLAB assigns a handle to every graphics object it creates. One can use this handle to change the object's properties. redAnTS creates a structure, called the "handles structure", that contains all the handles of the objects in its graphical user interface (GUI). It then augments this "handles structure" by adding fields corresponding to the mesh, material properties, nodal displacements, element strains, etc. In other words, the handles structure is the container that is used to store this FEA data. The handles structure is illustrated in the figure below.

...

Handles structure in redAnTS

Download and unpack redAnTS if you haven't done so alreadyWithin your redAnTS folder, there is a folder called PostProcessMenuFiles and within that folder, a file called CalcStrainStress.m. Bring up PostProcessMenuFiles/CalcStrainStress.m in the MATLAB editor. This function is used to calculate the element strain and stress values from the nodal displacements. This is one of the functions that you need to modify to add post-processing capabilities to your version of redAnTS. Let's take a closer look at the following two statements in this function.

...

The data fields of interest in the handles structure are listed in the redAnTS main help. To see this, type Help help redAnTS at the MATLAB command line. Below is a snapshot from the help.

Thus, the handles structure has a field called mesh that is also a structure. The mesh field in turn contains the xcoords and other fields. The statement

...

Investigate the handles structure using the debugger

You can set use the debugger to investigate further what the fields of the handles structure look like. In the MATLAB editor, add a breakpoint in CalcStrainStress.m at the statement handles=guidata(fighandle). You can add a breakpoint by clicking to the left of the linestatement. A red circle should appear as shown below.

Calculate σxxNow we need to drive redAnTS into CalcStrainStress.m function so that it will stop execution at the breakpoint that we just set. CalcStrainStress.m is invoked when we calculate σxxin the redAnTS GUI as per the first item in Step 5 of the tutorial. Before we dive into this step with full gusto, note that the Post-Processing field under our trusty pal Current Settings is empty. This signifies that the program is yet to calculate stress and strain from the nodal displacements. To calculate the stress and strain components, click on Strain, Stress under Post-Process. Voila, the program reports Stress/Strain done in Current Settings.Program execution should stop at the above statement. Check the Workspace. Then, step through this statement using the step icon.

...