def lamellarRectangleDisp(odbName):
    keysToWrite = [
        'resForce', 'topInitCoord', 'topU1', 'topU2', 'botInitCoord', 'botU1',
        'botU2', 'time'
    ]
    valuesToWrite = dict.fromkeys(keysToWrite, None)
    run = False
    for data in range(len(valuesToWrite)):
        file = valuesToWrite.keys()[data] + '.ascii'
        if (not os.path.isfile(file))\
        or (os.path.getmtime(file) < os.path.getmtime('exeCalls.txt'))\
        or (os.path.getmtime(file) < os.path.getmtime(__file__)):
            run = True
            break
    if run:
        print "running postPro on %s" % (odbName)
        myOdb = odbTools.openOdb(odbName)
        time = ext.getTime(myOdb)

        resForce = ext.getResF2D(myOdb, 'left')
        resTopForce = ext.getResF2D(myOdb, 'top')

        rightInitCoord = ext.getNCoord(myOdb, 'right')
        rightU1 = ext.getU_1(myOdb, 'right')
        rightU2 = ext.getU_2(myOdb, 'right')

        leftInitCoord = ext.getNCoord(myOdb, 'left')
        leftU1 = ext.getU_1(myOdb, 'left')
        leftU2 = ext.getU_2(myOdb, 'left')

        topInitCoord = ext.getNCoord(myOdb, 'top')
        topU1 = ext.getU_1(myOdb, 'top')
        topU2 = ext.getU_2(myOdb, 'top')

        botInitCoord = ext.getNCoord(myOdb, 'bottom')
        botU1 = ext.getU_1(myOdb, 'bottom')
        botU2 = ext.getU_2(myOdb, 'bottom')

        valuesToWrite = dict(rightInitCoord=rightInitCoord,
                             rightU1=rightU1,
                             rightU2=rightU2,
                             leftInitCoord=leftInitCoord,
                             leftU1=leftU1,
                             leftU2=leftU2,
                             resForce=resForce,
                             resTopForce=resTopForce,
                             topInitCoord=topInitCoord,
                             topU1=topU1,
                             topU2=topU2,
                             botInitCoord=botInitCoord,
                             botU1=botU1,
                             botU2=botU2,
                             time=time)

        odbTools.writeValues(valuesToWrite)
        myOdb.close()
Esempio n. 2
0
def optiStiffnessExtractors(odbName):
    myOdb = odbTools.openOdb(odbName)
    time = ext.getTime(myOdb)
    extDispl = ext.getFinalU_3(myOdb, 'outerFace')
    outForce = ext.getFinalResF_3(myOdb, 'outerFace')
    stiffness = 0.
    if abs(outForce) > 1e-8 and abs(outForce) < 1e8:
        stiffness = outForce / extDispl[0]
    odbTools.writeValuesOpti(stiffness)
    myOdb.close()
Esempio n. 3
0
def materialField(odbFile,notWantedParts=[],notWantedEleSets=[]):
    # Extract ABAQUS ODB into VTK unstructured grid data format
    nbNodes = 0
    nbElements = 0
    nodeCoord = list()
    eleConnection = list()
    cellType = list()
    cellField = list()
    # Open the odb
    myOdb = odbTools.openOdb(odbFile)
    stepName = myOdb.steps.keys()[-1]
    frames = myOdb.steps[stepName].frames
    # Isolate the instances, get the number of nodes and elements
    for instanceName in myOdb.rootAssembly.instances.keys():
        if instanceName not in notWantedParts:
            myInstance = myOdb.rootAssembly.instances[instanceName]
            numNodes = len(myInstance.nodes)
            #Get the initial nodal coordinates
            initialCoords = list()
            nodes = myInstance.nodes
            for node in nodes:
                coord0 = node.coordinates
                initialCoords.append((coord0[0], coord0[1], coord0[2]))
            #Isolate the displacement field
            displacements = frames[-1].fieldOutputs['U'].getSubset(region=myInstance).values
            #Add displacements to the initial coordinates
            for nd in range(numNodes):
               x = initialCoords[nd][0]+displacements[nd].data[0]
               y = initialCoords[nd][1]+displacements[nd].data[1]
               z = initialCoords[nd][2]+displacements[nd].data[2]
               nodeCoord.append((x, y, z))
            print "read %d nodes coordinates"%(numNodes)
            offset = nbNodes
            for setName in myInstance.elementSets.keys():
                if setName not in notWantedEleSets:
                    elSet = myInstance.elementSets[setName]
                    sectionName = 'Section-ASSEMBLY_'+instanceName+'_'+setName #default scanIP Name
                    materialName = myOdb.sections[sectionName].material
                    young = myOdb.materials[materialName].elastic.table[0][0]
                    numElements = 0
                    for el in elSet.elements:
                        ##Get the element connectivity
                        connectivity = el.connectivity
                        eleConnection.append([offset-1+i for i in connectivity])
                        if len(connectivity) == 8:  cellType.append(12)
                        elif len(connectivity) == 4:  cellType.append(10)
                        else: raise Exception('unknown element %d of connectivity %d'%(el.label,len(connectivity)))
                        ##Isolate the field
                        cellField.append(young)
                        numElements += 1
                    print "read %d element connexion and young's modulus"%(numElements)
                    nbElements += numElements
            nbNodes += numNodes
    myOdb.close()
    return nodeCoord,eleConnection,cellType,cellField
