Пример #1
0
def getMembranePlateMaterials(preprocessor):
    ''' return a dictionary with the XC materials for shell elements.'''
    retval = dict()
    for key in steel_dict:
        steelType = steel_dict[key]
        #retval[key]= typical_materials.defElasticMembranePlateSection(preprocessor, 'xc_'+key,steelType.E,steelType.nu,7850.0,h= 0.0)
        steel3DName = '3Dmat_' + key
        steel3d = typical_materials.defElasticIsotropic3d(preprocessor,
                                                          steel3DName,
                                                          steelType.E,
                                                          steelType.nu,
                                                          rho=steelType.rho)
        retval[steel3DName] = steel3d
        plateFiberName = 'plateFiber_' + key
        # Thickness is assigned later for each element.
        plateFiber = typical_materials.defMembranePlateFiberSection(
            preprocessor, name=plateFiberName, h=0.0, nDMaterial=steel3d)
        retval[key] = plateFiber
    return retval
Пример #2
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

import xc_base
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials

# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
# Materials definition
elast = typical_materials.defElasticIsotropic3d(preprocessor, "elast3d", 1e6,
                                                0.25, 0.0)

nodes = preprocessor.getNodeLoader
modelSpace = predefined_spaces.SolidMechanics3D(nodes)
nod1 = nodes.newNodeXYZ(0.249, 0.342, 0.192)
nod2 = nodes.newNodeXYZ(0.826, 0.288, 0.288)
nod3 = nodes.newNodeXYZ(0.850, 0.649, 0.263)
nod4 = nodes.newNodeXYZ(0.273, 0.750, 0.230)
nod5 = nodes.newNodeXYZ(0.320, 0.186, 0.643)
nod6 = nodes.newNodeXYZ(0.677, 0.305, 0.683)
nod7 = nodes.newNodeXYZ(0.788, 0.693, 0.644)
nod8 = nodes.newNodeXYZ(0.165, 0.745, 0.702)
nod9 = nodes.newNodeXYZ(0, 0, 0)
nod10 = nodes.newNodeXYZ(1, 0, 0)
nod11 = nodes.newNodeXYZ(1, 1, 0)
nod12 = nodes.newNodeXYZ(0, 1, 0)
Пример #3
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

import xc_base
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials

# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
# Materials definition
elast = typical_materials.defElasticIsotropic3d(preprocessor, "elast3d",
                                                200000, 0.3, 0.0)

nodes = preprocessor.getNodeHandler
modelSpace = predefined_spaces.SolidMechanics3D(nodes)
nodes.defaultTag = 1  #Next node number.
nod1 = nodes.newNodeXYZ(100, 0, 100)
nod2 = nodes.newNodeXYZ(0, 0, 100)
nod3 = nodes.newNodeXYZ(0, 0, 200)
nod4 = nodes.newNodeXYZ(100, 0, 200)
nod5 = nodes.newNodeXYZ(100, 100, 100)
nod6 = nodes.newNodeXYZ(0, 100, 100)
nod7 = nodes.newNodeXYZ(0, 100, 200)
nod8 = nodes.newNodeXYZ(100, 100, 200)

nod9 = nodes.newNodeXYZ(100, 200, 100)
nod10 = nodes.newNodeXYZ(0, 200, 100)
Пример #4
0
elements = prep.getElementHandler
elements.dimElem = 3
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)

gridGeom = gm.GridModel(prep, rList, angList, zList, xCentCoo=0, yCentCoo=0)
gridGeom.generateCylZPoints()

ring = gridGeom.genSurfOneXYZRegion([(r1, 0, 0), (r2, angList[-1], 0)],
                                    setName='ring',
                                    closeCyl='Y')
#out=outHndl.OutputHandler(modelSpace)
#out.displayBlocks()

steel = tm.defElasticIsotropic3d(preprocessor=preprocessor,
                                 name='steel',
                                 E=172e9,
                                 nu=0.3,
                                 rho=matRho)
ring_mat = tm.defMembranePlateFiberSection(preprocessor,
                                           name='ring_mat',
                                           h=t,
                                           nDMaterial=steel)
ring_mesh = fem.SurfSetToMesh(surfSet=ring,
                              matSect=ring_mat,
                              elemSize=0.5,
                              elemType='ShellMITC4')
fem.multi_mesh(prep, [ring_mesh])

# Constraints
xcTotalSet = modelSpace.getTotalSet()
constrainedNodes = list()
Пример #5
0
n30 = nodes.newNodeXYZ(9.0, 0., 0.)
n31 = nodes.newNodeXYZ(10., 1., 0.)
n32 = nodes.newNodeXYZ(10., 0.5, 0.)
n33 = nodes.newNodeXYZ(10., 0., 0.)

# Constraints.
constrainedNodes = [n1, n2, n3]
for n in constrainedNodes:
    modelSpace.fixNode000_000(n.tag)

# Materials
E = 1.2e6
nu = 0.3
elast3d = typical_materials.defElasticIsotropic3d(preprocessor,
                                                  "elast3d",
                                                  E,
                                                  nu,
                                                  rho=0.0)
thickness = 0.1
plateFiber = typical_materials.defMembranePlateFiberSection(preprocessor,
                                                            name="plateFiber",
                                                            h=thickness,
                                                            nDMaterial=elast3d)
## Full circle moment
I = 1 / 12.0 * 1.0 * thickness**3
L = 10.0  # lenght of the beam
Mcircle = 2.0 * math.pi * E * I / L

# Elements
elements = preprocessor.getElementHandler
elements.defaultMaterial = plateFiber.name
A = h * h  # bar area expressed in square meters
I = (h)**4 / 12  # Cross section moment of inertia (m4)
AT = 10.0  # Temperature increment (Celsius degrees)

feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
nodes.defaultTag = 1  # First node number.
nod1 = nodes.newNodeXYZ(0.0, 0.0, 0.0)
nod2 = nodes.newNodeXYZ(L, 0.0, 0.0)
nod3 = nodes.newNodeXYZ(L, h, 0.0)
nod4 = nodes.newNodeXYZ(0, h, 0.0)

# Materials definition
ndMat = typical_materials.defElasticIsotropic3d(preprocessor, "elastIso3d", E,
                                                0.3, 0.0)
memb1 = typical_materials.defMembranePlateFiberSection(preprocessor,
                                                       name='memb1',
                                                       h=h,
                                                       nDMaterial=ndMat)

# Elements definition
elements = preprocessor.getElementHandler
elements.defaultMaterial = memb1.name
elem1 = elements.newElement("ShellMITC4",
                            xc.ID([nod1.tag, nod2.tag, nod3.tag, nod4.tag]))

# Constraints
constraints = preprocessor.getBoundaryCondHandler

spc = constraints.newSPConstraint(nod1.tag, 0, 0.0)
Пример #7
0
# Home made test

__author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__= "Copyright 2015, LCPT and AOO"
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

E= 30e6 # Young modulus (psi)
nu= 0.33 # Poisson's ratio
rho= 1.5 # Density

import xc_base
import geom
import xc
from model import predefined_spaces
from materials import typical_materials

# Define materials
feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor
mat= typical_materials.defElasticIsotropic3d(preprocessor, "elastIso3d",E,nu,rho)

import os
from miscUtils import LogMessages as lmsg
fname= os.path.basename(__file__)
if (abs(mat.E-E)<1e-15) & (abs(mat.nu-nu)<1e-15) & (abs(mat.rho-rho)<1e-15):
  print "test ",fname,": ok."
else:
  lmsg.error(fname+' ERROR.')
Пример #8
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

import xc_base
import geom
import xc
from model import predefined_spaces
from materials import typical_materials
from postprocess import output_handler

# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
# Materials definition
concrete = typical_materials.defElasticIsotropic3d(preprocessor, "concrete3d",
                                                   28.3e9, 0.2, 0.0)

# Geometry

width = 6 * 0.0254
length = 4 * 0.3048
height = 12 * 0.0254

## Block topology

points = preprocessor.getMultiBlockTopology.getPoints
pt1 = points.newPntFromPos3d(geom.Pos3d(0.0, 0.0, 0.0))
pt2 = points.newPntFromPos3d(geom.Pos3d(width, 0.0, 0.0))
pt3 = points.newPntFromPos3d(geom.Pos3d(width, length, 0.0))
pt4 = points.newPntFromPos3d(geom.Pos3d(0.0, length, 0.0))
pt5 = points.newPntFromPos3d(geom.Pos3d(0.0, 0.0, height))
Пример #9
0
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

import xc_base
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials

# Problem type
feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor
# Materials definition
elast= typical_materials.defElasticIsotropic3d(preprocessor, "elast3d",1e6,0.25,0.0)

nodes= preprocessor.getNodeHandler 
modelSpace= predefined_spaces.SolidMechanics3D(nodes)
nod9= nodes.newNodeIDXYZ(9,0,0,0)
nod10= nodes.newNodeIDXYZ(10,1,0,0)
nod11= nodes.newNodeIDXYZ(11,1,1,0)
nod12= nodes.newNodeIDXYZ(12,0,1,0)
nod13= nodes.newNodeIDXYZ(13,0,0,1)
nod14= nodes.newNodeIDXYZ(14,1,0,1)
nod15= nodes.newNodeIDXYZ(15,1,1,1)
nod16= nodes.newNodeIDXYZ(16,0,1,1)


elements= preprocessor.getElementHandler
elements.defaultMaterial= "elast3d"
Пример #10
0
# Problem type
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)

# Material definition
## Steel material
steel = ASTM_materials.A992
steel.gammaM = 1.00
sg_yield = steel.fy  # Allowable stress: yield stress of steel (Pa)

## XC material model
steel3d = typical_materials.defElasticIsotropic3d(preprocessor,
                                                  "steel3d",
                                                  steel.E,
                                                  steel.nu,
                                                  rho=steel.rho)

plateFiber = typical_materials.defMembranePlateFiberSection(preprocessor,
                                                            name="plateFiber",
                                                            h=t,
                                                            nDMaterial=steel3d)

# Problem geometry
# The “bottom-up method” generates the geometry of the system
# going  from  key  points (0D) to lines (1D) and areas (2D)
# up to volumes (3D).

p1 = modelSpace.newKPoint(0.0, h / 2.0)
p2 = modelSpace.newKPoint(L / 2.0, h / 2.0)
Пример #11
0
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

import xc_base
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials

# Problem type
feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor
# Materials definition
elast= typical_materials.defElasticIsotropic3d(preprocessor, "elast3d",200000,0.3,0.0)

nodes= preprocessor.getNodeHandler 
modelSpace= predefined_spaces.SolidMechanics3D(nodes)
nodes.defaultTag= 1 #Next node number.
nod1= nodes.newNodeXYZ(100,0,100)
nod2= nodes.newNodeXYZ(0,0,100)
nod3= nodes.newNodeXYZ(0,0,200)
nod4= nodes.newNodeXYZ(100,0,200)
nod5= nodes.newNodeXYZ(100,100,100)
nod6= nodes.newNodeXYZ(0,100,100)
nod7= nodes.newNodeXYZ(0,100,200)
nod8= nodes.newNodeXYZ(100,100,200)

nod9= nodes.newNodeXYZ(100,200,100)
nod10= nodes.newNodeXYZ(0,200,100)