@@ -80,22 +80,34 @@ def generate_common_base_params(
80
80
# mapping hysteresis displacements to the strains
81
81
# per default, we only model the hysteresis on the axial strain
82
82
B_z = jax .scipy .linalg .block_diag (
83
- * [jnp .array ([[0.0 ], [0.0 ], [1.0 ]]) for _ in range (num_segments )] # assumes 3 strains per segment
84
-
83
+ * [
84
+ jnp .array ([[0.0 ], [0.0 ], [1.0 ]]) for _ in range (num_segments )
85
+ ] # assumes 3 strains per segment
85
86
)
86
87
params ["hysteresis" ]["basis" ] = B_z
87
88
# number of hysteresis states
88
89
n_z = params ["hysteresis" ]["basis" ].shape [1 ]
89
90
# ratio of post-yield and pre-yield stiffness
90
91
hys_alpha_val = 0.6
91
- hys_alpha = jnp .array ([(hys_alpha_val if B_z [xi_idx , :].sum () > 0 else 1.0 ) for xi_idx in range (3 * num_segments )])
92
+ hys_alpha = jnp .array (
93
+ [
94
+ (hys_alpha_val if B_z [xi_idx , :].sum () > 0 else 1.0 )
95
+ for xi_idx in range (3 * num_segments )
96
+ ]
97
+ )
92
98
params ["hysteresis" ]["alpha" ] = hys_alpha
93
99
# params["hysteresis"]["alpha"] = 0.6 * jnp.ones((n_q, )) # ratio of post-yield and pre-yield stiffness
94
- params ["hysteresis" ]["beta" ] = 30.0 * jnp .ones ((n_z , )) # dimensionless parameter in the Bouc-Wen model
95
- params ["hysteresis" ]["gamma" ] = 1.0 * jnp .ones ((n_z , )) # dimensionless parameter in the Bouc-Wen model
96
- params ["hysteresis" ]["n" ] = 1.0 * jnp .ones ((n_z , )) # dimensionless parameter in the Bouc-Wen model
100
+ params ["hysteresis" ]["beta" ] = 30.0 * jnp .ones (
101
+ (n_z ,)
102
+ ) # dimensionless parameter in the Bouc-Wen model
103
+ params ["hysteresis" ]["gamma" ] = 1.0 * jnp .ones (
104
+ (n_z ,)
105
+ ) # dimensionless parameter in the Bouc-Wen model
106
+ params ["hysteresis" ]["n" ] = 1.0 * jnp .ones (
107
+ (n_z ,)
108
+ ) # dimensionless parameter in the Bouc-Wen model
97
109
# to remove redundancy from Bouc-Wen model, choose A = 1
98
- params ["hysteresis" ]["A" ] = jnp .ones ((n_z , ))
110
+ params ["hysteresis" ]["A" ] = jnp .ones ((n_z ,))
99
111
100
112
return params
101
113
0 commit comments