示例#1
0
    def runChecking(self,
                    intForcCombFileName,
                    outputFileName,
                    matDiagType,
                    limitStateController,
                    threeDim=True):
        '''Creates the phantom model and runs the verification on it.

    :param intForcCombFileName: name of the file containing the forces
                                and bending moments obtained for each 
                                element for the combinations analyzed
    :param outputFileName:  name of the output file containing the results 
                            of the verification 
    :param limitStateController: object that controls the limit state on elements.
    :param threeDim: true if it's 3D (Fx,Fy,Fz,Mx,My,Mz) false if it's 2D (Fx,Fy,Mz).
    '''
        feProblem = xc.ProblemaEF()
        preprocessor = feProblem.getPreprocessor
        if (threeDim):
            self.sectionDefinition.calcInteractionDiagrams(
                preprocessor, matDiagType)
        else:
            self.sectionDefinition.calcInteractionDiagrams(
                preprocessor, matDiagType, 'NMy')
        analysis = predefined_solutions.simple_static_linear(feProblem)
        phantomModel = phm.PhantomModel(preprocessor, self)
        result = phantomModel.runChecking(intForcCombFileName, analysis,
                                          limitStateController, outputFileName)
        return (feProblem, result)
示例#2
0
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from model import fix_node_6dof
from materials import typical_materials

E = 2.1e6  # Young modulus of the steel.
nu = 0.3  # Poisson's ratio.
h = 0.1  # Espesor.
dens = 1.33  # Densidad kg/m2.

q = 1

# Problem type
prueba = xc.ProblemaEF()
preprocessor = prueba.getPreprocessor
nodes = preprocessor.getNodeLoader
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
nodes.newNodeIDXYZ(1, 0, 0, 0)
nodes.newNodeIDXYZ(2, 1, 0, 0)
nodes.newNodeIDXYZ(3, 1, 1, 0)
nodes.newNodeIDXYZ(4, 0, 1, 0)

# Materials definition

memb1 = typical_materials.defElasticMembranePlateSection(
    preprocessor, "memb1", E, nu, dens, h)

elementos = preprocessor.getElementLoader
elementos.defaultMaterial = "memb1"
示例#3
0
ro_s_eff = 0.05215  #effective ratio of reinforcement

M_y = -300e3  #bending moment [Nm]

#Other data
nDivIJ = 20  #number of cells (fibers) in the IJ direction (cross-section coordinate Y)
nDivJK = 20  #number of cells (fibers) in the JK direction (cross-section coordinate Z)

areaFi24 = math.pi * (24e-3)**2 / 4.0
areaFi12 = math.pi * (12e-3)**2 / 4.0

l = 1e-7  # Distance between nodes

# Model definition
problem = xc.ProblemaEF()  #necesary to create this instance of
#the class xc.ProblemaEF()
preprocessor = problem.getPreprocessor
nodes = preprocessor.getNodeLoader  #nodes container
modelSpace = predefined_spaces.StructuralMechanics3D(
    nodes
)  #Defines the dimension of nodes  three coordinates (x,y,z) and six DOF for each node (Ux,Uy,Uz,thetaX,thetaY,thetaZ)

nodes.defaultTag = 1  #First node number.
nod = nodes.newNodeXYZ(1.0, 0,
                       0)  #node 1 defined by its (x,y,z) global coordinates
nod = nodes.newNodeXYZ(1.0 + l, 0,
                       0)  #node 2 defined by its (x,y,z) global coordinates

# Materials definition
concrete = EC2_concrete.C30  #concrete according to EC2 fck=30 MPa
示例#4
0
# Testing hinge development in a cantilever.

import xc_base
import geom
import xc

from materials.perfiles_metalicos.arcelor import perfiles_ipe_arcelor as ipe
from materials import aceros_estructurales as steel

__author__= "Luis C. Pérez Tato (LCPT)"
__copyright__= "Copyright 2014, LCPT"
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

test= xc.ProblemaEF()
preprocessor=  test.getPreprocessor

S275JR= steel.S275JR
S275JR.gammaM= 1.05
epp= S275JR.getDesignElasticPerfectlyPlasticMaterial(preprocessor, "epp")
IPE200= ipe.IPEProfile(S275JR,'IPE_200')
fs3d= IPE200.getFiberSection3d(preprocessor,'epp')

curvM= 0.13
fs3d.setTrialSectionDeformation(xc.Vector([0.0,curvM,0.0]))
fs3d.commitState()
Mp1= fs3d.getStressResultantComponent("Mz")
fs3d.revertToStart()
fs3d.setTrialSectionDeformation(xc.Vector([0.0,0.0,curvM]))
fs3d.commitState()
示例#5
0
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials
import math

E = 30e6  #Young modulus (psi)
l = 15 * 12  #Bar length (15 pies) expresada in inches}
theta = math.radians(30)  #angle between bars
F = 5000  #Force magnitude (pounds)}
A = 0.5  #Área in inches cuadradas}
a = 2 * l * math.cos(theta)  #Distancia entre nodos extremos}
b = l * math.sin(theta)  #Distancia entre nodos extremos}

prb = xc.ProblemaEF()
preprocessor = prb.getPreprocessor
nodes = preprocessor.getNodeLoader

# Problem type
modelSpace = predefined_spaces.SolidMechanics2D(nodes)

nodes.defaultTag = 1  #First node number.
nodes.newNodeXYZ(0, 0, 0)
nodes.newNodeXYZ(a / 2, -b, 0)
nodes.newNodeXYZ(a, 0, 0)

# Materials definition
elast = typical_materials.defElasticMaterial(preprocessor, "elast", E)
elast.E = E