Esempio n. 4
0
def dataField(odbFile,fieldName,notWantedParts=[],notWantedEleSets=[]):
    # Extract ABAQUS ODB into VTK unstructured grid data format
    nbNodes = 0
    nbElements = 0
    nodeCoord = list()
    eleConnection = list()
    cellType = list()
    cellField = list()
    # Open the odb
    myOdb = odbTools.openOdb(odbFile)
    stepName = myOdb.steps.keys()[-1]
    frames = myOdb.steps[stepName].frames
    theField = frames[-1].fieldOutputs['S'].getScalarField(invariant=fieldName)
    # Isolate the instances, get the number of nodes and elements
    for instanceName in myOdb.rootAssembly.instances.keys():
        if instanceName not in notWantedParts:
            myInstance = myOdb.rootAssembly.instances[instanceName]
            numNodes = len(myInstance.nodes)
            #Get the initial nodal coordinates
            initialCoords = list()
            nodes = myInstance.nodes
            for node in nodes:
                coord0 = node.coordinates
                initialCoords.append((coord0[0], coord0[1], coord0[2]))
            #Isolate the displacement field
            displacements = frames[-1].fieldOutputs['U'].getSubset(region=myInstance).values
            #Add displacements to the initial coordinates
            for nd in range(numNodes):
               x = initialCoords[nd][0]+displacements[nd].data[0]
               y = initialCoords[nd][1]+displacements[nd].data[1]
               z = initialCoords[nd][2]+displacements[nd].data[2]
               nodeCoord.append((x, y, z))
            print "read %d nodes coordinates"%(numNodes)
            offset = nbNodes
            for setName in [myInstance.elementSets.keys(),' ALL ELEMENTS']:
                if setName not in notWantedEleSets:
                    elSet = myInstance.elementSets[setName]
                    numElements = 0
                    for el in elSet.elements:
                        ##Get the element connectivity
                        print el.faces
                        connectivity = el.connectivity
                        eleConnection.append([offset-1+i for i in connectivity])
                        if len(connectivity) == 8:  cellType.append(12)
                        elif len(connectivity) == 4:  cellType.append(10)
                        else: raise Exception('unknown element %d of connectivity %d'%(el.label,len(connectivity)))
                        ##Isolate the field
                        theElField = theField.getSubset(region=el).values
                        cellField.append(theElField[0].data)
                        numElements += 1
                    print "read %d element connexion and scalar field"%(numElements)
                    nbElements += numElements
            nbNodes += numNodes
    myOdb.close()
    return nodeCoord,eleConnection,cellType,cellField
