CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Structural Mechanics

ABAQUS Assigning Composite Problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2023, 12:20
Default ABAQUS Assigning Composite Problem
  #1
Member
 
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4
R786 is on a distinguished road
Hello,
I have a python script which I am using to apply a composite assign to a box but I get error in this script, what can be the reason, I think its the surface of the box
from abaqus import *
from abaqusConstants import *




# functions


def Create_Part_3D(length,thickness,width,part,model):
s1 = mdb.models[model].ConstrainedSketch(name='__profile__', sheetSize=200.0)
g, v, d, c = s1.geometry, s1.vertices, s1.dimensions, s1.constraints
s1.setPrimaryObject(option=STANDALONE)
s1.Line(point1=(0.0, 0.0), point2=(length, 0.0))
s1.Line(point1=(length,0.0), point2=(length, thickness))
s1.Line(point1=(length,thickness), point2=(0, thickness))
s1.Line(point1=(0, thickness), point2=(0,0))
p = mdb.models[model].Part(name=part, dimensionality=THREE_D, type=DEFORMABLE_BODY)
p = mdb.models[model].parts[part]
p.BaseSolidExtrude(sketch=s1, depth=width)
s1.unsetPrimaryObject()
p = mdb.models[model].parts[part]
del mdb.models[model].sketches['__profile__']

def Create_Datum_Plane_by_Principal(type_plane,part,mo del,offset_plane):
p = mdb.models[model].parts[part]
p.DatumPlaneByPrincipalPlane(principalPlane=type_p lane, offset=offset_plane)

def Create_Set_All_Cells(model,part,set_name):
p = mdb.models[model].parts[part]
c = p.cells[:]
p.Set(cells=c, name=set_name)

def Create_Material_Data(model,material_name,e11,e22,e 33,nu12,nu13,nu23,g12,g13,g23,lts,lcs,tts,tcs,lss, tss):
mdb.models[model].Material(name=material_name)
mdb.models[model].materials[material_name].Elastic(type=ENGINEERING_CONSTANTS, table=((e11,e22,e33,nu12,nu13,nu23,g12,g13,g23), ))
mdb.models[model].materials[material_name].HashinDamageInitiation(table=((lts,lcs,tts,tcs,ls s,tss), ))


def Create_Assembly(model,part,instance_name):
a = mdb.models[model].rootAssembly
a.DatumCsysByDefault(CARTESIAN)
p = mdb.models[model].parts[part]
a.Instance(name=instance_name, part=p, dependent=ON)

def Create_Set_Face(x,y,z,model,part,set_name):
face = ()
p = mdb.models[model].parts[part]
f = p.faces
myFace = f.findAt((x,y,z),)
face = face + (f[myFace.index:myFace.index+1], )
p.Set(faces=face, name=set_name)

def Create_Set_Surface(x,y,z,model,part,set_name):
face = ()
p = mdb.models[model].parts[part]
s = p.faces
myFace = s.findAt((x,y,z),)
face = face + (s[myFace.index:myFace.index+1], )
p.Surface(side1Faces=face, name=set_name)

def Create_Composite_Layup(model,part,set_name,composi te_name,number,material,thickness,angle):
layupOrientation = None
p = mdb.models[model].parts[part]
region1=p.sets[set_name]
normalAxisRegion = p.sets['Outer-Surface']
primaryAxisRegion = p.sets['Panel']
compositeLayup = mdb.models[model].parts[part].CompositeLayup(name=composite_name, description='', elementType=CONTINUUM_SHELL, symmetric=False)
compositeLayup.Section(preIntegrate=OFF, integrationRule=SIMPSON, poissonDefinition=DEFAULT, thicknessModulus=None, temperature=GRADIENT, useDensity=OFF)
for i in range(0,number,1):
compositeLayup.CompositePly(suppressed=False, plyName='Ply-'+str(i), region=region1, material=material, thicknessType=SPECIFY_THICKNESS, thickness=thickness, orientationType=SPECIFY_ORIENT, orientationValue=angle[i], additionalRotationType=ROTATION_NONE, additionalRotationField='', axis=AXIS_3, angle=0.0, numIntPoints=3)
compositeLayup.ReferenceOrientation(orientationTyp e=DISCRETE, localCsys=None, additionalRotationType=ROTATION_ANGLE, angle=90.0, additionalRotationField='', axis=AXIS_3, stackDirection=STACK_3, normalAxisDefinition=SURFACE, normalAxisRegion=normalAxisRegion, normalAxisDirection=AXIS_3, flipNormalDirection=False, primaryAxisDefinition=EDGE, primaryAxisRegion=primaryAxisRegion, primaryAxisDirection=AXIS_2, flipPrimaryDirection=False)


# variables


myString = "Wingbox"
myPart="Panel"
myLength = 25.0
myWidth=50.0
myThickness = 2.5
myModel = mdb.Model(name=myString)
myPart = "Panel"
myAngle = [45,-45,0,90,90,0,-45,45]
myPlyNumber = len(myAngle)

# material parameters

myE11 = 133000
myE22 = 11500
myE33 = 11500
myNu12 = 0.32
myNu13 = 0.32
myNu23 = 0.37
myG12 = 4800
myG13 = 4800
myG23 = 4200

# hashin damage parameters

myLTS = 1200
myLCS = 972
myTTS = 37
myTCS = 147
myLSS = 71.5
myTSS = 32

#create model

Create_Part_3D(myLength,myThickness,myWidth,myPart ,myString)
Create_Datum_Plane_by_Principal(XZPLANE,myPart,myS tring,0.0)
Create_Datum_Plane_by_Principal(XYPLANE,myPart,myS tring,myLength)
Create_Datum_Plane_by_Principal(YZPLANE,myPart,myS tring,0.0)
Create_Set_All_Cells(myString,myPart,"Panel")

Create_Set_Face(myWidth-myLength,0.0,0.0,myString,myPart,"Outer-Surface")
Create_Set_Face(myWidth-myLength,0.0,myWidth,myString,myPart,"Outer-Surface1")
Create_Set_Face(myLength/2.0,myThickness,myThickness,myString,myPart,"RP-1")
Create_Set_Face(myLength/2.0,0.0,myThickness,myString,myPart,"RP-2")
Create_Set_Surface(myWidth,myThickness,myLength,my String,myPart,"Outer-Surface")
Create_Composite_Layup(myString,myPart,"Panel","Qu asi_Isotropic",myPlyNumber,"CFRP",myThickness/myPlyNumber,myAngle)
Create_Material_Data(myString,"CFRP",myE11,myE22,m yE33,myNu12,myNu13,myNu23,myG12,myG13,myG23,myLTS, myLCS,myTTS,myTCS,myLSS,myTSS)
Create_Assembly(myString,myPart,"Panel")
R786 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 11 September 4, 2024 04:28
Is COMSOL Multi Physics is suitable to solve complex flow problem? steve lee COMSOL 8 January 5, 2023 02:31
Mesh& steptime independant: conduction-convection problem Fati1 Main CFD Forum 1 October 28, 2018 13:52
Problem diverges when exhaust valve opens swerner0711 AVL FIRE 0 September 21, 2018 07:14
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59


All times are GMT -4. The time now is 20:19.