Benchmark problem: Wedged Plate - finite deformations

Features

  • Using PatchMesher to model the plate

  • nodal boundary conditions using location-based search

  • face loads using location-based search

  • finite deformation Triangle and Quad elements

  • history plot feature

import numpy as np

from femedu.examples import Example

from femedu.domain import System
from femedu.solver import NewtonRaphsonSolver
from femedu.elements.finite import Quad, Triangle
from femedu.materials import PlaneStress
from femedu.mesher import *


class Example20_Benchmark01(Example):

    def problem(self):
        # ========== setting mesh parameters ==============

        Nx = 8      # number of elements in the mesh
        Ny = 4       # number of elements in the mesh

        # Nx = 16      # number of elements in the mesh
        # Ny = 8       # number of elements in the mesh
        #
        # Nx = 32      # number of elements in the mesh
        # Ny = 16      # number of elements in the mesh

        L1 =  48.0
        L2 =  44.0
        L3 =  16.0

        # ========== setting material parameters ==============

        params = dict(
            E  = 1000.,    # Young's modulus
            nu = 0.3,   # Poisson's ratio
            t  = 1.00   # thickness of the plate
        )

        # ========== setting load parameters ==============

        px  =  0.0         # uniform load normal to x=Lx
        pxy =  100.0/L3    # uniform shear load on x=L1

        # ========== setting analysis parameters ==============

        target_load_level = 5.00     # reference load
        max_steps = 26                # number of load steps: 2 -> [0.0, 1.0]

        # define a list of target load levels
        load_levels = np.linspace(0, target_load_level, max_steps)

        #
        # ==== Build the system model ====
        #

        model = System()
        model.setSolver(NewtonRaphsonSolver())

        # create nodes

        mesher = PatchMesher(model, (0.,0.),(L1, L2),(L1, L2+L3),(0.,L2) )
        nodes, elements = mesher.quadMesh(Nx, Ny, Quad, PlaneStress(params))

        mesher.shift(1.25*L1, 0.0)
        nodes2, elements2 = mesher.triangleMesh(Nx, Ny, Triangle, PlaneStress(params))

        nodes += nodes2
        elements += elements2


        # ==== Apply boundary conditions ====

        #
        # the left model
        #

        ## fix left side
        for node, _ in model.findNodesAlongLine((0.0, 0.0), (0.0, 1.0)):
            node.fixDOF('ux', 'uy')

        ## define loads ...
        for _, face in model.findFacesAlongLine((L1,0.0), (0.0,1.0), orientation=+1):
            face.setLoad(px, pxy)

        ## locate the node at the centerline
        nodeA, dist = model.findNodesAt((L1, L2+L3))[0]

        #
        # the right model
        #

        ## fix left side
        for node, _ in model.findNodesAlongLine((1.25*L1, 0.0), (0.0, 1.0)):
            node.fixDOF('ux', 'uy')

        ## define loads ...
        for _, face in model.findFacesAlongLine((2.25*L1,0.0), (0.0,1.0), orientation=+1):
            face.setLoad(px, pxy)

        ## locate the node at the centerline
        nodeB, dist = model.findNodesAt((2.25*L1, L2+L3))[0]

        #model.report()

        # set up a recorder
        model.initRecorder(variables=['ux','uy'], nodes=[nodeA, nodeB])
        model.startRecorder()

        model.plot(factor=0, title="undeformed system", filename="benchmark01_undeformed.png", show_bc=1, show_loads=1)

        for lf in np.linspace(0.0, target_load_level, max_steps):

            model.setLoadFactor(lf)
            model.solve(verbose=True)

            #model.report()

        model.plot(factor=1., show_bc=1, show_loads=1, show_reactions=1)

        model.valuePlot('sxx', show_mesh=True)
        model.valuePlot('syy', show_mesh=True)
        model.valuePlot('sxy', show_mesh=True)

        # create a history plot for the end node

        #model.historyPlot('lam', ['ux','uy'], nodes=[nodeA,nodeA])
        #model.historyPlot('lam', ['ux','uy'], nodes=[nodeB,nodeB])
        model.historyPlot('lam', ['ux','uy','ux','uy'], nodes=[nodeA,nodeA,nodeB,nodeB])