Esempio n. 5
0
def displ2OptiTt02(odbName):
    print "running postPro on %s" % (odbName)
    import math
    myOdb = odbTools.openOdb(odbName)
    myAssembly = myOdb.rootAssembly
    # PRODUCE NODE SET ON THE NODES I EXTRACT COORDINATES FROM.
    newSet = 'extractedDisplacement'.upper()
    myInstances = [
        myAssembly.instances['SECTIONED2_INSTANCE'],
        myAssembly.instances['SECTIONED3_INSTANCE'],
        myAssembly.instances['SECTIONED4_INSTANCE'],
        myAssembly.instances['INPLANE2_INSTANCE'],
        myAssembly.instances['INPLANE3_INSTANCE'],
        myAssembly.instances['INPLANE4_INSTANCE']
    ]
    #points order ([J],[A,B,C,D],[E,F,G,H,I],[J,A,B],[G,H],[C,D,E,F,I])
    A = (0.501, 1.693)
    B = (0.492, 0.)
    C = (0.67, 1.758)
    D = (0.727, 0.)
    E = (0.798, 1.795)
    F = (0.869, 0.)
    G = (0.9, 1.791)
    H = (0.894, 0.)
    I = (0.890, 0.812)
    J = (0.321, 0.552)
    expPointsCoord = [[J], [A, B, C, D], [E, F, G, H, I], [J, A, B], [G, H],
                      [C, D, E, F, I]]
    if newSet not in myAssembly.nodeSets.keys():
        nodeList = list()
        for ins, instance in enumerate(myInstances):
            points = {}
            for node in instance.nodes:
                points[node.label] = list(node.coordinates)
            for ptNo in range(len(expPointsCoord[ins])):
                shortList = list()
                for key, value in points.iteritems():
                    if (0.9 * expPointsCoord[ins][ptNo][0] <= value[0] <=
                            1.1 * expPointsCoord[ins][ptNo][0]) and (
                                0.9 * expPointsCoord[ins][ptNo][1] <= value[1]
                                <= 1.1 * expPointsCoord[ins][ptNo][1]):
                        shortList.append(
                            (instance.name.replace('instance',
                                                   'Geo'), (key, )))
                nodeList.append(shortList[0])
        myNodes = tuple(nodeList)
        myAssembly.NodeSetFromNodeLabels(name=newSet, nodeLabels=myNodes)
    displ = ext.getFinalU(myOdb, newSet)

    odbTools.writeValuesOpti(displ)
    myOdb.close()
Esempio n. 6
0
def postPro(odbName):
    odbToolbox = r"D:\myWork\procedures\postPro4Abq_VC"
    import sys
    sys.path.append(odbToolbox)
    import postProTools.odbTools as odbTools
    import postProTools.extractors as ext
    import math

    myOdb = odbTools.openOdb(odbName)
    myAssembly = myOdb.rootAssembly
    # PRODUCE NODE SET ON THE NODES I EXTRACT COORDINATES FROM.
    newSet = 'extractedDisplacement'.upper()

    myInstances = [
        myAssembly.instances['SECTIONED3_INSTANCE'],
        myAssembly.instances['SECTIONED4_INSTANCE'],
        myAssembly.instances['SECTIONED5_INSTANCE'],
        myAssembly.instances['INPLANE3_INSTANCE'],
        myAssembly.instances['INPLANE4_INSTANCE']
    ]

    expPointsCoord = [[(0.606, 1.0208), (0.6956, 0.5452), (0.6975, 0.10976)],
                      [(0.7466, 0.8459), (0.71216, 0.4332), (0.7911, 0.3266),
                       (0.99157, 0.1497)], [(1.1335, 0.17328)],
                      [(0.606, 1.0208), (0.6956, 0.5452), (0.6975, 0.10976),
                       (0.7466, 0.8459), (0.71216, 0.4332), (0.7911, 0.3266),
                       (0.99157, 0.1497)], [(1.1335, 0.17328)]]

    if newSet not in myAssembly.nodeSets.keys():
        nodeList = list()
        for i, instance in enumerate(myInstances):
            points = {}
            for node in instance.nodes:
                points[node.label] = list(node.coordinates)
            for ptNo in range(len(expPointsCoord[i])):
                shortList = list()
                for key, value in points.iteritems():
                    if (0.95 * expPointsCoord[i][ptNo][0] < value[0] <
                            1.05 * expPointsCoord[i][ptNo][0]) and (
                                0.95 * expPointsCoord[i][ptNo][1] < value[1] <
                                1.05 * expPointsCoord[i][ptNo][1]):
                        shortList.append(
                            (instance.name.replace('instance',
                                                   'Geo'), (key, )))
                nodeList.append(shortList[0])
        myNodes = tuple(nodeList)
        myAssembly.NodeSetFromNodeLabels(name=newSet, nodeLabels=myNodes)
    displ = ext.getFinalU_1(myOdb, newSet)
    odbTools.writeValuesOpti(displ)
    myOdb.close()
