2.6. EDP: Demand Parameters

This panel is where the user selects which outputs will be displayed when the simulation runs. There are a number of options available in the pull-down:

  1. Standard

  2. User-Defined

  3. None

2.6.1. Standard

When the user selects this option, there are no additional inputs required. The standard EDP generator will ensure the max absolute value of the following is obtained:

  1. Relative Floor displacements:

  2. Absolute Floor Accelerations

  3. Interstory Drifts

The results will contain results for these in abbreviated form:

  1. PFD peak relative floor displacement Event#-PFD-FLOOR-DIR

  2. PFA peak floor acceleration Event#-PFA-FLOOR-DIR

  3. PID peak inter-story drift: Event#-PID-STORY-DIR

Note

FLOOR is numbered starting at floor 0, and STORY is numbered starting at story 1. DIR is either 1 or 2

2.6.2. User Defined

As shown in the figure, this panel allows the user to determine their own output and process it. When using this option the user provides additional data:

../../../../../_images/userDefinedEDP.png

Fig. 2.6.2.1 User-Defined EDP panel.

  1. Additional Input: These are additional commands that are invoked by the analysis application before the transient analysis is performed. For example, for OpenSees this would be a script containing a series of recorder commands. A recorder file passed to OpenSees might look like the following:

# recorder EnvelopeNode -file $filename -node $nodeTag1 ... $nodeTagN -dof $DOF1 $DOF2 disp
recorder EnvelopeNode -file node.out -node 1 2 3 4 -dof 1 disp
# recorder EnvelopeElement -file $filename -ele $eleTag1 ... $eleTagN forces
recorder EnvelopeElement -file ele.out -ele 1 2 3 forces
  1. Postprocess Script: This is a python or tcl script that will be invoked after the finite element application has run. It must be provided by the user. Its purpose is to process the output files and create a single file, results.out. This file must contain a single line with as many entries as EDP’s specified. For example, a python postprocessing file that would take the outputs from the recorder commands of the previous code block to create the results file needed by the applications is illustrated as the example python file below along with the tcl script for creating recorders in OpenSees.

    Example post-processing python file
    #!/usr/bin/python
    # written: fmk, adamzs 01/18
    # import functions for Python 2.X support
    from __future__ import division, print_function
    import sys
    if sys.version.startswith('2'):
            range=xrange
            string_types = basestring
    else:
            string_types = str
    import sys
    def process_results(inputArgs):
            #
            # process output file "node.out" for nodal displacements
            #
            with open ('node.out', 'rt') as inFile:
                    line = inFile.readline()
                    line = inFile.readline()
                    line = inFile.readline()
                    displ = line.split()
                    numNode = len(displ)
            inFile.close
    
            # now process the input args and write the results file
            outFile = open('results.out','w')
    
            # note for now assuming no ERROR in user data
            for i in inputArgs:
                    theList=i.split('_')
                    if (len(theList) == 4):
                            dof = int(theList[3])
                    else:
                            dof = 1
                    if (theList[0] == "Node"):
                            nodeTag = int(theList[1])
                            if (nodeTag > 0 and nodeTag <= numNode):
                                    if (theList[2] == "Disp"):
                                            nodeDisp = abs(float(displ[((nodeTag-1)*2)+dof-1]))
                                            outFile.write(str(nodeDisp))
                                            outFile.write(' ')
                                    else:
                                            outFile.write('0. ')
                            else:
                                    outFile.write('0. ')
                    else:
                            outFile.write('0. ')
    
            outFile.close
    
    if __name__ == "__main__":
            n = len(sys.argv)
            responses = []
            for i in range(1,n):
                    responses.append(sys.argv[i])
    
            process_results(responses)
    
    Example post-processing tcl file
    set nodeIn [open node.out r]
    while { [gets $nodeIn data] >= 0 } {
            set maxDisplacement $data
    }
    puts $maxDisplacement
    
    # create file handler to write results to output & list into which we will put results
    set resultFile [open results.out w]
    set results []
    
    # for each quanity in list of QoI passed
    #  - get nodeTag
    #  - get nodal displacement if valid node, output 0.0 if not
    #  - for valid node output displacement, note if dof not provided output 1'st dof
    
    foreach edp $listQoI {
            set splitEDP [split $edp "_"]
            set nodeTag [lindex $splitEDP 1]
                    if {[llength $splitEDP] == 3} {
                            set dof 1
            } else {
                            set dof [lindex $splitEDP 3]
            }
            set nodeDisp [lindex $maxDisplacement [expr (($nodeTag-1)*2)+$dof-1]]
            lappend results $nodeDisp
    }
    

Warning

The name of the output file used in the post-processing script must be results.out.

  1. Response Parameters. This is an area in which the user associates a variable name with the column of the results output file. If the process script has an array of strings named named EDP’s the script, the Response Parameters will be initially set with these values from the script.

2.6.3. None

This option is used only when the user specifies a surrogate model in the SIM tab. Because a surrogate model can evaluate only the EDPs that are pre-trained, we automatically display those quantities and do not allow users to modify the list.

Note

This option is not for training a surrogate model but for using a pre-trained surrogate model.