How to get results with DPF for a time/frequency not available in my rst file?
Javier Vique
Member, Employee Posts: 82
✭✭✭✭
For instance, let's imagine that our harmonic analysis contains results for frequency 12Hz and 15Hz. If I want to get a result for 14Hz and 14.5Hz, how can I do it?
Tagged:
0
Comments
-
We cannot point to any scoping Id available in my rst, as we usually do. The most straightforward way to get it is just giving your frequencies/times in a list, making sure is a float number. DPF will automatically interpolate the results for you. Please see below code:
freq_scoping=[14.0,14.5] op.inputs.time_scoping.Connect(freq_scoping)
There is another option which is using dpf.operators.math.centroid_fc(). Below the code used in PyDPF:
uy_op = dpf.operators.result.displacement_Y(data_sources=dataSource,time_scoping=timeScop) uy_095 = dpf.operators.math.centroid_fc(fields_container=uy_op.outputs.fields_container(),time_freq=0.95) print ('Node 1438 - Y displacement at 0.95s is ' + str(uy_095.outputs.fields_container()[0].get_entity_data_by_id(1438)))
2