Create an Abaqus field output with some invalid data

Issue

I want to add a output field to an odb. Not all the values are available and I would like to input an "invalid data". What should I pass?
I tried nan, string, 1/0, which do not work

The basic coding I used to add a field output is:

instance = odb.rootAssembly.instances['nameOfYourInstance']

field_output = odb.steps['stepName'].frames[frameId].FieldOutput(
    name='DefineTheName', description='WhatItRepresents',
    type=SCALAR # or whatever other type you need
)

field.addData(
    position=NODAL, instance=instance, labels=your_node_labels,
    data=your_data
)

I want to pass an invalid data in a specific place in your_data

Solution

You keep only those nodes in your_node_labels variable for which you have data in your_data variable.
For Ex. Let’s say, you have the data for your_node_labels=[1, 10, 12, 14, 50] nodes only and corresponding values are your_data=[10.0, 1.0, 2.2, 3.3, 15.5] something like this. Here, for node 1 you have value 10.0, for node 10 you have value 1.0 and so on. In this case, no data is written for the nodes other than the nodes in your_node_labels variable, hence no contour will be shown for those nodes.

Answered By – Satish Thorat

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published