Why element node in "print -JSON" is different from "print -ele"

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
MikeITExpert
Posts: 24
Joined: Sat Aug 21, 2021 9:19 pm

Why element node in "print -JSON" is different from "print -ele"

Post by MikeITExpert » Tue Sep 28, 2021 9:59 am

I am trying to get the list of all elements and nodes so I use ...

Code: Select all

print -JSON -file model.json
but then the output would be different from a typical print -ele command.

Code: Select all

print -ele 9001
From JSON it would look like below

Code: Select all

{"name": 9001, "type": "TwoNodeLink", "nodes": [1201, 1.0012e+06], "materials": ["412", "40", "40", "40", "40", "40"], "dof": ["P", "Vy", "Vz", "T", "My", "Mz"], "sDratios": [0.5, 0.5], "transMatrix": [[0, 0.812359, -0.583158], [-1, 0, 0], [0, 0.583158, 0.812359]],"addRayleigh": 0, "mass": 0},
Using print -ele it would look like below

Code: Select all

Element: 9001
  type: TwoNodeLink
  iNode: 1201, jNode: 1001201
  Material dir0: 412
  Material dir1: 40
  Material dir2: 40
  Material dir3: 40
  Material dir4: 40
  Material dir5: 40
  Mratio:   shearDistI: 0.5 0.5

  addRayleigh: 0  mass: 0
  resisting force: 5.42101e-16 9075.73 -6515.08 2.41573e-10 -4.08609e-13 -5.69206e-13 -5.42101e-16 -9075.73 6515.08 5.54403e-10 -4.08608e-13 -5.69206e-13
Please let me know if there is workaround.

Regards

Post Reply