Agent Skills
› Cai-aa/CAE-Agent-Hub
› csv-export
csv-export
GitHub用于将Abaqus固化仿真结果(节点坐标与位移)导出为CSV文件,支持不同铺层方案的变形对比及扩展其他场变量提取。
Trigger Scenarios
用户需要导出仿真结果为CSV格式
用户需要进行数据导出或结果对比
用户需要将节点坐标和位移信息保存至文件
Install
npx skills add Cai-aa/CAE-Agent-Hub --skill csv-export -g -y
SKILL.md
Frontmatter
{
"name": "csv-export",
"description": "Export curing simulation results to CSV with node coordinates and displacements. Invoke when user needs CSV output, data export, or result comparison."
}
CSV Export
Description
Export curing simulation results to CSV with node coordinates and displacements. Invoke when user needs CSV output, data export, or result comparison.
Content
CSV Format
The exported CSV file uses the following column format:
Node,X,Y,Z,U1,U2,U3
Node: Node label (integer)X, Y, Z: Node coordinatesU1, U2, U3: Displacement components from the sp step last frame
Complete Export Script
import os
from abaqusConstants import *
work_dir = 'C:\\Users\\...\\work_directory'
recipes = ['P8_mold_recipe_1', 'P8_mold_recipe_2', 'P8_mold_recipe_3']
for name in recipes:
odb_path = os.path.join(work_dir, name + '.odb')
odb = session.openOdb(name=name+'_odb', path=odb_path, readOnly=True)
inst = odb.rootAssembly.instances['P8-1']
last_frame = odb.steps['sp'].frames[-1]
u_field = last_frame.fieldOutputs['U']
u_map = {}
for val in u_field.values:
u_map[val.nodeLabel] = (val.data[0], val.data[1], val.data[2])
csv_path = os.path.join(work_dir, name + '.csv')
lines = ['Node,X,Y,Z,U1,U2,U3']
for node in inst.nodes:
nid = node.label
x, y, z = node.coordinates
if nid in u_map:
u1, u2, u3 = u_map[nid]
lines.append('%d,%.6f,%.6f,%.6f,%.6f,%.6f,%.6f' % (nid, x, y, z, u1, u2, u3))
with open(csv_path, 'w') as f:
f.write('\n'.join(lines))
odb.close()
Output Details
- 8-ply model: 5445 nodes exported
- 4-ply model: 3025 nodes exported
- Data is extracted from the sp step (springback) last frame, which represents the final deformation
Usage Scenarios
Comparing Ply Layups
Use the CSV output to compare different ply layup configurations:
- Symmetry analysis of deformation patterns
- Identifying maximum displacement locations
- Comparing springback magnitudes across recipes
Extending with Additional Fields
The script can be extended to include additional field outputs by adding more columns:
# Add stress (S) components
s_field = last_frame.fieldOutputs['S']
s_map = {}
for val in s_field.values:
s_map[val.elementLabel] = val.data
# Add state variables (SDV1-4)
sdv1_field = last_frame.fieldOutputs['SDV1']
sdv1_map = {}
for val in sdv1_field.values:
sdv1_map[val.elementLabel] = val.data
Available additional fields:
S— Stress (6 components: S11, S22, S33, S12, S13, S23)PE— Plastic strainSDV1toSDV4— State variables
Notes
- Use the
%operator for string formatting (Abaqus uses Python 2.7) - Always close the ODB after processing each recipe
- The CSV files are saved in the same work directory as the ODB files
- Node coordinates are retrieved from
instance.nodes, not from a COORD field output
Version History
- cb4d869 Current 2026-10-19 04:34


