Hi there,
I am running multiple time history analyses using openseespy. For the output file, I would like to put them in different folders or name the output files based on the input ground motion names, either way would work for me. To achieve this, I would need to include variables before the output file DFree.out. I tried a few different way but it didn't appear to work. Any suggestions would be much appreciated!
op.recorder('Node', '-file', '(need something here to relate the output with input file name)DFree.out','-time', '-node', 2, '-dof', 1,2,3, 'disp')
Using variables in the output file path/name
Moderators: silvia, selimgunay, Moderators
Re: Using variables in the output file path/name
Use Python f-strings
blah = 1
foo = 'abc'
bar = 123
ops.recorder(...,f'{blah}{foo}{bar}Dfree.out',...)
blah = 1
foo = 'abc'
bar = 123
ops.recorder(...,f'{blah}{foo}{bar}Dfree.out',...)
Re: Using variables in the output file path/name
Thank you Prof. Scott. Your online teaching content makes opensees a powerful tool.