zhuminjie / OpenSeesPy

OpenSeesPy versions, doc, and pip
Other
157 stars 66 forks source link

The MPCO recorder can't work in OpenSeespy #126

Closed zxh804159854 closed 5 months ago

zxh804159854 commented 5 months ago

The MPCO recorder can be read by the pre/post-processor STKO (Scientific ToolKit for OpenSees,https://asdeasoft.net/stko/). It work well in tcl, but can't work in OpenSeespy.

image

I think there is a problem when compiling because it depends on HDF5.

Snipaste_2024-01-08_01-27-02

An example for testing:

import openseespy.opensees as ops

ops.wipe()
ops.model('basic', '-ndm', 2, '-ndf', 3)

ops.node(1, 0, 0)
ops.node(2, 1, 0)
ops.fix(1, 1, 1, 1)

E=210.0e9
A=1.0
I=1
M=1
ops.geomTransf('Linear', 1)
ops.element('elasticBeamColumn', 1, *[1, 2], A, E, I, 1,'-mass', M)

ops.timeSeries('Constant', 1)
ops.pattern('Plain', 1, 1)
Wy=-1
Wx=0.0
ops.eleLoad('-ele', 1, '-type', '-beamUniform',  Wy,Wx)

ops.recorder('mpco',"fiber_beams.mpco",'-N','displacement')
ops.constraints('Transformation')
ops.numberer('RCM')
ops.system('BandGeneral')
ops.test('NormDispIncr', 1.0e-6, 6, 2)
ops.algorithm('Linear')
ops.integrator('LoadControl', 1)
ops.analysis('Static')
ops.analyze(1)

The command to create a MPCO recorder is: (ref https://drive.google.com/file/d/1V6Dh8CWv1RZizLi-NCPKHmH2Fb2cIDBT/view)

recorder mpco $fileName <-N $nodeRespType1 $nodeRespType2 ...> <-E $elemRespType1
$elemRespType2 ...> <-NS $nodeSensRespType1 $sensParam1 $nodeSensRespType2 $sensParam2
... > <-R $regionTag> <-T dt $deltaTime> <-T nsteps $numSteps>
zxh804159854 commented 5 months ago

I have solved the problem,I comment out the code about checking HDF5,For example 111 MPCO recorder will load hdf5 shared library at runtime. Note, hdf5 version = 1.12.0