示例#1
0
        for active_inactive in active_inactive_combinations:  # Change output in combination of this
            # Update counter and clear strings
            lhs_string = ""
            rhs_string = ""
            active_inactive_comb += 1

            #Defining the unknowns
            u1 = custom_sympy_fe_utilities.DefineMatrix(
                'u1', nnodes, dim
            )  #u1(i,j) is displacement of node i component j at domain 1
            u2 = custom_sympy_fe_utilities.DefineMatrix(
                'u2', nnodes_master, dim
            )  #u2(i,j) is displacement of node i component j at domain 2
            LM = custom_sympy_fe_utilities.DefineMatrix('LM', nnodes, dim)
            NormalGap = custom_sympy_fe_utilities.DefineVector(
                'NormalGap', nnodes)
            DOperator = custom_sympy_fe_utilities.DefineMatrix(
                'DOperator', nnodes, nnodes)
            MOperator = custom_sympy_fe_utilities.DefineMatrix(
                'MOperator', nnodes, nnodes_master)

            # Define other parameters
            # Normal and tangets of the slave
            NormalSlave = custom_sympy_fe_utilities.DefineMatrix(
                'NormalSlave', nnodes, dim)

            X1 = custom_sympy_fe_utilities.DefineMatrix('X1', nnodes, dim)
            X2 = custom_sympy_fe_utilities.DefineMatrix(
                'X2', nnodes_master, dim)
            x1 = X1 + u1
            x2 = X2 + u2
示例#2
0
            TangentSlave = custom_sympy_fe_utilities.DefineMatrix(
                'TangentSlave', nnodes, dim)
        else:
            TangentSlave = custom_sympy_fe_utilities.DefineMatrix(
                'TangentSlave', nnodes, dim, "Symbol")

        # Define test functions
        w1 = custom_sympy_fe_utilities.DefineMatrix('w1', nnodes, dim,
                                                    "Symbol")
        w2 = custom_sympy_fe_utilities.DefineMatrix('w2', nnodes_master, dim,
                                                    "Symbol")
        wLM = custom_sympy_fe_utilities.DefineMatrix('wLM', nnodes, dim,
                                                     "Symbol")

        # Defining normal and tangent components
        LMNormal = custom_sympy_fe_utilities.DefineVector('LMNormal', nnodes)
        wLMNormal = custom_sympy_fe_utilities.DefineVector('wLMNormal', nnodes)

        # The resultant tangent LM
        LMTangent = custom_sympy_fe_utilities.DefineMatrix(
            'LMTangent', nnodes, dim)
        wLMTangent = custom_sympy_fe_utilities.DefineMatrix(
            'wLMTangent', nnodes, dim)

        # Defining additional variables
        NormalGap = custom_sympy_fe_utilities.DefineVector('NormalGap', nnodes)
        NormalwGap = custom_sympy_fe_utilities.DefineVector(
            'NormalwGap', nnodes)
        TangentSlipNonObjective = custom_sympy_fe_utilities.DefineMatrix(
            'TangentSlipNonObjective', nnodes, dim)
        TangentwSlipNonObjective = custom_sympy_fe_utilities.DefineMatrix(