Skip to content

Commit

Permalink
quality factor as a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
otvam committed Jan 7, 2025
1 parent 0f1cb69 commit 743417b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/examples_stl/transformer_air/run_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _show_matrix(matrix):
with LOGGER.BlockIndent():
LOGGER.info("k_R_mat = %s %%" % (1e2 * matrix["k_R_mat"]).tolist())
LOGGER.info("k_L_mat = %s %%" % (1e2 * matrix["k_L_mat"]).tolist())
LOGGER.info("Q_mat = %s p.u." % (1e0 * matrix["Q_mat"]).tolist())
LOGGER.info("Q_vec = %s p.u." % (1e0 * matrix["Q_vec"]).tolist())


if __name__ == "__main__":
Expand Down
5 changes: 3 additions & 2 deletions pypeec/utils/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def _get_matrix_parse(n_winding, n_solution, freq, Z_mat):
else:
L_mat = np.imag(Z_mat) / w

# # get the quality factor
# get the quality factor
Q_mat = (w * L_mat) / R_mat
Q_vec = np.diagonal(Q_mat)

# get the coupling
k_R_mat = _get_matrix_coupling(n_winding, R_mat)
Expand All @@ -172,7 +173,7 @@ def _get_matrix_parse(n_winding, n_solution, freq, Z_mat):
"L_mat": L_mat,
"k_R_mat": k_R_mat,
"k_L_mat": k_L_mat,
"Q_mat": Q_mat,
"Q_vec": Q_vec,
}

return matrix
Expand Down

0 comments on commit 743417b

Please sign in to comment.