Bonjour,

Dans le cadre d'un projet de simulation numérique sur Abaqus, je dois extraire de 60 fichiers ODB les points (x, y) des courbes de force de déplacement du nœud (1017). Je peux faire cela manuellement, mais je cherche à automatiser la méthode (la méthode manuelle est trop lente), et j'utilise donc un script Python. Je suis toutefois débutant et j'ai besoin d'aide. J'ai écrit ce code en utilisant la documentation Abaqus, mais il y a des erreurs que je n'arrive pas à corriger.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from part import *
from material import *
from section import *
from assembly import *
from step import *
from interaction import *
from load import *
from mesh import *
from optimization import *
from job import *
from sketch import *
from visualization import *
from connectorBehavior import *
import random
from array import *
from odbAccess import openOdb
import odbAccess
import math
import numpy    
import os        # Operating system
import shutil    # copying or moving files
from abaqusConstants import*
 
Max_iterations=61
 
 
#Open text file to write results
sortie = open('Results_fromODB.txt' , 'w')#text file to fine the results
sortie.write('\t Property of Not Real Engineering')
sortie.write('\n')
 
 
for q in range(1, Max_iterations):
 
	odbname='cyl_cantilver_c%d' %(q)        # set odb name here
	path='./'                    # set odb path here (if in working dir no need to change!)
	myodbpath=path+odbname+'.odb'    
	odb=openOdb(myodbpath)
	step1 = odb.steps['Step-1']
	#create a historyRegion for a specific point(Node1017)
	hRegionStep1=step1.HistoryRegion(name='historyNode1017',description='Displacement and reaction force',point=instance1.nodes[1017])
	#create variables for this history output in step1
	hOutputStep1U2=hRegionStep1.HistoryOutput(name='U2',description='Displacement', type=SCALAR) 
	hOutputStep1Rf2=hRegionStep1.HistoryOutput(name='Rf2',description='Reaction Force', type=SCALAR) 
	#Add history data for step1
	timeData1=[0.0, 1.0]
	u2Data=[0.0, 1.0]
	rf2Data=[0.0, 1.0]
 
	hOutputStepU2.addData(frameValue=timeData1,value=u2Data)
	hOutputSteprf2.addData(frameValue=timeData1,value=rf2Data)
 
	odb.close()
 
 
	sortie.close()
Nom : ERREUR.PNG
Affichages : 426
Taille : 20,6 Ko

Merci d'avance