Esempio n. 7
0
def postPro(odbName):
    odbToolbox = r"D:\myWork\procedures\postPro4Abq_VC"
    import sys
    sys.path.append(odbToolbox)
    import postProTools.odbTools as odbTools
    import postProTools.extractors as ext
    myOdb = odbTools.openOdb(odbName)
    refPoint = 'REFERENCE_POINT_PART-2-1        1'
    extDispl = ext.getU_3(myOdb, refPoint)
    extDiplsList = [displ[0] for displ in extDispl]
    outForce = ext.getRF_3(myOdb, refPoint)
    extForceList = [force[0] for force in outForce]
    stiffness = extForceList[-1] / extDiplsList[-1] * 1000.
    odbTools.writeValuesOpti(stiffness)
    myOdb.close()
Esempio n. 8
0
def displ2OptiTt01(odbName):
    print "running postPro on %s" % (odbName)
    import math
    myOdb = odbTools.openOdb(odbName)
    myAssembly = myOdb.rootAssembly
    # PRODUCE NODE SET ON THE NODES I EXTRACT COORDINATES FROM.
    newSet = 'extractedDisplacement'.upper()

    myInstances = [
        myAssembly.instances['SECTIONED3_INSTANCE'],
        myAssembly.instances['SECTIONED4_INSTANCE'],
        myAssembly.instances['SECTIONED5_INSTANCE'],
        myAssembly.instances['INPLANE3_INSTANCE'],
        myAssembly.instances['INPLANE4_INSTANCE']
    ]
    #myInstances = [myAssembly.instances['SECTIONED2_INSTANCE'],myAssembly.instances['SECTIONED3_INSTANCE'],myAssembly.instances['SECTIONED4_INSTANCE'],myAssembly.instances['SECTIONED5_INSTANCE'],
    #myAssembly.instances['INPLANE1_INSTANCE'],myAssembly.instances['INPLANE3_INSTANCE'],myAssembly.instances['INPLANE4_INSTANCE']]#points     #points order (I,J,A,B,C,D,E,F,G,H)x2
    expPointsCoord = [[(0.606, 1.0208), (0.6956, 0.5452), (0.6975, 0.10976)],
                      [(0.7466, 0.8459), (0.71216, 0.4332), (0.7911, 0.3266),
                       (0.99157, 0.1497)], [(1.1335, 0.17328)],
                      [(0.606, 1.0208), (0.6956, 0.5452), (0.6975, 0.10976),
                       (0.7466, 0.8459), (0.71216, 0.4332), (0.7911, 0.3266),
                       (0.99157, 0.1497)], [(1.1335, 0.17328)]]
    #    expPointsCoord = [[(0.3802,0.0808),(0.2947,1.2368)],[(0.606,1.0208),(0.6956,0.5452),(0.6975,0.10976)],[(0.7466,0.8459),(0.71216,0.4332),(0.7911,0.3266),(0.99157,0.1497)],[(1.1335,0.17328)],
    #    [(0.3802,0.0808),(0.2947,1.2368)],[(0.606,1.0208),(0.6956,0.5452),(0.6975,0.10976),(0.7466,0.8459),(0.71216,0.4332),(0.7911,0.3266),(0.99157,0.1497)],[(1.1335,0.17328)]]
    if newSet not in myAssembly.nodeSets.keys():
        nodeList = list()
        for i, instance in enumerate(myInstances):
            points = {}
            for node in instance.nodes:
                points[node.label] = list(node.coordinates)
            for ptNo in range(len(expPointsCoord[i])):
                shortList = list()
                for key, value in points.iteritems():
                    if (0.95 * expPointsCoord[i][ptNo][0] < value[0] <
                            1.05 * expPointsCoord[i][ptNo][0]) and (
                                0.95 * expPointsCoord[i][ptNo][1] < value[1] <
                                1.05 * expPointsCoord[i][ptNo][1]):
                        shortList.append(
                            (instance.name.replace('instance',
                                                   'Geo'), (key, )))
                nodeList.append(shortList[0])
        myNodes = tuple(nodeList)
        myAssembly.NodeSetFromNodeLabels(name=newSet, nodeLabels=myNodes)
    displ = ext.getFinalU(myOdb, newSet)

    odbTools.writeValuesOpti(displ)
    myOdb.close()
