-
-
Save RustSynx/133034b9b86aefc9646fff1ee61500cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function plot_moduli_relationship() | |
| clc; close all; | |
| % Poisson's Ratio | |
| nu = 0 : 0.005 : 0.499; | |
| % Normalized Young's Modulus | |
| E = 1; | |
| % Shear Modulus (G) | |
| G = E ./ (2 * (1 + nu)); | |
| % Bulk Modulus (K) | |
| K = E ./ (3 * (1 - 2 * nu)); | |
| figure('Color', [0,0,0], 'Position', [100, 100, 700, 500]); | |
| % Left Y-Axis: Shear Modulus (G) | |
| yyaxis left | |
| plot(nu, G, 'b-', 'LineWidth', 2.5); | |
| ylabel('Shear Modulus (G) / E', 'FontSize', 12, 'FontWeight', 'bold', 'Color', 'b'); | |
| set(gca, 'YColor', 'b'); | |
| ylim([0, 0.6]); | |
| % Right Y-Axis: Bulk Modulus (K) | |
| yyaxis right | |
| plot(nu, K, 'r-', 'LineWidth', 2.5); | |
| ylabel('Bulk Modulus (K) / E', 'FontSize', 12, 'FontWeight', 'bold', 'Color', 'r'); | |
| set(gca, 'YColor', 'r'); | |
| ylim([0, 10]); | |
| xlabel('Poisson''s Ratio (\nu)', 'FontSize', 12, 'FontWeight', 'bold'); | |
| title('Relationship between Elastic Moduli (G, K) and \nu', 'FontSize', 14); | |
| grid on; | |
| legend({'Shear Modulus (G)', 'Bulk Modulus (K)'}, 'Location', 'NorthWest', 'FontSize', 11); | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment