NextFEM Designer ​​ - Use with OpenSees

User’s (short) guide

 

NextFEM Designer can act as a pre- and post- processor for OpenSees.

You can import any of your .tcl models with the command File / Import …. (not Import OpenSees results, this will be used to recorders’ output!) or by dragging the file into the viewport.

This tutorial will use the following portal frame as driving example:

# SET UP ----------------------------------------------------------------------

# units: kN, m, sec

wipe;        ​​​​  # clear opensees model

# import procedure008.tcl supplied with NextFEM Designer

source procedure008.tcl

# required by procedures - they can run also for parallel analysis

set pid 0

file mkdir data;        ​​ ​​​​ # create data directory

model basic -ndm 3 -ndf 6; ​​ # 2 dimensions, 3 dof per node

set modelName "frame_ex"; # model name, best if equal to .tcl filename

 

# define GEOMETRY -------------------------------------------------------------

set LCol 3.0;    # column length

set LBeam 6.0;   # beam length

set Weight 1000.;   # superstructure weight

 

# mechanical properties

set fyk  [expr 235*pow(10,3)]

set ftk   [expr 360*pow(10,3)]

set Es  [expr 210000*pow(10,3)]

set gammaM0 [expr 1.05]

set fyd  [expr $fyk/$gammaM0]

 

# calculated parameters

set PCol $Weight;     # nodal dead-load weight per column

set g 9.81;       ​​ ​​ ​​ ​​​​ # g acceleration

set Mass [expr $PCol/$g];   # nodal mass

 

# calculated geometry parameters

set A  [expr 53.83*pow(10,-4)];   # cross-sectional area

set Iy  [expr 3692.0*pow(10,-8)];  # Column moment of inertia

set Iz  [expr 1336.0*pow(10,-8)]

set d  [expr 190.0*pow(10,-3)]

set bf  [expr 200.0*pow(10,-3)]

set tw  [expr 6.5*pow(10,-3)]

set tf  [expr 10.0*pow(10,-3)]

 

# nodal coordinates:

node 1 0 0 0;   # node coords. X, Y, Z

node 2 0 $LCol ​​ 0  

node 3 $LBeam 0 0

node 4 $LBeam $LCol 0

 

# Single point constraints -- Boundary Conditions

fix 1 1 1 1 1 1 1;    # node DX DY RZ

fix 3 1 1 1 1 1 1;

fix 2 0 0 1 1 1 0

fix 4 0 0 1 1 1 0

 

# nodal masses:

mass 2 $Mass $Mass 0. 0 0 0;  # node#, Mx My Mz, Mass=Weight/g, neglect rotational inertia at nodes

mass 4 $Mass $Mass 0. 0 0 0

 

# Define ELEMENTS & SECTIONS -------------------------------------------------------------

set HE200A 1;  # assign a tag number to the column section

set HE200ATemp 2

 

# MATERIAL parameters -------------------------------------------------------------------

set steelMatID 1;      # material ID tag

 

# -----------

set fyk  [expr 275*pow(10,3)]

set ftk   [expr 430*pow(10,3)]

set Es  [expr 210000*pow(10,3)]

set nus  [expr 0.3]

set Gs  [expr $Es/2/(1+$nus)]

set Gammas [expr 78.5/pow(10,0)]

set gammaM0 [expr 1.05]

set fyd  [expr $fyk/$gammaM0]

set Bs 0.01;      # strain-hardening ratio

set R0 18;      # control the transition from elastic to plastic branches

set cR1 0.925;      # control the transition from elastic to plastic branches

set cR2 0.15;      # control the transition from elastic to plastic branches

 

uniaxialMaterial Steel02 $steelMatID $fyd $Es $Bs $R0 $cR1 $cR2;    # Menegotto-Pinto model

 

# FIBER SECTION properties -------------------------------------------------------------

 

set nfdw 5;       # number of fibers along web depth

set nftw 2;       # number of fibers along web thickness

set nfbf 5;        # number of fibers along flange width

set nftf 2;        # number of fibers along flange thickness

 ​​​​ 

​​ set dw [expr $d - 2 * $tf]

​​ set y1 [expr -$d/2]

​​ set y2 [expr -$dw/2]

​​ set y3 [expr ​​ $dw/2]

​​ set y4 [expr ​​ $d/2]

 ​​​​ 

​​ set z1 [expr -$bf/2]

​​ set z2 [expr -$tw/2]

​​ set z3 [expr ​​ $tw/2]

​​ set z4 [expr ​​ $bf/2]

 ​​​​ 

#  ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ 

section fiberSec ​​ $HE200ATemp {

 ​​ ​​ ​​ ​​​​ # ​​ nfIJ  ​​ ​​​​ nfJK  ​​​​ yI  ​​ ​​ ​​​​ zI  ​​​​   yJ  ​​ ​​​​ zJ  ​​ ​​ ​​ ​​ ​​ ​​​​ yK  ​​​​ zK  ​​ ​​ ​​ ​​​​ yL  ​​ ​​​​ zL

patch quadr ​​ $steelMatID $nfbf $nftf ​​   $y1 $z4  ​​​​ $y1 $z1  ​​​​ $y2 $z1  ​​​​ $y2 $z4

patch quadr ​​ $steelMatID $nftw $nfdw  ​​ ​​ ​​​​ $y2 $z3  ​​​​ $y2 $z2  ​​​​ $y3 $z2  ​​​​ $y3 $z3

patch quadr ​​ $steelMatID $nfbf $nftf ​​   $y3 $z4  ​​​​ $y3 $z1  ​​​​ $y4 $z1  ​​​​ $y4 $z4

 ​​​​ }

set string1 P

set string2 Mz

set string3 Vy

section Aggregator $HE200A $steelMatID $string1 $steelMatID $string2 $steelMatID $string3 -section $HE200ATemp

 

# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system

set ColTransfTag 1;    # associate a tag to column transformation

geomTransf Linear $ColTransfTag 0 0 1 ;

set BeamTransfTag 2;    # associate a tag to column transformation

geomTransf Linear $BeamTransfTag 0 0 1 ;

 

# element connectivity:

set numIntgrPts 5;           # number of integration points for force-based element

element nonlinearBeamColumn 1 1 2 $numIntgrPts $HE200A $ColTransfTag;# self-explanatory when using variables

element nonlinearBeamColumn 2 3 4 $numIntgrPts $HE200A $ColTransfTag

element nonlinearBeamColumn 3 2 4 $numIntgrPts $HE200A $BeamTransfTag

 

# define GRAVITY LOAD -------------------------------------------------------------

pattern Plain 1 Linear {

 ​​ ​​​​ eleLoad -ele 3 -type -beamUniform -20 0; # distributed superstructure-weight on beam

}

 

# define damping proportional to masses and to 1st mode

MDamping 0.05 1

 

# parameters for the subsequent analyses

set Tol 1.0e-3;   # convergence tolerance for test

set Tmax   15.0

set dt   0.005

set filePath "record10.30.dat"; # string with the 2 columns plain text seismic record

set ampl   1

set dir   1

 

# non-linear static analysis for applying vertical loads

NonLinearStatic $Tol 0.1 10 $modelName

# modal analysis

Modal 3 1 $modelName 1

# dynamic analysis

DynamicAn $Tmax $dt $filePath 1 $dir $Tol $ampl $modelName

 

The procedure file procedure008.tcl has to be placed in the same folder of your .tcl model and can be imported with the command

source procedure008.tcl

 

and it contains a series of scripts for setting the analysis quickly, without specifying and studying in deep the parameters to set.

IMPORTANT: the given procedures work for any kind of model. Despite that, NextFEM Designer can read recorders generated by 3D models only (6 dofs per node).

All procedures are given with no warranty and no support; feel free to modify and use them by citing nextfem.it website.

All procedures require modelName, that is a string parameters specifying the name assigned to the model, which is at your will. To properly use NextFEM Designer as a post-processor, set a modelName equal to the name of the .tcl file.

The most common commands in the procedure file are:

  • LinearStatic “modelName”
    to run a static linear analysis with a simgle load increment
    .

  • NonLinearStatic $tol $step $nsteps “modelName”
    to perform a non-linear static analysis
    using load control.

    • # tol  :sets the convergence tolerance

    • # step  :the step size

    • # nsteps:total number of steps

  • Modal $n $wr “modelName” ​​ $args
    performs an eigen analysis.

    • # n   :the number of modes to be found

    • # wr  :a flag that, if set to 1, allows to write eigenvalues and periods to file. Any other value does nothing.

    • # args : OPTIONAL argument. Put 1 if you want this procedure to create recorders. This is may be useful to import the deformed shapes in NextFEM Designer.

    • #Put any other value if the eigen analysis is functional to other types of analysis e.g. adaptive pushover and do not want it to overwrite results over and over.

  • Pushover $patternStart $type $mode $nodes $masses $cnode $cdof $tol $step $nsteps $modelName $checkProc
    performs a pushover analysis.

    • # patternStart:The first free tag. This proc uses patternStart and patternStart+1 IDs to create load patterns.

    • # type:used to define the type of distribution: 1 - mode shaped load pattern, 2 - mass proportional load pattern.

    • # mode:mode required for type 1 load distribution. Ignored for type 2 load distribution.

    • # nodes: list of nodes where lateral loads are applied.

    • # masses: list of masses. One per node. Should be in the same order of $nodes argument.

    • # cnode:control node. It is the node where the displacement is imposed.

    • # cdof:control dof. The direction of the imposed displacement.

    • # tol:convergence tolerance.

    • # step:step size.

    • # nsteps:number of steps.

  • SetDamping $flag $csi $args
    Sets model damping ratios.

    • # flag:defines damping type.

      • # 0: mass proportional damping. First mode is set as control mode.

      • # 1: mass proportional damping. $args contains the control mode.

      • # 2: Rayleigh damping. $args contains two control modes

      • #any other values causes an error.

    • # csi:damping ratio

    • # args:variable length argument. Contains the modes used to build the damping matrix.

  • MDamping $csi $modeI
    Builds mass proportional damping matrix.

    • #csi :damping ratio

    • #modeI: control mode

  • DynamicAn $Tmax $dt $filePath $patternStart $dir $TolDynamic $ampl $modelName
    Performs a time-history dynamic analysis.

    • # Tmax:analysis length.

    • # dt:reference step

    • # filePath:file containing time-acceleration pairs.

    • # patternStart:The first free tag. This proc uses patternStart and patternStart+1 IDs to create load patterns.

    • # dir:motion direction

    • # TolDynamic:convergence tolerance.

    • # ampl:accelerogram scale factor.

To import results in NextFEM Designer, select File / Import OpenSees results. The following mask will be shown:

Tick the checkboxes showed above to import the eigen results (with deformed shapes) and results from the dynamic analysis.

You will ​​ be able also to see beam diagrams, if available in the recorders.

 

Download the example from here: frame_ex