Esempio n. 9
0
def matrixStiffnessExtractor(odbName):
    keysToWrite = ['matrixStiffness']
    valuesToWrite = dict.fromkeys(keysToWrite, None)
    run = False
    for data in range(len(valuesToWrite)):
        file = valuesToWrite.keys()[data] + '.ascii'
        if (not os.path.isfile(file))\
        or (os.path.getmtime(file) < os.path.getmtime('exeCalls.txt'))\
        or (os.path.getmtime(file) < os.path.getmtime(__file__)):
            run = True
            break
    if run:
        print "running postPro on %s" % (odbName)
        myOdb = odbTools.openOdb(odbName)
        thisNb = len(myOdb.parts.keys())
        totalCoheOpen = 0
        slip1 = [0.]
        slip2 = [0.]
        for i in range(thisNb - 1):
            masterName = 'MASTER%d' % (i + 1)
            slaveName = 'SLAVE%d' % (i + 1)
            masterSurface = myOdb.rootAssembly.surfaces[masterName]
            copen = cExt.getFinalCOpening(myOdb, masterName, slaveName)
            slip1.append(
                max(
                    ext.getFinalU_1(
                        myOdb,
                        odbTools.getNodeSetFromSurface(myOdb, masterSurface))))
            slip2.append(
                max(
                    ext.getFinalU_2(
                        myOdb,
                        odbTools.getNodeSetFromSurface(myOdb, masterSurface))))
            totalCoheOpen += max(copen)
        extDispl = np.mean(ext.getFinalU_3(myOdb, 'outerFace'))
        surfStress13 = max(ext.getFinalS_13(myOdb, 'outerFace'))
        surfStress23 = max(ext.getFinalS_23(myOdb, 'outerFace'))
        surfStress33 = np.mean(ext.getFinalS_33(myOdb, 'outerFace'))
        slip1.append(max(ext.getFinalU_1(myOdb, 'outerFace')))
        slip2.append(max(ext.getFinalU_2(myOdb, 'outerFace')))
        matrixOpen = (extDispl - totalCoheOpen
                      ) / thisNb  #elongation of each part if it is uniform
        valuesToWrite = dict(matrixStiffness=[
            surfStress33 / matrixOpen, surfStress13 /
            max(np.diff(slip1)), surfStress23 / max(np.diff(slip2))
        ])
        odbTools.writeValues(valuesToWrite)
        myOdb.close()
Esempio n. 10
0
def appliedDisplExtractors(odbName):
    sets = [
        'edgeXMax', 'edgeXMaxInt', 'edgeXMin', 'edgeXMinInt', 'edgeYMax',
        'edgeYMaxInt', 'edgeYMin', 'edgeYMinInt'
    ]
    keysToWrite = ['time', 'topResForce', 'bottomResForce']
    for set in sets:
        keysToWrite.append('initCoord_%s' % set)
        keysToWrite.append('radialDisp_%s' % set)
        keysToWrite.append('axialDisp_%s' % set)
        keysToWrite.append('tgtDisp_%s' % set)
    valuesToWrite = dict.fromkeys(keysToWrite, None)

    run = False
    for data in valuesToWrite.keys():
        file = data + '.ascii'
        if (not os.path.isfile(file))\
        or (os.path.getmtime(file) < os.path.getmtime('exeCalls.txt'))\
        or (os.path.getmtime(file) < os.path.getmtime(__file__)):
            run = True
            break
    if run:
        print "running postPro on %s" % (odbName)
        myOdb = odbTools.openOdb(odbName)
        sysCyl = geometricTools.cylXYCoordSystem(myOdb.rootAssembly)
        valuesToWrite['time'] = ext.getTime(myOdb)
        valuesToWrite['topResForce'] = ext.getResF(myOdb, 'zMax', sysC=sysCyl)
        valuesToWrite['bottomResForce'] = ext.getResF(myOdb,
                                                      'zMin',
                                                      sysC=sysCyl)
        for set in sets:
            valuesToWrite['initCoord_%s' % set] = ext.getNCoord(myOdb,
                                                                set,
                                                                sysC=sysCyl)
            valuesToWrite['radialDisp_%s' % set] = ext.getU_1(myOdb,
                                                              set,
                                                              sysC=sysCyl)
            valuesToWrite['tgtDisp_%s' % set] = ext.getU_2(myOdb,
                                                           set,
                                                           sysC=sysCyl)
            valuesToWrite['axialDisp_%s' % set] = ext.getU_3(myOdb,
                                                             set,
                                                             sysC=sysCyl)

        odbTools.writeValues(valuesToWrite)
        myOdb.close()
