示例#1
0
  def __init__( self , props , globdat ):

    self.tol      = 1.0e-3
    self.iterMax  = 10

    self.maxCycle = sys.maxsize
    self.maxLam   = 1.0e20
    self.dtime    = 1.0
    self.loadFunc = "t"
    self.loadCases= []

    BaseModule.__init__( self , props )

    if self.maxLam > 1.0e19 and self.maxCycle == sys.maxsize:
      self.maxCycle = 5

    globdat.lam = 0.0
    globdat.solverStatus.dtime = self.dtime

    self.loadfunc = eval ( "lambda t : " + str(self.loadFunc) )
       
    if hasattr(self,"loadTable"):
      self.maxCycle      = len(self.loadTable)
      loadTable          = zeros(self.maxCycle+1)
      loadTable[1:]      = self.loadTable
      self.loadTable     = loadTable
 
    logger.info("Starting nonlinear solver .........")
示例#2
0
    def __init__(self, props, globdat):

        BaseModule.__init__(self, props)

        self.fext = zeros(len(globdat.dofs))

        logger.info("Starting linear solver .......")
示例#3
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.iterMax = 10

        self.maxCycle = sys.maxsize
        self.maxLam = 1.0e20
        self.dtime = 1.0
        self.loadFunc = "t"
        self.loadCases = []

        BaseModule.__init__(self, props)

        self.fext = zeros(len(globdat.dofs))

        self.solvers = []

        dofsToRemove = [
            e for e in globdat.dofs.dofTypes if e not in self.solver1.dofTypes
        ]
        self.solver1.cons = globdat.dofs.copyConstrainer(dofsToRemove)

        dofsToRemove = [
            e for e in globdat.dofs.dofTypes if e not in self.solver2.dofTypes
        ]
        self.solver2.cons = globdat.dofs.copyConstrainer(dofsToRemove)

        self.solvers.append(self.solver1)
        self.solvers.append(self.solver2)

        self.loadfunc = eval("lambda t : " + str(self.loadFunc))
        globdat.solverStatus.dtime = self.dtime

        logger.info("Starting staggered solver .......")
示例#4
0
  def __init__( self , props , globdat ):
	
    self.prefix       = globdat.prefix
    self.elementGroup = "All"
    self.k            = 0
    self.interval     = 1

    BaseModule.__init__( self , props )
示例#5
0
  def __init__( self , props , globdat ):

    self.tol     = 1.0e-3
    self.iterMax = 10 

    BaseModule.__init__( self , props )

    self.fext  = zeros( len(globdat.dofs) )  
示例#6
0
  def __init__( self , props , globdat ):

    self.tol     = 1.0e-3
    self.iterMax = 10 

    BaseModule.__init__( self , props )

    self.fext  = zeros( len(globdat.dofs) )  
示例#7
0
  def __init__( self , props , globdat ):
	
    self.prefix       = globdat.prefix
    self.elementGroup = "All"
    self.k            = 0
    self.interval     = 1

    BaseModule.__init__( self , props )
示例#8
0
  def __init__( self , props , globdat ):
    
    self.maxCycle = sys.maxint

    BaseModule.__init__( self , props )
    
    M,self.Mlumped = assembleMassMatrix( props , globdat )
 
    self.loadfunc = eval ( "lambda t : " + str(self.lam) )
示例#9
0
    def __init__(self, props, globdat):

        self.maxCycle = sys.maxint

        BaseModule.__init__(self, props)

        M, self.Mlumped = assembleMassMatrix(props, globdat)

        self.loadfunc = eval("lambda t : " + str(self.lam))
示例#10
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.iterMax = 10

        BaseModule.__init__(self, props)

        self.fext = zeros(len(globdat.dofs))

        print("\n  Starting buckling solver .....\n")
示例#11
0
    def __init__(self, props, globdat):

        self.prefix = globdat.prefix
        self.extension = ".out"
        self.onScreen = False

        BaseModule.__init__(self, props)

        if not hasattr(self, "filename"):
            self.filename = self.prefix + self.extension
示例#12
0
  def __init__( self , props , globdat ):

    self.prefix       = globdat.prefix
    self.interval     = 1
    self.k            = 0

#    self.stresslabels = [ "sxx" , "syy" , "sxy" ]

    BaseModule.__init__( self , props )

    self.columndata = []
示例#13
0
  def __init__( self , props , globdat ):

    self.tol      = 1.0e-3
    self.iterMax  = 10 

    self.maxCycle = sys.maxint
    self.maxLam   = 1.0e20

    BaseModule.__init__( self , props )

    globdat.lam = 0.0
示例#14
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.iterMax = 10

        self.maxCycle = sys.maxint
        self.maxLam = 1.0e20

        BaseModule.__init__(self, props)

        globdat.lam = 0.0
