Exemple #1
0
def getMomentCurvatureDiagram3D(preprocessor, nmbSecc, esfAxil, maxK, numIncr):
    ''' Return the points of the moment curvature diagram of the section.

  :param nmbSecc: Section name.
  :param esfAxil: Axial force over the section.
  :param maxK: Maximum curvature to reach in the analysis.
  :param numIncr: Number of increments.
  '''
    nodes = preprocessor.getNodeHandler

    modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
    nod1 = nodes.newNodeIDXYZ(1001, 1, 0, 0)

    nod2 = nodes.newNodeIDXYZ(1002, 1, 0, 0)
    elementos = preprocessor.getElementHandler
    elementos.defaultMaterial = nmbSecc
    elementos.defaultTag = 2001  #Tag for the next element.
    zls = elementos.newElement("ZeroLengthSection", xc.ID([nod1.tag,
                                                           nod2.tag]))

    modelSpace.fixNode000_000(nod1.tag)
    modelSpace.constraints.newSPConstraint(nod2.tag, 1, 0.0)
    modelSpace.constraints.newSPConstraint(nod2.tag, 2, 0.0)

    cargas = preprocessor.getLoadHandler
    casos = cargas.getLoadPatterns
    #Load modulation.
    ts = casos.newTimeSeries("constant_ts", "ts")
    casos.currentTimeSeries = "ts"
    lp0 = casos.newLoadPattern("default", "0")
    lp0.newNodalLoad(nod2.tag, xc.Vector([esfAxil, 0, 0, 0, 0, 0]))
    #We add the load case to domain.
    casos.addToDomain("0")

    analysis = predefined_solutions.plain_newton_raphson(prueba)
    analOk = analysis.analyze(1)

    lp1 = casos.newLoadPattern("default", "1")
    lp1.newNodalLoad(nod2.tag, xc.Vector([0, 0, 0, 0, 0, 0, 1]))

    # Compute curvature increment.
    dK = maxK / numIncr
    soluMethods = prb.getSolProc.getAnalysisAggregationContainer
    analysisAggregation = getAnalysisAggregation("analysisAggregation")
    integ = analysisAggregation.newIntegrator(
        "displacement_control_integrator")
modelSpace = predefined_spaces.getStructuralMechanics3DSpace(preprocessor)
modelSpace.fixNode000_000(1)

# Loads definition
lp0 = modelSpace.newLoadPattern(name='0')
lp0.newNodalLoad(2, xc.Vector([NDato, 0, 0, 0, MyDato, MzDato]))
lp1 = modelSpace.newLoadPattern(name='1')
lp1.newNodalLoad(2, xc.Vector([NDato, 0, 0, 0, MzDato / 10.0, MyDato / 10.0]))
lp2 = modelSpace.newLoadPattern(name='2')
lp2.newNodalLoad(2, xc.Vector([NDato, 0, 0, 0, 0, 0]))

# We add the load case to domain.
modelSpace.addLoadCaseToDomain(lp0.name)

# Solution procedure
analysis = predefined_solutions.plain_newton_raphson(feProblem)
analOk = analysis.analyze(10)
if (analOk != 0):
    print("Error!; failed to converge.")
    exit()

concreteSectionShearParams = EHE_limit_state_checking.ShearController(
    'ULS_shear')

elements = preprocessor.getElementHandler
ele1 = elements.getElement(1)
scc = ele1.getSection()
concreteSectionShearParams.calcVuEHE08(scc, "", EHE_materials.HA25,
                                       EHE_materials.B500S, NDato,
                                       math.sqrt(MyDato**2 + MzDato**2), 0, 0)
Exemple #3
0
# Loads definition
Nd = -550e3 / 1.5  # Axial force when checking crack width.
Myd = 190e3 / 1.5  # # Y bending moment when checking crack width.
Mzd = 0.0  # Z bending moment value when checking shear.
# Vd= 148.7e3 # Shear value.

# Load definition.
lp0 = modelSpace.newLoadPattern(name='0')

lp0.newNodalLoad(2, xc.Vector([Nd, 0, 0, 0, Myd, Mzd]))

# We add the load case to domain.
modelSpace.addLoadCaseToDomain(lp0.name)

# Solution procedure
analysis = predefined_solutions.plain_newton_raphson(feProblem, mxNumIter=10)
analOk = analysis.analyze(10)

import os
fname = os.path.basename(__file__)
if (analOk < 0):
    lmsg.error(fname + ' ERROR. Failed to converge.')
    quit()

secHAParamsFis = EHE_limit_state_checking.CrackControl('SLS_crack')

elements = preprocessor.getElementHandler
scc = elements.getElement(1).getSection()
secHAParamsFis.computeWk(scc, concr.matTagK, steel.matTagK, concr.fctm())
ratio1 = ((secHAParamsFis.Wk - 0.383585469616e-3) / 0.383585469616e-3)
'''