Skip to content

Instantly share code, notes, and snippets.

@HabermannR
HabermannR / Abaqus Script.py
Created October 9, 2024 13:33
cpress export for Abaqus
from abaqus import *
from abaqusConstants import *
from odbAccess import *
def extract_node_data(odb_path, step_name, frame_number=-1):
"""
Extract node coordinates and CPRESS field from an Abaqus ODB file
Parameters:
-----------
from pydantic import BaseModel
from typing import Dict, Any, TypeVar, Type, List, Optional, Union, Generic
import os
import json
from openai import OpenAI
client = OpenAI(
api_key=os.environ["GEMINI_KEY"],
base_url="https://generativelanguage.googleapis.com/v1beta/"
)