示例#15
0
    def __init__(self, props, globdat):

        self.maxCycle = sys.maxsize

        BaseModule.__init__(self, props)

        M, self.Mlumped = assembleMassMatrix(props, globdat)

        self.loadfunc = eval("lambda t : " + str(self.lam))

        print("\n  Starting explicit solver .....\n")
示例#16
0
  def __init__( self , props , globdat ):
	
    self.prefix       = globdat.prefix
    self.elementGroup = "All"
    self.k            = 0
    self.interval     = 1
    self.extraFields  = []

    BaseModule.__init__( self , props )
    
    if type(self.extraFields) is str:
      self.extraFields = [self.extraFields]
示例#17
0
  def __init__ ( self, props , globdat ):

    self.prefix    = globdat.prefix
    self.extension = ".out"
    self.onScreen  = False

    BaseModule.__init__( self , props )

    if not hasattr( self , "filename" ):
      self.filename  = self.prefix + self.extension
    
    self.outfile = open( self.filename ,'w' )
示例#18
0
    def __init__(self, props, globdat):

        self.prefix = globdat.prefix
        self.extension = ".out"
        self.onScreen = False

        BaseModule.__init__(self, props)

        if not hasattr(self, "filename"):
            self.filename = self.prefix + self.extension

        self.columndata = []

        for i, col in enumerate(self.columns):

            if hasattr(self, col):
                colProps = getattr(self, col)
            else:
                colProps = Properties()

            if not hasattr(colProps, "type"):
                colProps.type = col

            if not hasattr(colProps, "factor"):
                colProps.factor = 1.0

            if hasattr(colProps, "node"):
                if type(colProps.node) == str:
                    colProps.node = globdat.nodes.groups[colProps.node]

            self.columndata.append(colProps)

        if self.onScreen and hasattr(globdat, "onScreen"):
            self.onScreen = False
        else:
            globdat.onScreen = True

            self.fig = gcf()
            self.fig.show()
            self.fig.canvas.draw()

        self.outfile = open(self.filename, 'w')

        if self.onScreen:
            self.output = []

            xlabel(self.columns[0])
            ylabel(self.columns[1])

            ion()

        self.run(props, globdat)
示例#19
0
    def __init__(self, props, globdat):

        self.prefix = globdat.prefix
        self.extension = ".dump"
        self.lastOnly = False

        BaseModule.__init__(self, props)

        if not hasattr(props, "interval"):
            self.interval = 1

        if self.lastOnly:
            self.interval = 1
示例#20
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.iterMax = 10

        self.maxCycle = sys.maxsize
        self.maxLam = 1.0e20

        BaseModule.__init__(self, props)

        globdat.lam = 0.0

        print("\n  Starting nonlinear solver ....\n")
示例#21
0
  def __init__( self , props , globdat ):

    self.prefix       = globdat.prefix
    self.interval     = 1
    self.k            = 0

    self.stresslabels = [ "sxx" , "syy" , "sxy" ]

    BaseModule.__init__( self , props )

    self.columndata = []

    for i,col in enumerate ( self.columns ):

      self.columndata.append( colProps )
示例#22
0
    def __init__(self, props, globdat):

        self.prefix = globdat.prefix
        self.interval = 1
        self.k = 0

        self.stresslabels = ["sxx", "syy", "sxy"]

        BaseModule.__init__(self, props)

        self.columndata = []

        for i, col in enumerate(self.columns):

            self.columndata.append(colProps)
示例#23
0
  def __init__ ( self, props , globdat ):

    self.prefix    = globdat.prefix
    self.extension = ".h5"
    
    self.dispDofs    = ["u","v","w"]
    self.extraFields = ["rx","ry","rz","temp","pres"]
    self.singleFile  = True
    
    BaseModule.__init__( self , props )
    
    if not hasattr( props , "interval" ):
      self.interval = 1
    
    if self.singleFile:  
      f = h5py.File(self.prefix+self.extension,"w")            
      f.attrs["cycleCount"] = 0
  def __init__( self , props , globdat ):

    self.tol       = 1.0e-4
    self.optiter   = 5
    self.iterMax   = 10
    self.maxdTau   = 1.0e20

    self.factor    = 1.0
    self.maxLam    = 1.0e20

    dofCount    = len(globdat.dofs)

    BaseModule.__init__( self , props )

    self.method    = "force-controlled"
    self.Dlam      = 1.0

    globdat.lam    = 1.0
    globdat.dTau   = 0.0
示例#25
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-4
        self.optiter = 5
        self.iterMax = 10
        self.maxdTau = 1.0e20

        self.factor = 1.0
        self.maxLam = 1.0e20

        dofCount = len(globdat.dofs)

        BaseModule.__init__(self, props)

        self.method = "force-controlled"
        self.Dlam = 1.0

        globdat.lam = 1.0
        globdat.dTau = 0.0
