def __init__(self, pid, global_ply_ids, mids, thicknesses, thetas, cordm=0, psdir=13, sb=None, nb=None, tref=0.0, ge=0.0, failure_theories=None, interlaminar_failure_theories=None, souts=None, comment=''): if comment: self.comment = comment nplies = len(mids) if failure_theories is None: failure_theories = [None] * nplies if interlaminar_failure_theories is None: interlaminar_failure_theories = [None] * nplies if souts is None: souts = ['NO'] * nplies Property.__init__(self) self.pid = pid self.cordm = cordm self.psdir = psdir self.sb = sb self.nb = nb self.tref = tref self.ge = ge assert psdir in [12, 13, 21, 23, 31, 32], psdir self.global_ply_ids = global_ply_ids self.mids = mids self.thicknesses = np.array(thicknesses, dtype='float64') self.thetas = np.array(thetas, dtype='float64') self.failure_theories = failure_theories self.interlaminar_failure_theories = interlaminar_failure_theories self.souts = souts self.mids_ref = None
def __init__(self, pid, mid, OD1, t=None, nsm=0., OD2=None, comment=''): """ Adds a PTUBE card Parameters ---------- pid : int property id mid : int material id OD1 : float outer diameter at End A t : float; default=None -> OD1/2. thickness nsm : float; default=0. non-structural mass per unit length OD2 : float; default=None -> OD1 outer diameter at End B comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment if t is None: t = OD1 / 2. if OD2 is None: OD2 = OD1 self.pid = pid self.mid = mid self.OD1 = OD1 self.OD2 = OD2 self.t = t self.nsm = nsm
def __init__(self, sid, nsm_type, value, ids, comment=''): """ Creates an NSM1 card Parameters ---------- sid : int Case control NSM id nsm_type : str Type of card the NSM is applied to valid_properties = { PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT } value : float the non-structural pass per unit length/area ids : List[int] property ids or element ids depending on nsm_type comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment if isinstance(ids, integer_types): ids = [ids] self.sid = sid self.nsm_type = nsm_type self.ids = ids self.value = value if self.nsm_type not in self.valid_properties: raise TypeError('nsm_type=%r must be in [%s]' % (self.nsm_type, ', '.join(self.valid_properties))) assert isinstance(ids, list), 'ids=%r is not a list' % (ids)
def __init__(self, pid, mid, stress_strain='GRID', ge=0., comment=''): """ Creates a PLSOLID card Parameters ---------- pid : int property id mid : int material id stress_strain : str Location of stress and strain output valid types = {GRID, GAUSS} ge : float; default=0. damping coefficient comment : str; default='' a comment for the card """ Property.__init__(self) if stress_strain == 'GAUS': stress_strain = 'GAUSS' if comment: self.comment = comment #: Property ID self.pid = pid #: Material ID self.mid = mid #: Location of stress and strain output self.stress_strain = stress_strain self.ge = ge assert isinstance(pid, integer_types), type(pid) assert isinstance(mid, integer_types), type(mid) self.mid_ref = None
def __init__(self, pid, mid, A, j=0., c=0., nsm=0., comment=''): """ Creates a PROD card Parameters ---------- pid : int property id mid : int material id A : float area J : float; default=0. polar moment of inertia c : float; default=0. stress factor nsm : float; default=0. nonstructural mass per unit length comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment self.pid = pid self.mid = mid self.A = A self.j = j self.c = c self.nsm = nsm
def __init__(self, sid, nsm_type, pid_eid, value, comment=''): """ Creates an NSM/NSM1 card Parameters ---------- sid : int Case control NSM id nsm_type : str Type of card the NSM is applied to valid_properties = { PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT } pid_eid : int property id or element id depending on nsm_type value : float the non-structural pass per unit length/area comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment self.sid = sid self.nsm_type = nsm_type self.id = pid_eid self.value = value assert isinstance(pid_eid, int), pid_eid assert isinstance(value, float), value if self.nsm_type not in self.valid_properties: raise TypeError('nsm_type=%r must be in [%s]' % ( self.nsm_type, ', '.join(self.valid_properties)))
def __init__(self, pid, mid1, t1, mid2, i, mid3, t2, nsm, z1, z2, phi, comment=''): Property.__init__(self) if comment: self.comment = comment self.pid = pid self.mid1 = mid1 self.t1 = t1 self.mid2 = mid2 self.i = i self.mid3 = mid3 self.t2 = t2 self.nsm = nsm self.z1 = z1 self.z2 = z2 self.phi = phi self.mid_ref = None
def __init__(self, pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge, comment=''): Property.__init__(self) if comment: self._comment = comment #: Property ID self.pid = pid #: diameter of the fastener self.d = d #: Specifies the element stiffness coordinate system self.mcid = mcid #: 0-absolute 1-relative self.mflag = mflag #: stiffness values in directions 1-3 self.kt1 = kt1 self.kt2 = kt2 self.kt3 = kt3 #: Rotational stiffness values in directions 1-3 self.kr1 = kr1 self.kr2 = kr2 self.kr3 = kr3 #: Lumped mass of fastener self.mass = mass #: Structural damping self.ge = ge assert self.d > 0 assert mflag in [0, 1] assert self.mcid >= -1
def __init__(self, pid, u0, f0, ka, kb, mu1, kt, mu2, tmax, mar, trmin, comment=''): """ Defines the properties of the gap element (CGAP entry). """ Property.__init__(self) if comment: self._comment = comment #: Property ID self.pid = pid #: initial gap opening self.u0 = u0 #: preload self.f0 = f0 #: axial stiffness of closed gap self.ka = ka #: axial stiffness of open gap self.kb = kb #: static friction coeff self.mu1 = mu1 #: transverse stiffness of closed gap self.kt = kt #: kinetic friction coeff self.mu2 = mu2 self.tmax = tmax self.mar = mar self.trmin = trmin
def __init__(self, pid, mid, OD1, t=None, nsm=0., OD2=None, comment=''): """ Adds a PTUBE card Parameters ---------- pid : int property id mid : int material id OD1 : float outer diameter at End A t : float; default=None -> OD1/2. thickness nsm : float; default=0. non-structural mass per unit length OD2 : float; default=None -> OD1 outer diameter at End B comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment if t is None: t = OD1 / 2. if OD2 is None: OD2 = OD1 self.pid = pid self.mid = mid self.OD1 = OD1 self.OD2 = OD2 self.t = t self.nsm = nsm self.mid_ref = None
def __init__(self, pid, mid, A, j=0., c=0., nsm=0., comment=''): """ Creates a PROD card Parameters ---------- pid : int property id mid : int material id A : float area J : float; default=0. polar moment of inertia c : float; default=0. stress factor nsm : float; default=0. nonstructural mass per unit length comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment self.pid = pid self.mid = mid self.A = A self.j = j self.c = c self.nsm = nsm self.mid_ref = None
def __init__(self, pid, mid1, t1=None, mid2=0, i=None, mid3=None, t2=None, nsm=None, z1=None, z2=None, phi=None, comment=''): """ Creates a PCONEAX Parameters ---------- pid : int PCONEAX property id for a CCONEAX. mid1 : int Membrane material id mid2 : int bending material id mid3 : int transverse shear material id t1 : float Membrane thickness. (Real > 0.0 if MID1 = 0) t2 : float Transverse shear thickness. (Real > 0.0 if MID3 = 0) I : float Moment of inertia per unit width. nsm : float Nonstructural mass per unit area. z1, z2 : float Fiber distances from the middle surface for stress recovery. phi : List[float] Azimuthal coordinates (in degrees) for stress recovery. """ Property.__init__(self) if comment: self.comment = comment if phi is None: phi = [] self.pid = pid self.mid1 = mid1 self.t1 = t1 self.mid2 = mid2 self.i = i self.mid3 = mid3 self.t2 = t2 self.nsm = nsm self.z1 = z1 self.z2 = z2 self.phi = phi self.mid1_ref = None self.mid2_ref = None self.mid3_ref = None
def __init__(self): self.Type = None self.dim = None self.A = None self.i1 = None self.i2 = None self.i12 = None self.j = None self.nsm = None Property.__init__(self)
def __init__(self, pid, mid, A, j=0., c=0., nsm=0., comment=''): Property.__init__(self) if comment: self._comment = comment self.pid = pid self.mid = mid self.A = A self.j = j self.c = c self.nsm = nsm
def __init__(self, pid, mid, OD1, t, nsm, OD2, comment=''): Property.__init__(self) if comment: self._comment = comment self.pid = pid self.mid = mid self.OD1 = OD1 self.OD2 = OD2 self.t = t self.nsm = nsm
def __init__(self, pid, d, kt1, kt2, kt3, mcid=-1, mflag=0, kr1=0., kr2=0., kr3=0., mass=0., ge=0., comment=''): """ Creates a PAST card Parameters ---------- pid : int property id d : int diameter of the fastener kt1, kt2, kt3 : float stiffness values in directions 1-3 mcid : int; default=01 specifies the element stiffness coordinate system mflag : int; default=0 0-absolute; 1-relative kr1, kr2, kr3 : float; default=0.0 rotational stiffness values in directions 1-3 mass : float; default=0.0 lumped mass of the fastener ge : float; default=0.0 structural damping comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment #: Property ID self.pid = pid #: diameter of the fastener self.d = d #: Specifies the element stiffness coordinate system self.mcid = mcid #: 0-absolute 1-relative self.mflag = mflag #: stiffness values in directions 1-3 self.kt1 = kt1 self.kt2 = kt2 self.kt3 = kt3 #: Rotational stiffness values in directions 1-3 self.kr1 = kr1 self.kr2 = kr2 self.kr3 = kr3 #: Lumped mass of fastener self.mass = mass #: Structural damping self.ge = ge assert self.d > 0 assert mflag in [0, 1] assert self.mcid >= -1 self.mcid_ref = None
def __init__(self, sid, nsm_type, value, ids, comment=''): """ Creates an NSM1/NSML1 card Parameters ---------- sid : int Case control NSM id nsm_type : str Type of card the NSM is applied to valid_properties = { PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT } value : float NSM1: the non-structural pass per unit length/area NSML1: the total non-structural pass per unit length/area; the nsm will be broken down based on a weighted area/length ids : List[int] property ids or element ids depending on nsm_type comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment if isinstance(ids, integer_types): ids = [ids] if isinstance(ids, str): assert ids == 'ALL', 'ids=%r is not ALL' % ids ids = [ids] else: # With the 'THRU' and 'THRU', 'BY' forms, blanks fields are # allowed for readability. Any combination of a list of IDs # and 'THRU' and 'THRU', 'BY' is allowed. The "THRU" and "BY" # lists may have missing IDs. That is the list of IDs in a # THRU range need not be continuous. ids = expand_thru_by(ids, allow_blanks=True) assert len(ids) > 0, ids self.sid = sid self.nsm_type = nsm_type # TODO: expand the node ids self.ids = ids self.value = value #print(str(self)) if self.nsm_type not in self.valid_properties: raise TypeError('nsm_type=%r must be in [%s]' % (self.nsm_type, ', '.join(self.valid_properties))) assert isinstance(ids, list), 'ids=%r is not a list' % (ids)
def __init__(self, pid, mid1, t1, mid2, i, mid3, t2, nsm, z1, z2, phi, comment=''): Property.__init__(self) if comment: self._comment = comment self.pid = pid self.mid1 = mid1 self.t1 = t1 self.mid2 = mid2 self.i = i self.mid3 = mid3 self.t2 = t2 self.nsm = nsm self.z1 = z1 self.z2 = z2 self.phi = phi
def __init__(self, pid, u0=0., f0=0., ka=1.e8, kb=None, mu1=0., kt=None, mu2=None, tmax=0., mar=100., trmin=0.001, comment=''): """ Defines the properties of the gap element (CGAP entry). """ Property.__init__(self) if comment: self.comment = comment if kb is None: kb = 1e-14 * ka if kt is None: kt = mu1 * ka if mu2 is None: mu2 = mu1 #: Property ID self.pid = pid #: initial gap opening self.u0 = u0 #: preload self.f0 = f0 #: axial stiffness of closed gap self.ka = ka #: axial stiffness of open gap self.kb = kb #: static friction coeff self.mu1 = mu1 #: transverse stiffness of closed gap self.kt = kt #: kinetic friction coeff self.mu2 = mu2 self.tmax = tmax self.mar = mar self.trmin = trmin
def __init__(self, pid, mass, comment=''): """ Creates an PMASS card, which defines a mass applied to a single DOF Parameters ---------- pid : int Property id used by a CMASS1/CMASS3 card mass : float the mass to apply comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment self.pid = pid self.mass = mass
def __init__(self, pid, d, mcid, mflag, kt1, kt2, kt3, kr1, kr2, kr3, mass, ge, comment=''): Property.__init__(self) if comment: self.comment = comment #: Property ID self.pid = pid #: diameter of the fastener self.d = d #: Specifies the element stiffness coordinate system self.mcid = mcid #: 0-absolute 1-relative self.mflag = mflag #: stiffness values in directions 1-3 self.kt1 = kt1 self.kt2 = kt2 self.kt3 = kt3 #: Rotational stiffness values in directions 1-3 self.kr1 = kr1 self.kr2 = kr2 self.kr3 = kr3 #: Lumped mass of fastener self.mass = mass #: Structural damping self.ge = ge assert self.d > 0 assert mflag in [0, 1] assert self.mcid >= -1
def __init__(self, pid, global_ply_ids, mids, thicknesses, thetas, direct=1, cordm=0, sb=None, analysis='ISH', c8=None, c20=None, comment=''): """ | PCOMPLS | PID | DIRECT | CORDM | SB | ANAL | | | C8 | BEH8 | INT8 | BEH8H | INT8H | | | C20 | BEH20 | INT20 | BEH20H | INT20H | | | ID1 | MID1 | T1 | THETA1 | | | | ID2 | MID2 | T2 | THETA2 | | """ if comment: self.comment = comment nplies = len(mids) if c8 is None: c8 = [] if c20 is None: c20 = [] Property.__init__(self) self.pid = pid self.direct = direct self.analysis = analysis self.cordm = cordm self.sb = sb self.global_ply_ids = global_ply_ids self.mids = mids self.thicknesses = np.array(thicknesses, dtype='float64') self.thetas = np.array(thetas, dtype='float64') self.c8 = c8 self.c20 = c20 self.mids_ref = None
def __init__(self, pid, u0, f0, ka, kb, mu1, kt, mu2, tmax, mar, trmin, comment=''): """ Defines the properties of the gap element (CGAP entry). """ Property.__init__(self) if comment: self.comment = comment #: Property ID self.pid = pid #: initial gap opening self.u0 = u0 #: preload self.f0 = f0 #: axial stiffness of closed gap self.ka = ka #: axial stiffness of open gap self.kb = kb #: static friction coeff self.mu1 = mu1 #: transverse stiffness of closed gap self.kt = kt #: kinetic friction coeff self.mu2 = mu2 self.tmax = tmax self.mar = mar self.trmin = trmin
def __init__(self): Property.__init__(self)
def __init__(self): Property.__init__(self) self.mid_ref = None
def __init__(self, card, data): Property.__init__(self, card, data)
def __init__(self, pid, mid, cordm=0, integ=None, stress=None, isop=None, fctn='SMECH', comment=''): """ Creates a PSOLID card Parameters ---------- pid : int property id mid : int material id cordm : int; default=0 material coordinate system integ : int; default=None None-varies depending on element type 0, 'BUBBLE' 1, 'GAUSS' 2, 'TWO' 3, 'THREE' REDUCED FULL stress : int/str; default=None None/GRID, 1-GAUSS isop : int/str; default=None 0-REDUCED 1-FULL fctn : str; default='SMECH' PFLUID/SMECH comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment #: Property ID self.pid = pid #: Material ID self.mid = mid self.cordm = cordm #valid_integration = ['THREE', 'TWO', 'FULL', 'BUBBLE', # 2, 3, None, 'REDUCED'] # note that None is supposed to vary depending on element type # 0-BUBBLE (not for midside nodes) # 1-GAUSS # 2-TWO # 3-THREE if integ == 0: integ = 'BUBBLE' elif integ == 1: integ = 'GAUSS' elif integ == 2: integ = 'TWO' elif integ == 3: integ = 'THREE' self.integ = integ # blank/GRID # 1-GAUSS if stress == 0: stress = 'GRID' elif stress == 1: stress = 'GAUSS' self.stress = stress # note that None is supposed to vary depending on element type # 0-REDUCED # 1-FULL if isop == 0: isop = 'REDUCED' elif isop == 1: isop = 'FULL' elif isop == 2: pass self.isop = isop # PFLUID # SMECH if fctn == 'SMEC': fctn = 'SMECH' elif fctn == 'PFLU': fctn = 'PFLUID' self.fctn = fctn self.mid_ref = None
def __init__(self, pid, u0=0., f0=0., ka=1.e8, kb=None, mu1=0., kt=None, mu2=None, tmax=0., mar=100., trmin=0.001, comment=''): """ Defines the properties of the gap element (CGAP entry). Parameters ---------- pid : int property id for a CGAP u0 : float; default=0. Initial gap opening f0 : float; default=0. Preload ka : float; default=1.e8 Axial stiffness for the closed gap kb : float; default=None -> 1e-14 * ka Axial stiffness for the open gap mu1 : float; default=0. Coefficient of static friction for the adaptive gap element or coefficient of friction in the y transverse direction for the nonadaptive gap element kt : float; default=None -> mu1*ka Transverse stiffness when the gap is closed mu2 : float; default=None -> mu1 Coefficient of kinetic friction for the adaptive gap element or coefficient of friction in the z transverse direction for the nonadaptive gap element tmax : float; default=0. Maximum allowable penetration used in the adjustment of penalty values. The positive value activates the penalty value adjustment mar : float; default=100. Maximum allowable adjustment ratio for adaptive penalty values KA and KT trmin : float; default=0.001 Fraction of TMAX defining the lower bound for the allowable penetration comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment if kb is None: kb = 1e-14 * ka if kt is None: kt = mu1 * ka if mu2 is None: mu2 = mu1 #: Property ID self.pid = pid #: initial gap opening self.u0 = u0 #: preload self.f0 = f0 #: axial stiffness of closed gap self.ka = ka #: axial stiffness of open gap self.kb = kb #: static friction coeff self.mu1 = mu1 #: transverse stiffness of closed gap self.kt = kt #: kinetic friction coeff self.mu2 = mu2 self.tmax = tmax self.mar = mar self.trmin = trmin
def __init__(self, pid, mid1=None, t_membrane=None, mid2=None, inertia=1.0, mid3=None, t_shear=0.833333, nsm=0.0, z1=None, z2=None, comment=''): """ Creates a PSHELL card Parameters ---------- pid : int property id mid1 : int Material id number for membrane (Integer > 0). t_membrane : float Membrane thickness (Real). mid2 : float Material id number for bending (Integer > 0). inertia : float Area moment of inertia per unit width. mid3 : int Material id number for transverse shear (Integer >= 0). t3 : float Transverse shear thickness. nsm : float Nonstructural mass per unit area. z1, z2 : float; default=None Fiber distances for stress computation, positive according to the right-hand sequence defined on the CQUAD1 card. pid : int property id mid1 : int; default=None defines membrane material defines element density (unless blank) mid2 : int; default=None defines bending material defines element density if mid1=None mid3 : int; default=None defines transverse shear material (only defined if mid2 > 0) mid4 : int; default=None defines membrane-bending coupling material (only defined if mid1 > 0 and mid2 > 0; can't be mid1/mid2) twelveIt3 : float; default=1.0 Bending moment of inertia ratio, 12I/T^3. Ratio of the actual bending moment inertia of the shell, I, to the bending moment of inertia of a homogeneous shell, T^3/12. The default value is for a homogeneous shell. nsm : float; default=0.0 non-structural mass per unit area z1 / z2 : float; default=None fiber distance location 1/2 for stress/strain calculations z1 default : -t/2 if thickness is defined z2 default : t/2 if thickness is defined comment : str; default='' a comment for the card """ Property.__init__(self) if comment: self.comment = comment #if mid2 == -1: #mid2 = None #: Property ID self.pid = pid self.mid1 = mid1 #: Material identification number for bending #: -1 for plane strin self.mid2 = mid2 self.mid3 = mid3 #: thickness self.t_membrane = t_membrane self.t_shear = t_shear self.inertia = inertia #: Non-structural Mass self.nsm = nsm #if z1 is None and self.t is not None: #z1 = -self.t / 2. #if z2 is None and self.t is not None: #z2 = self.t / 2. self.z1 = z1 self.z2 = z2 #if self.t is not None: #assert self.t >= 0.0, 'PSHELL pid=%s Thickness=%s must be >= 0' % (self.pid, self.t) self.mid1_ref = None self.mid2_ref = None self.mid3_ref = None