MoritzH
Mechanical
- Apr 18, 2013
- 1
Hi everybody,
this is my first post in this forum, so far I have already profited a lot from reading other post, but I couldn't find an answer to my current problem:
I wrote the following script (see below) to create a fieldOutput object in the odb file and for starters I initialised it with dummy data for all section points of one element (the model contains S4R elements with a composite layup).
This seems to work fine, for example if I open my odb file in the viewer, I can select my custom field variable for a contour plot etc.
Also, I can get XY plots (variable vs. time) of my field via Tools->XY Data->Create->Source: ODB fieldOutput
However, I would like to get a XY plot through the thickness, thus I select 'Thickness' as source (instead of ODB Field Output), but this produces the following error message:
"No xy data was extracted using the provided options. Please verify the following:
1)The variable requested was written to the output database for the requested elements or nodes.
2)The invariant/component selected is valid for the type of element selected. For example the out-of-plane principal is not valid for solid elements."
Do you have any suggestions for me how I can create my custom fielOutput in a way that I can later generate XY plots in the viewer?
Thank you very much!
Here is the code I use to create my custom fieldOutput:
this is my first post in this forum, so far I have already profited a lot from reading other post, but I couldn't find an answer to my current problem:
I wrote the following script (see below) to create a fieldOutput object in the odb file and for starters I initialised it with dummy data for all section points of one element (the model contains S4R elements with a composite layup).
This seems to work fine, for example if I open my odb file in the viewer, I can select my custom field variable for a contour plot etc.
Also, I can get XY plots (variable vs. time) of my field via Tools->XY Data->Create->Source: ODB fieldOutput
However, I would like to get a XY plot through the thickness, thus I select 'Thickness' as source (instead of ODB Field Output), but this produces the following error message:
"No xy data was extracted using the provided options. Please verify the following:
1)The variable requested was written to the output database for the requested elements or nodes.
2)The invariant/component selected is valid for the type of element selected. For example the out-of-plane principal is not valid for solid elements."
Do you have any suggestions for me how I can create my custom fielOutput in a way that I can later generate XY plots in the viewer?
Thank you very much!
Here is the code I use to create my custom fieldOutput:
from odbAccess import *
myOdb = openOdb('D:\Aktuelle_Daten\Dokumente\Uni\Diplomarbeit\Abaqus_Data\AbaqusSE\JobSchale2.odb')
step=myOdb.steps[myOdb.steps.keys()[0]]
frame=step.frames[-1]
instanceKey=myOdb.rootAssembly.instances.keys()[0]
myInstance=myOdb.rootAssembly.instances[instanceKey]
INSfield=frame.FieldOutput(name='INS', type=SCALAR, description='Interlaminar normal stress')
dat=[[1.0],]
label=(1,)
secPnt=myInstance.elements[0].sectionCategory.sectionPoints
for i in range(len(secPnt)):
INSfield.addData(
position=INTEGRATION_POINT,
instance=myInstance,
labels=label,
sectionPoint=secPnt,
data=dat)
dat[0][0]=float(i)
print i
myOdb.save()
myOdb.close()
myOdb = openOdb('D:\Aktuelle_Daten\Dokumente\Uni\Diplomarbeit\Abaqus_Data\AbaqusSE\JobSchale2.odb')
step=myOdb.steps[myOdb.steps.keys()[0]]
frame=step.frames[-1]
instanceKey=myOdb.rootAssembly.instances.keys()[0]
myInstance=myOdb.rootAssembly.instances[instanceKey]
INSfield=frame.FieldOutput(name='INS', type=SCALAR, description='Interlaminar normal stress')
dat=[[1.0],]
label=(1,)
secPnt=myInstance.elements[0].sectionCategory.sectionPoints
for i in range(len(secPnt)):
INSfield.addData(
position=INTEGRATION_POINT,
instance=myInstance,
labels=label,
sectionPoint=secPnt,
data=dat)
dat[0][0]=float(i)
print i
myOdb.save()
myOdb.close()