Esempio n. 11
0
def postPro(odbName):
    odbToolbox = r"D:\myWork\procedures\postPro4Abq_VC"
    import sys
    sys.path.append(odbToolbox)
    print 'running postPro on ', odbName
    import postProTools.odbTools as odbTools
    import postProTools.extractors as ext
    myOdb = odbTools.openOdb(odbName)
    forceExt = ext.getRF_3(myOdb, 'TOPRP')
    displExt = ext.getU_3(myOdb, 'TOPRP')
    extDiplsList = [abs(displ[0] - displExt[0][0]) for displ in displExt]
    extForceList = [abs(force[0] - forceExt[0][0]) for force in forceExt]
    idx = [n for n, i in enumerate(extDiplsList) if i > 0.2]
    try:
        idx = idx[0]  #disregard first .2 mm ie about 0.5%
    except:
        idx = -1  # if no displacement is higher than 0.2, then output is 0
    odbTools.writeValuesOpti(zip(extDiplsList[idx:], extForceList[idx:]))
    myOdb.close()
Esempio n. 12
0
def appliedDisplacementForceExtractor(odbName):
    keysToWrite = ['totalForce_pinnedFace', 'totalForce_movingFace', 'time']
    valuesToWrite = dict.fromkeys(keysToWrite, None)
    run = False
    for data in range(len(valuesToWrite)):
        file = valuesToWrite.keys()[data] + '.ascii'
        if (not os.path.isfile(file))\
        or (os.path.getmtime(file) < os.path.getmtime('exeCalls.txt'))\
        or (os.path.getmtime(file) < os.path.getmtime(__file__)):
            run = True
            break
    if run:
        print "running postPro on %s" % (odbName)
        myOdb = odbTools.openOdb(odbName)
        mySets = myOdb.rootAssembly.nodeSets
        pinnedNodeSetName = list()
        movingNodeSetName = list()
        for nodeSet in mySets.keys():
            zMin = '_WITH_ZMIN'
            if nodeSet.endswith(zMin): pinnedNodeSetName.append(nodeSet)
            zMax = '_WITH_ZMAX'
            if nodeSet.endswith(zMax): movingNodeSetName.append(nodeSet)

        time = ext.getTime(myOdb)

        resultantForce_pin = [0] * len(time)
        for setName in pinnedNodeSetName:
            resForce = ext.getResF_3(myOdb, setName)
            for t in range(len(resultantForce_pin)):
                resultantForce_pin[t] += resForce[t]
        resultantForce_mov = [0] * len(time)
        for setName in movingNodeSetName:
            resForce = ext.getResF_3(myOdb, setName)
            for t in range(len(resultantForce_mov)):
                resultantForce_mov[t] += resForce[t]

        valuesToWrite = dict(totalForce_pinnedFace=resultantForce_pin,
                             totalForce_movingFace=resultantForce_mov,
                             time=time)

        odbTools.writeValues(valuesToWrite)
        myOdb.close()
Esempio n. 13
0
def postPro(odbName):
    print 'running postPro on ', odbName
    import postProTools.odbTools as odbTools
    import postProTools.extractors as ext
    import postProTools.contactExtractors as cExt
    valuesToWrite = dict()
    myOdb = odbTools.openOdb(odbName)
    fileName = odbName.split('.')[0]
    valuesToWrite['axialDispl_%s' % fileName] = ext.getU_3(myOdb, 'TOPPLATE')
    valuesToWrite['force_%s' % fileName] = ext.getRF_3(myOdb, 'TOPPLATE')

    try:
        masterName = 'CP-2-bot'
        slaveName = 'CP-2-PART-1-1'
        valuesToWrite['cForce1_%s' %
                      fileName] = cExt.getCNormalForce_Magnitude(
                          myOdb, masterName, slaveName)

        masterName = 'CP-3-bot'
        slaveName = 'CP-3-PART-1-1'
        valuesToWrite['cForce2_%s' %
                      fileName] = cExt.getCNormalForce_Magnitude(
                          myOdb, masterName, slaveName)
    except:
        masterName = 'topCartilage1'
        slaveName = 'botCartilage1'
        valuesToWrite['cForce1_%s' %
                      fileName] = cExt.getCNormalForce_Magnitude(
                          myOdb, masterName, slaveName)

        masterName = 'topCartilage2'
        slaveName = 'botCartilage2'
        valuesToWrite['cForce2_%s' %
                      fileName] = cExt.getCNormalForce_Magnitude(
                          myOdb, masterName, slaveName)

    odbTools.writeValues(valuesToWrite)
    print 'postPro on ', odbName, ': DONE'
    myOdb.close()