def __init__(self,jsonfile): # open json input file self.jsonfile = open(jsonfile,'r') # load json data self.data = json.load(self.jsonfile) # update default settings self.settings = settings.update(self.data['settings']) # create models self.model = model(self.settings)
def __init__(self, jsonfile): # open json input file self.jsonfile = open(jsonfile, 'r') # load json data self.data = json.load(self.jsonfile) # update default settings self.settings = settings.update(self.data['settings']) # create models self.model = model(self.settings)
def create_model(prjname,fsection,run=True,itype='Displacement',nstep=500, incr=-0.005): model1 = model(settings) model1.settings['prjname'] = prjname # create all available material models model1.material('mat1','uniaxial_elastic',{'E':29000.0,'mu':0.3,'mass':0.0}) model1.material('CFRPBAR_BASE','uniaxial_elastic',{'E':18000.0,'mu':0.3,'mass':0.0}) model1.material('CFRPCABLE_BASE','uniaxial_elastic',{'E':22300.0,'mu':0.3,'mass':0.0}) model1.material('CFRPBAR','uniaxial_elastic_minmax',{'epsi_ut':0.016,'epsi_uc':-0.016,'baseseq':'CFRPBAR_BASE'}) model1.material('CFRPCABLE','uniaxial_elastic_minmax',{'epsi_ut':0.016,'epsi_uc':-0.016,'baseseq':'CFRPCABLE_BASE'}) model1.material('CFRPBAR_pre','uniaxial_elastic_InitStrain',{'iepsi':0.01,'basetag':'CFRPBAR'}) model1.material('CFRPCABLE_pre','uniaxial_elastic_InitStrain',{'iepsi':0.01,'basetag':'CFRPCABLE'}) model1.material('MMFX2','uniaxial_steel_02',{'E':29000.0,'mu':0.3,'mass':0.0, 'fy':165.0,'b':0.001,'r0':2.0, 'cr1':0.925,'cr2':0.15}) model1.material('pstrand','uniaxial_steel_02',{'E':28000.0,'mu':0.3,'mass':0.0, 'fy':225,'b':0.001,'r0':2.0, 'cr1':0.925,'cr2':0.15}) model1.material('pstrand_pre','uniaxial_elastic_InitStrain',{'iepsi':0.015,'basetag':'pstrand'}) model1.material('UHPC1','uniaxial_UHPC',{'E':8000.0,'mu':0.3,'mass':0.0, 'sigt0':1.3, 'epst0':0.000179, 'sigt1':1.5, 'epst1':0.004, 'sigt2':1.501, 'epst2':0.016, 'epst3':0.016, 'epsc0':0.003286, 'sigc0':28, 'sigc1':28.1, 'epsc1':0.004, 'epsc2':0.01, 'alphaT1':1, 'alphaT2':1, 'alphaT3':1, 'alphaC':1, 'alphaC1':1, 'alphaCU':1, 'betaT':1, 'betaC':1, }) model1.material('UHPC2','uniaxial_UHPC2',{'E':6000.0,'mu':0.3,'mass':0.0, 'sigt0':1.1, 'epst0':0.000183, 'sigt1':1.1, 'epst1':0.004, 'epst2':0.016, 'epsc0':-0.003286, 'sigc0':-28, 'epsc1':-0.01, 'alphaT1':1, 'alphaT2':1, 'alphaC':1, 'alphaCU':1, 'betaT':1, 'betaC':1, }) matkeylist = ['mat1','CFRPBAR_BASE','CFRPCABLE_BASE','CFRPBAR','CFRPCABLE','MMFX2','UHPC1','UHPC2','CFRPBAR_pre','CFRPCABLE_pre','pstrand','pstrand_pre'] #fsection = create_section.create_rec_section(1,2,20,mat='mat1',reinf=None) model1.section('section','fibersection',fsection) model1 = twopoint_bending(model1,'section',48,20,24,itype=itype,nstep=nstep, incr=incr) model1 = create_section.create_section_recorder(model1,12,'section',2, option='maxy') model1 = create_section.create_section_recorder(model1,12,'section',2, option='miny') model1 = create_section.create_section_recorder(model1,12,'section',2, option='fiberlib') model1 = create_section.create_section_recorder(model1,12,'section',2, option='all') exp1 = exporter(model1,'bending.tcl','ex_OpenSees') exp1.export(folder=prjname,matkeylist=matkeylist) ss = os.path.join(folder,prjname,'bending.tcl') ss = ss.replace('\\','\\\\') if run: run_OpenSees_abs(ss,version ='2.4.0') return model1
def create_model(prjname, fsection, run=True, itype='Displacement', nstep=500, incr=-0.005): model1 = model(settings) model1.settings['prjname'] = prjname # create all available material models model1.material('mat1', 'uniaxial_elastic', { 'E': 29000.0, 'mu': 0.3, 'mass': 0.0 }) model1.material('CFRPBAR_BASE', 'uniaxial_elastic', { 'E': 18000.0, 'mu': 0.3, 'mass': 0.0 }) model1.material('CFRPCABLE_BASE', 'uniaxial_elastic', { 'E': 22300.0, 'mu': 0.3, 'mass': 0.0 }) model1.material('CFRPBAR', 'uniaxial_elastic_minmax', { 'epsi_ut': 0.016, 'epsi_uc': -0.016, 'baseseq': 'CFRPBAR_BASE' }) model1.material('CFRPCABLE', 'uniaxial_elastic_minmax', { 'epsi_ut': 0.016, 'epsi_uc': -0.016, 'baseseq': 'CFRPCABLE_BASE' }) model1.material('CFRPBAR_pre', 'uniaxial_elastic_InitStrain', { 'iepsi': 0.01, 'basetag': 'CFRPBAR' }) model1.material('CFRPCABLE_pre', 'uniaxial_elastic_InitStrain', { 'iepsi': 0.01, 'basetag': 'CFRPCABLE' }) model1.material( 'MMFX2', 'uniaxial_steel_02', { 'E': 29000.0, 'mu': 0.3, 'mass': 0.0, 'fy': 165.0, 'b': 0.001, 'r0': 2.0, 'cr1': 0.925, 'cr2': 0.15 }) model1.material( 'pstrand', 'uniaxial_steel_02', { 'E': 28000.0, 'mu': 0.3, 'mass': 0.0, 'fy': 225, 'b': 0.001, 'r0': 2.0, 'cr1': 0.925, 'cr2': 0.15 }) model1.material('pstrand_pre', 'uniaxial_elastic_InitStrain', { 'iepsi': 0.015, 'basetag': 'pstrand' }) model1.material( 'UHPC1', 'uniaxial_UHPC', { 'E': 8000.0, 'mu': 0.3, 'mass': 0.0, 'sigt0': 1.3, 'epst0': 0.000179, 'sigt1': 1.5, 'epst1': 0.004, 'sigt2': 1.501, 'epst2': 0.016, 'epst3': 0.016, 'epsc0': 0.003286, 'sigc0': 28, 'sigc1': 28.1, 'epsc1': 0.004, 'epsc2': 0.01, 'alphaT1': 1, 'alphaT2': 1, 'alphaT3': 1, 'alphaC': 1, 'alphaC1': 1, 'alphaCU': 1, 'betaT': 1, 'betaC': 1, }) model1.material( 'UHPC2', 'uniaxial_UHPC2', { 'E': 6000.0, 'mu': 0.3, 'mass': 0.0, 'sigt0': 1.1, 'epst0': 0.000183, 'sigt1': 1.1, 'epst1': 0.004, 'epst2': 0.016, 'epsc0': -0.003286, 'sigc0': -28, 'epsc1': -0.01, 'alphaT1': 1, 'alphaT2': 1, 'alphaC': 1, 'alphaCU': 1, 'betaT': 1, 'betaC': 1, }) matkeylist = [ 'mat1', 'CFRPBAR_BASE', 'CFRPCABLE_BASE', 'CFRPBAR', 'CFRPCABLE', 'MMFX2', 'UHPC1', 'UHPC2', 'CFRPBAR_pre', 'CFRPCABLE_pre', 'pstrand', 'pstrand_pre' ] #fsection = create_section.create_rec_section(1,2,20,mat='mat1',reinf=None) model1.section('section', 'fibersection', fsection) model1 = twopoint_bending(model1, 'section', 48, 20, 24, itype=itype, nstep=nstep, incr=incr) model1 = create_section.create_section_recorder(model1, 12, 'section', 2, option='maxy') model1 = create_section.create_section_recorder(model1, 12, 'section', 2, option='miny') model1 = create_section.create_section_recorder(model1, 12, 'section', 2, option='fiberlib') model1 = create_section.create_section_recorder(model1, 12, 'section', 2, option='all') exp1 = exporter(model1, 'bending.tcl', 'ex_OpenSees') exp1.export(folder=prjname, matkeylist=matkeylist) ss = os.path.join(folder, prjname, 'bending.tcl') ss = ss.replace('\\', '\\\\') if run: run_OpenSees_abs(ss, version='2.4.0') return model1
from model.registry import model from export.export import exporter import numpy as np from settings import settings from utility.geometry import create_section from lib import libop # create model instance model1 = model(settings) # create node model1.node([[0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0], [3, 0, 0], [5, 0, 0]]) # create element model1.element([[1, 2], [2, 3], [3, 4]]) model1.material('mat1', 'uniaxial_elastic', { 'E': 29000.0, 'mu': 0.3, 'mass': 0.0 }) model1.material('UHPC', 'uniaxial_elastic', { 'E': 8000.0, 'mu': 0.3, 'mass': 0.0 }) ''' model1.section('sec1','fiber',{'locy':1.0, 'locz':1.0, 'area':1.0,
from model.registry import model from export.export import exporter import numpy as np from settings import settings from utility.geometry import create_section from lib import libop # create model instance model1 = model(settings) # create node model1.node([[0,0,0], [1,0,0], [2,0,0], [3,0,0], [3,0,0], [5,0,0]]) # create element model1.element([[1,2], [2,3], [3,4]]) model1.material('mat1','uniaxial_elastic',{'E':29000.0,'mu':0.3,'mass':0.0}) model1.material('UHPC','uniaxial_elastic',{'E':8000.0,'mu':0.3,'mass':0.0}) ''' model1.section('sec1','fiber',{'locy':1.0, 'locz':1.0, 'area':1.0,