示例#26
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-4
        self.optiter = 5
        self.iterMax = 10
        self.fixedStep = False
        self.maxFactor = 1.0e20

        self.totalFactor = 1.0
        self.factor = 1.0
        self.maxLam = 1.0e20

        dofCount = len(globdat.dofs)

        BaseModule.__init__(self, props)

        self.Daprev = zeros(dofCount)
        self.Dlamprev = 1.0

        globdat.lam = 1.0
示例#27
0
  def __init__( self , props , globdat ):

    self.tol       = 1.0e-4
    self.optiter   = 5
    self.iterMax   = 10
    self.fixedStep = False
    self.maxFactor = 1.0e20

    self.totalFactor = 1.0
    self.factor    = 1.0
    self.maxLam    = 1.0e20

    dofCount    = len(globdat.dofs)

    BaseModule.__init__( self , props )

    self.Daprev    = zeros( dofCount )
    self.Dlamprev  = 1.0

    globdat.lam    = 1.0
示例#28
0
  def __init__ ( self, props , globdat ):

    self.prefix    = globdat.prefix
    self.extension = ".out"
    self.onScreen  = False

    BaseModule.__init__( self , props )

    if not hasattr( self , "filename" ):
      self.filename  = self.prefix + self.extension
    
    self.columndata = []

    for i,col in enumerate ( self.columns ):

      colProps = getattr( self , col )
      
      if not hasattr( colProps , "factor" ):
        colProps.factor = 1.0

      self.columndata.append( colProps )

    if self.onScreen and hasattr( globdat , "onScreen" ):
      self.onScreen = False
    else:
      globdat.onScreen = True

    self.outfile = open( self.filename ,'w' )

    if self.onScreen:
      self.output = []

      xlabel(self.columns[0])
      ylabel(self.columns[1])
  
      ion()

    self.run( props , globdat ) 
示例#29
0
    def __init__(self, props, globdat):

        self.prefix = globdat.prefix
        self.extension = ".out"
        self.onScreen = False

        BaseModule.__init__(self, props)

        if not hasattr(self, "filename"):
            self.filename = self.prefix + self.extension

        self.columndata = []

        for i, col in enumerate(self.columns):

            colProps = getattr(self, col)

            if not hasattr(colProps, "factor"):
                colProps.factor = 1.0

            self.columndata.append(colProps)

        if self.onScreen and hasattr(globdat, "onScreen"):
            self.onScreen = False
        else:
            globdat.onScreen = True

        self.outfile = open(self.filename, 'w')

        if self.onScreen:
            self.output = []

            xlabel(self.columns[0])
            ylabel(self.columns[1])

            ion()

        self.run(props, globdat)
示例#30
0
  def __init__( self , props , globdat ):

    self.tol       = 1.0e-4
    self.optiter   = 5
    self.iterMax   = 10
    self.maxdTau   = 1.0e20

    self.factor    = 1.0
    self.maxLam    = 1.0e20
    self.lam       = 1.0
    self.beta      = 2.0
    self.dtime     = 1.0
    self.disstype  = "Local"

    dofCount    = len(globdat.dofs)

    BaseModule.__init__( self , props )

    self.method    = "force-controlled"
    self.Dlam      = self.lam

    globdat.lam    = self.lam
    globdat.dTau   = 0.0
示例#31
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-4
        self.optiter = 5
        self.iterMax = 10
        self.fixedStep = False
        self.maxFactor = 1.0e20

        globdat.totalFactor = 1.0
        globdat.factor = 1.0
        self.maxLam = 1.0e20

        dofCount = len(globdat.dofs)

        BaseModule.__init__(self, props)

        if not hasattr(globdat, "Daprev"):
            globdat.Daprev = zeros(dofCount)
            globdat.Dlamprev = 1.0

        globdat.lam = 1.0

        print("\n  Starting Riks arclength solver\n")
示例#32
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.iterMax = 10

        self.maxCycle = sys.maxsize
        self.maxLam = 1.0e20
        self.dtime = 0.01
        self.loadFunc = "t"
        self.loadCases = []

        BaseModule.__init__(self, props)

        if self.maxLam > 1.0e19 and self.maxCycle == sys.maxsize:
            self.maxCycle = 5

        globdat.lam = 0.0
        globdat.solverStatus.dtime = self.dtime

        self.loadfunc = eval("lambda t : " + str(self.loadFunc))

        print(self.loadCases)

        logger.info("Starting nonlinear solver .........")
示例#33
0
    def __init__(self, props, globdat):

        self.tol = 1.0e-3
        self.eigenCount = 5

        BaseModule.__init__(self, props)