Run the example by creating an instance of the problem and executing it by calling Example.run()

if __name__ == "__main__":
    ex = Example20_Benchmark01()
    ex.run()
  • undeformed system
  • Deformed System (magnification=1.00)
  • Contours of '$\sigma_{xx}$'
  • Contours of '$\sigma_{yy}$'
  • Contours of '$\sigma_{xy}$'
  • Load History Plot
norm of the out-of-balance force:   2.7908e-11
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.7967e+00
norm of the out-of-balance force:   8.7339e-04
norm of the out-of-balance force:   1.4069e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.6992e+00
norm of the out-of-balance force:   8.4504e-04
norm of the out-of-balance force:   1.3381e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.6018e+00
norm of the out-of-balance force:   8.1663e-04
norm of the out-of-balance force:   1.2956e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.5050e+00
norm of the out-of-balance force:   7.8823e-04
norm of the out-of-balance force:   1.2359e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.4088e+00
norm of the out-of-balance force:   7.5995e-04
norm of the out-of-balance force:   1.1889e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.3136e+00
norm of the out-of-balance force:   7.3186e-04
norm of the out-of-balance force:   1.0970e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.2193e+00
norm of the out-of-balance force:   7.0406e-04
norm of the out-of-balance force:   1.0484e-09
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.1263e+00
norm of the out-of-balance force:   6.7662e-04
norm of the out-of-balance force:   9.5827e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   3.0346e+00
norm of the out-of-balance force:   6.4960e-04
norm of the out-of-balance force:   8.9438e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.9445e+00
norm of the out-of-balance force:   6.2307e-04
norm of the out-of-balance force:   8.4159e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.8559e+00
norm of the out-of-balance force:   5.9709e-04
norm of the out-of-balance force:   7.8098e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.7691e+00
norm of the out-of-balance force:   5.7170e-04
norm of the out-of-balance force:   7.1420e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.6841e+00
norm of the out-of-balance force:   5.4694e-04
norm of the out-of-balance force:   6.7116e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.6009e+00
norm of the out-of-balance force:   5.2286e-04
norm of the out-of-balance force:   6.0705e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.5197e+00
norm of the out-of-balance force:   4.9947e-04
norm of the out-of-balance force:   5.5432e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.4404e+00
norm of the out-of-balance force:   4.7681e-04
norm of the out-of-balance force:   5.1796e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.3631e+00
norm of the out-of-balance force:   4.5488e-04
norm of the out-of-balance force:   4.6150e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.2879e+00
norm of the out-of-balance force:   4.3371e-04
norm of the out-of-balance force:   4.4076e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.2147e+00
norm of the out-of-balance force:   4.1330e-04
norm of the out-of-balance force:   3.8371e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.1436e+00
norm of the out-of-balance force:   3.9364e-04
norm of the out-of-balance force:   3.4770e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.0745e+00
norm of the out-of-balance force:   3.7475e-04
norm of the out-of-balance force:   3.1723e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   2.0075e+00
norm of the out-of-balance force:   3.5661e-04
norm of the out-of-balance force:   2.9706e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   1.9426e+00
norm of the out-of-balance force:   3.3921e-04
norm of the out-of-balance force:   2.4690e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   1.8796e+00
norm of the out-of-balance force:   3.2255e-04
norm of the out-of-balance force:   2.3887e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+
norm of the out-of-balance force:   1.3229e+01
norm of the out-of-balance force:   1.8187e+00
norm of the out-of-balance force:   3.0661e-04
norm of the out-of-balance force:   2.0858e-10
Recorder.addData: 'stability' not initialized by the recorder: ignored
+

Total running time of the script: (0 minutes 6.302 seconds)

Gallery generated by Sphinx-Gallery