ABAQUS script for a custom field output

278 views Asked by At

I am new to ABAQUS scripting and I am trying to calculate micromotion using COPEN, CSLIP1 and CSLIP2. I came up with the code below:

from abaqusConstants import *
from odbAccess import *
from odbMaterial import *
from odbSection import *
from math import *
from copy import deepcopy
from caeModules import *
from driverUtils import executeOnCaeStartup
from numpy import fabs as fabs
import numpy as np
from types import IntType

odb = session.openOdb(name='E:\PDP02.odb', readOnly=FALSE)
odb = session.odbs['E:\PDP02.odb']

print odb.rootAssembly.instances.keys()
grout_instance = odb.rootAssembly.instances['PROX-1#PROXIMAL-1']

keys = odb.steps.keys()
for key in keys:
    step = odb.steps[key]
    for frame in step.frames:
        print frame.description
        Copen = frame.fieldOutputs['COPEN']
        Cslip1 = frame.fieldOutputs['CSLIP1']
        Cslip2 = frame.fieldOutputs['CSLIP2']
        Micromotion = sqrt(power(Copen,2)+power(Cslip1,2)+power(Cslip2,2))
        #Micromotion =sqrt(power(Cslip2,2))
        
        #float(Micromotion)

        frame.FieldOutput(name='Micromotion', description='Average Micromotion', field=Micromotion)

odb.update()
odb.save()

After executing the code, i get the following error message: "OdiError: Expression evaluates to an overflow or underflow". Please help me understand this error message and how to rectify it. I am happy to provide the .inp and .odb files for reference and verification.

1

There are 1 answers

1
Mena On

Simply put, overflow and underflow happen when we assign a value that is out of range of the declared data type of the variable. If the (absolute) value is too big, we call it overflow, if the value is too small, we call it underflow.