[Geoqus] Urgent help on a Simple Python Script

bsaad at po-box.mcgill.ca bsaad at po-box.mcgill.ca
Thu Apr 12 07:59:12 CEST 2007


Dear  Deppak, Joze, Fabio,  Manooch  and all geoqus members,
My Python knowledge age is 6 days and I took the risk and wrote a 
simple script for creating a new field out put from my ODB session. 
This script is important to carry on my research. I am scared to start 
implement it before being revised by yourselves
Please look at it and help me to get it finalized : feel free to modify 
, add , remove as you may see it proper.  Please do not laugh while you 
go through the script as it could look very prime considering your 
Python background.
Please those who want to help try to elaborate (# ) . Thank you in advance


"""
from abaqus import *
from odbAccess import *
from visualization import *
from odbMaterial import *
from abaqusConstants import *


# Check to see if there is an output database displayed
# in the current viewport.

vp = session.viewport[session.currentViewportName]
odb = vp.displayedObject
if type(odb) != OdbType:
    raise 'An output database must be displayed in the current viewport'


# Find the ultimate von Mises stress that a soil point in the 
Drucker-Prager material can bear at the existing pressure based on the 
failure relation UltimateMises =P tan B-d (where P is the pressure, B 
is the friction angle which is the first value defined in the Cap 
Plasticity material table and D is the cohesion which is the second 
value defined in the Cap Plasticity material table .

for step in odb.step.values():
         for frame in step.frame:
                      P= frame.fieldOutput[PRESS]
            D= session.odb.material[].capPlasticity[0]
            B= session.odb.material[].capPlastcity[1]
            UltimateMises= P tan(B)-d

# now I am willing to create a new field output to estimate the the 
level of safety at each point in the material capPlasticity
I will call the field output DP= UltimateMises/Mises

Mises= frame.fieldOutput[PRESS]
Mises= frame.fieldOutput[Mises]
DP= UltimateMises/Mises





More information about the Geoqus mailing list