Dear Colleagues
In a Pymechanical script (emb. or remo. ses.) can we also have there a mech dpf script part (for post-process - see image below)?
Thank you
Workflow inside pymechanical script:
1 Solve
Pymechanical part here (a loop running single point load exc. with changing node number for every loop iteration – footfall).Every time we solve we then use the dpf below to get these results say.
2 Get some results with mech dpf (and then back to 1 solve again and so on)
Sample script:
import mech_dpf
import Ans.DataProcessing as dpf
mech_dpf.setExtAPI(ExtAPI)
with open("D:\FrequencyResponseExports\Dmax_accn.txt", "w") as f:
f.write("Node Number Directional Acceleration (m/s²)" + "\n")
for j in range(len(node_ids)):
maxAccn=0
excn=0
counter=0
for i in range(amp_fc.FieldCount):
field = amp_fc[i]
aa=field.GetEntityDataById(node_ids[j])[0]
#print(freqs[i])
if freqs[i] ==0:#get which load it is
counter=counter+1
if aa>=maxAccn:
maxAccn=aa
excn=freqs[i]
cn=counter
nc=node_ids[cn-1]
print(str(node_ids[j]) +" \t " + str(maxAccn))
f.write(str(node_ids[j]) + "\t" + str((0.707maxAccn)/(ac)) + "\n")
maxAccna.append((0.707maxAccn)/(ac))
freqmaxAccna.append(excn)
loadmaxAccna.append(cn)
nloadmaxAccna.append(nc)