|
Nastran Analysis Interface Module (AIM)
Natran Analysis Interface Module (AIM)
|
This section introduces the user to the Nastran AIM via examples. These examples are intended to introduce the user to nastran functionality. They make use of the information found in the AIM Inputs, AIM Outputs and AIM attributes sections.
The first example is a simple three bar truss structure. This example is intended to demonstrate the use of all the attributes in addition to introducing the user to the Nastran AIM.
The follow code details the process in a *.csm file that generates a three bar truss. Note to execute in serveESP a dictionary file must be included
serveESP feaThreeBar.csmThe CSM script generates Bodies which are designed to be used by specific AIMs. The AIMs that the Body is designed for is communicated to the CAPS framework via the “capsAIM” string attribute. This is a semicolon-separated string with the list of AIM names. Thus, the CSM author can give a clear indication to which AIMs should use the Body. In this example, the list contains the structural finite element analysis tools that can analyze the body:
Next we will define the design parameters to define the wing cross section and planform. Notice that the despmtr entries have a dimension input that must be defined for inputs with a length greater than one.
Next the three bar truss is defined using the points defined in the despmtr entries. Notice that the middle edge is "drawn" twice. This is done because OpenCASCADE cannot perform boolean operations on non-manifold (not closed) wire bodies.
In this section the edge elements are attributed with a capsGroup string $bar1 etc. so information can be assigned to them. Notice the capsIgnore attribute assigned to one of the overlapping "middle" edges defined in the geometry above. The reason for this is discussed in the AIM attributes section.
Finally, the nodes are attributed. In this case, the three nodes across the top are given the same capsConstraint name. They could be assigned a different name allowing the user to define a different boundary condition at each location. The lower node is given a different capsLoad name so a load can be applied.
The following input defines a pyCAPS input that can be used along with the above *.csm input to create a nastran input. First the pyCAPS and os module needs to be imported.
Once the modules have been loaded the pyCAPS.Problem needs to be initiated while loading the *.csm file.
Though not shown in this example the user has access to the X, Y and Z despmtr inputs from this pyCAPS script.
The Nastran AIM is then loaded with:
After the AIM is loaded some of the inputs to the AIM are defined. A full list of options can be found in the AIM Inputs section. In this case the Proj_Name is entered. The project name becomes the Nastran input file names. Two are create projectName.bdf and projectName.dat. The *.bdf file contains the grid and connectivity information. The data file contains the case control and other bulk data inputs required by Nastran. The input format is selected as Free and large field format is used when the option is available. This is most likely in the GRID entries only. Additionally the analysis type selected is Static. The maximum and minimum points that can be placed along an edge is set to be two. This ensures that each edge shown in the figure will be represented by a single finite element bar.
Next the material inputs, property selection, constraints and loads are defined. First materials are defined.
Next these materials are used in the property definition. In this case two bar type properties are assigned to the edges. The outer bars have a property with a different area then the center bar. Note the relationship of bar1 etc. between this pyCAPS input and the *,csm input previously shown.
Next the three nodes with capsConstraint boundary are constrained in all six degrees of freedom.
Finally a load is applied the the node with the capsLoad force.
Finally an analysis case is defined that connects an analysis type to the load and constraint condition by name.
Once all the inputs have been set, aimPreanalysis needs to be executed. During this operation all the necessary files to run Nastran are generated and placed in the analysis working directory (analysisDir)
An OS system call is then made from Python to execute Nastran.
A call to aimPostanalysis is then made to check to see if AVL executed successfully and the expected files were generated.
To create multiple load cases with different boundary conditions the pyCAPS input for constraints, and loads changes with respect to the Single Load Case Example. In addition an analysis section is added.
The constraint section may expand to allow multiple boundary conditions. In this way each load case can have a seperate boundary condition. If the input is left identical to the single load case example then the same boundary condition will be applied to each load case.
Notice that an empty constraints variable has been defined. Then a tmp tuple is created with the name "conOne" paired with the dictionary constraint. This tuple is appended to the empty constraints variable. The process is repeated for the second boundary condition. Then the AIM input "Constraint" is defined with the information.
Next the load input is expanded to contain multiple cases.
The process is identical to the constraint input.
Finally, analysis cases are defined that connect an analysis type to a load and constraint condition by name.
Notice how the tuple names "conOne", "loadOne" and "analysisOne" are all tied together. The "analysisOne" string also becomes the case control LABEL for the load case in the Nastran input file.
To finish the pyCAPS input the process starting with the pre-analysis input is identical to the Single Load Case Example input.
To create input for a modal analysis a two simple changes are required to the Single Load Case Example input. The first change is to the AIM Inputs Analysis_Type. This input is the last input in the list below.
A description of each of these inputs can be found in Single Load Case Example.
The second change is replacing the load case information with a definition for the Analysis AIM input.
This information defines the eigenvalue solver method and parameters and assigns it as an analysis case.
This section creates a design model out of the single load case example. The first change is an update to the Analysis_Type AIM Input to StaticOpt.
The next update adds a material allowable to the material input yieldAllow. This is not a requirement for THIS optimization problem, but this input is referenced when design constraints are added later.
The first large optimization input is the design variable definition section. For more information, the user is pointed to the FEA Design Variables section. In this section the area of each rod element in the three bar truss is defined as a separate design variable. Finally each of these variables are used to defined AIM Input Design_Variable
The next unique section is the addition of design constraints. In this problem stress constraints in each rod element are added.
This completes the unique parts of the design inputs required for a Nastran optimization problem.
This example introduces the use of composite materials. Initially a composite wing frequency analysis is completed. This example will grow to introduce design optimization with composites, including design variable linking.
The CSM script generates Bodies which are designed to be used by specific AIMs. The AIMs that the Body is designed for is communicated to the CAPS framework via the “capsAIM” string attribute. This is a semicolon-separated string with the list of AIM names. Thus, the CSM author can give a clear indication to which AIMs should use the Body. In this example, the list contains the structural finite element analysis tools that can analyze the body:
The parameter being set in this case is a definition for a coordinate system in Engineering Sketch Pad. The documentation for csystem inputs is as follows.
CSYSTEM $csysName csysList
use: attach a Csystem to Body on top of stack
pops: any
pushes: any
notes: Sketch may not be open
if csysList contains 9 entries:
{x0, y0, z0, dx1, dy1, dz1, dx2, dy2, dz2}
origin is at (x0,y0,q0)
dirn1 is in (dx1,dy1,dz1) direction
dirn2 is part of (dx2,dy2,dz2) that is orthog. to dirn1
elseif csysList contains 5 entries and first is positive
{+iface, ubar0, vbar0, du2, dv2}
origin is at normalized (ubar0,vbar0) in iface
dirn1 is normal to Face
dirn2 is in (du2,dv2) direction
elseif csysList contains 5 entries and first is negative
{-iedge, tbar, dx2, dy2, dz2}
origin is at normalized (tbar) in iedge
dirn1 is tangent to Edge
dirn2 is part of (dx2,dy2,dz2) that is orthog. to dirn1
elseif csysList contains 7 entries
{inode, dx1, dy1, dz1, dx2, dy2, dz2}
origin is at Node inode
dirn1 is in (dx1,dy1,dz1) direction
dirn2 is part of (dx1,dy2,dz2) that is orthog. to dirn1
else
error
semicolon-sep lists can instead refer to
multi-valued Parameter
dirn3 is formed by (dirn1)-cross-(dirn2)
does not create a Branch
In the compositesys parameter defined below 9 entries are given. Based on the documentation above this indicates the following.
| Origin | 0.0 | 5.5 | 0.0 |
| Vector along x-Axis | 79.3685 | -0.65432 | 0.0 |
| Vector along y-Axis | 0.65432 | 79.3685 | 0.0 |
It should be noted that the vector along the y-axis may not be input perfectly perpendicular to the vector along the x-Axis. In this case ESP takes the projection of the input vector that is in the plane defined by both input vectors and perpendicular to the x-Axis. This is the case for all csystem input options defined above.
The geometry definition was generated by the ESP sketcher. Users are referred to ESP tutorials for information on how to create a sketch. The result is copy and pasted into the *.csm file snippet shown below.
The root edges are marked as capsConstraint locations. The overall surfaces is given a capsGroup and capsLoad attribute and a csystem definition is attached to it using the compositesys parameter previously discussed.
This model was created in centimeters and is converted to inches.
The following input defines a pyCAPS input that can be used along with the above *.csm input to create a nastran input. First the pyCAPS and os module needs to be imported.
Once the modules have been loaded the pyCAPS.Problem needs to be initiated with the *.csm file. Though not shown in this example the user has access to the X, Y and Z despmtr inputs from this pyCAPS script.
The Nastran AIM is then loaded with:
After the AIM is loaded some of the inputs to the AIM are defined. A full list of options can be found in the AIM Inputs section. In this case the Proj_Name is entered. The project name becomes the Nastran input file names. Two are create projectName.bdf and projectName.dat. The *.bdf file contains the grid and connectivity information. The data file contains the case control and other bulk data inputs required by Nastran. The input format is selected as Small and Large field format is used when the option is available. This is most likely in the GRID entries only. Additionally, the analysis type selected is Static. The maximum points that can be placed along an edge is set to be 40.
In this example two materials are defined. This demonstrates how simple it is to change materials in a model. Both an aluminum and Graphite_expoxy material are defined in the Material AIM Inputs.
Again property information is defined for both an aluminum and composite stack version of the model. However, only the composite entry is defined in the Property AIM Inputs.
The composite definition brings together the materials in each layer of the stack, their thicknesses and orientations. For the sequence defined below the order of the sequence is given in the table below. The full sequence is given to point out that they symmetry condition is applied to the right side of the compositeOrientation input.
| 0 | 0 | 0 | 0 | -45 | 45 | -45 | 45 | 45 | -45 | 45 | -45 | 0 | 0 | 0 | 0 |
Finally, the property is assigned to the regions with the capsGroup $wing attribute.
In this example the root edges are constrained in all degrees of freedom. This constraint references the capsConstraint $root input defined in the *.csm file.
As previously shown in Modal Analysis Example Case information to define an eigen value problem is entered and the Analysis AIM Input is defined.
Finally, preAnalysis is executed to generate all the required Nastran inputs.
Nastran is executed with a simple system call.
A post analysis command is entered allowing the user to access output data, if desired, from the application.
This section removes the frequency analysis and adds a pressure load to the previously introduced composite wing example case. Then An optimization problem allowing the thickness of each ply layer to change is performed.