Author Topic: Braced Frame Modeling  (Read 3751 times)

ngirmay3

  • Newbie
  • *
  • Posts: 1
    • View Profile
Braced Frame Modeling
« on: February 27, 2022, 02:21:46 AM »
Hello! Would it be possible to get a data copy of the applied displacement history for NCBF1_HSS6x6.json and TCBF3_W8X28.json files the Brace Frame Modeling tool. We want to compare how other commercial software perform in capturing hysteretic response of braces compared to BFM and wanted to use the same applied displacement history if possible.



   

fmk

  • Administrator
  • Full Member
  • *****
  • Posts: 232
    • View Profile
Re: Braced Frame Modeling
« Reply #1 on: February 27, 2022, 12:10:25 PM »
I see you found the relevant son files you need. As you will see from the file extension they are json. You can easily read the data and write it out in python, e.g.:
Code: [Select]
# Python program to read json file & print an array in it                           

import json

# Open input & output files                                                         
inFile = open('NCBF1_HSS6x6.json')
outFile = open('defo.txt', 'w')

# load input file & get the json element axialDef                                     
data = json.load(inFile)
testData = data['test']
axialDef = testData['axialDef']

# print data                                                                         
for dataPoint in axialDef:
    outFile.write(str(dataPoint)+"\n")

# close files                                                                       
inFile.close()
outFile.close()

you can also use Matlab if you prefer, look at jsondecode. looks to be more of a pain than python:
https://www.mathworks.com/matlabcentral/answers/474980-extract-info-from-json-file-by-matlab