Esempio n. 1
0
trfs = preprocessor.getTransfCooHandler
lin = trfs.newLinearCrdTransf2d("lin")
seedElemHandler = preprocessor.getElementHandler.seedElemHandler
seedElemHandler.defaultMaterial = xcSection.name
seedElemHandler.defaultTransformation = lin.name
elem = seedElemHandler.newElement("ElasticBeam2d", xc.ID([0, 0]))

xcTotalSet = preprocessor.getSets.getSet('total')
mesh = xcTotalSet.genMesh(xc.meshDir.I)

# Constraints
modelSpace.fixNode00F(p0.getNode().tag)
modelSpace.fixNodeF0F(p1.getNode().tag)

# Actions
loadCaseManager = load_cases.LoadCaseManager(preprocessor)
loadCaseNames = ['deadLoad', 'liveLoad']
loadCaseManager.defineSimpleLoadCases(loadCaseNames)

## Dead load.
deadLoad = xc.Vector([0.0, -0.125e3 * kip2kN / foot2meter, 0.0])
cLC = loadCaseManager.setCurrentLoadCase('deadLoad')
for e in xcTotalSet.elements:
    e.vector2dUniformLoadGlobal(deadLoad)

## Live load.
liveLoad = xc.Vector([0.0, -0.375e3 * kip2kN / foot2meter, 0.0])
cLC = loadCaseManager.setCurrentLoadCase('liveLoad')
for e in xcTotalSet.elements:
    e.vector2dUniformLoadGlobal(liveLoad)
Esempio n. 2
0
            frame_nodes.append(n)
frameBC.applyOnNodesLst(frame_nodes)

#Foundation.
foundation = sprbc.ElasticFoundation(wModulus=kS, cRoz=0.002)
foundation.generateSprings(xcSet=floor_elements)

# *** Loads ***
loadManager = preprocessor.getLoadHandler
loadCases = loadManager.getLoadPatterns
#Load modulation.
ts = loadCases.newTimeSeries("constant_ts", "ts")
loadCases.currentTimeSeries = "ts"

#Load case definition
loadCaseManager = lcm.LoadCaseManager(preprocessor)
loadCaseNames = [
    'selfWeight', 'deadLoad', 'passengers_shelter', 'earthPressure',
    'pedestrianLoad', 'singleAxeLoad', 'LM1', 'DLM1', 'nosingLoad',
    'roadTrafficLoad', 'earthquake'
]
loadCaseManager.defineSimpleLoadCases(loadCaseNames)

#Self weight.
cLC = loadCaseManager.setCurrentLoadCase('selfWeight')
for key in layerSets:
    layerSet = layerSets[key]
    for s in layerSet.getSurfaces:
        weight = s.getProp('selfWeight')
        for e in s.getElements():
            e.vector3dUniformLoadGlobal(weight)