0% found this document useful (0 votes)
0 views2 pages

Ce50p 5 Lab3 Number2b

The document contains a MATLAB function that solves a system of equations related to material and load parameters using a numerical method. It initializes parameters, computes residuals, constructs a Jacobian matrix, and iteratively updates guesses to find the final values of unknowns R1, Delta1, Delta2, and Delta3. The final results indicate R1 = -3793.6350 kN, Delta1 = 0.000999 m, Delta2 = 0.002290 m, and Delta3 = 0.003528 m.

Uploaded by

ar201.resources
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

Ce50p 5 Lab3 Number2b

The document contains a MATLAB function that solves a system of equations related to material and load parameters using a numerical method. It initializes parameters, computes residuals, constructs a Jacobian matrix, and iteratively updates guesses to find the final values of unknowns R1, Delta1, Delta2, and Delta3. The final results indicate R1 = -3793.6350 kN, Delta1 = 0.000999 m, Delta2 = 0.002290 m, and Delta3 = 0.003528 m.

Uploaded by

ar201.resources
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

% CE50P-5 Laboratory 3 Number 2b

function ce50p_5_lab3_number2b
clc; clear;

% Material and Load Parameters


k1 = 1.2e5; g1 = 0.5;
k2 = 2e5; g2 = 0.6;
k3 = 7.5e5; g3 = 0.8;
k4 = 5e5; g4 = 0.4;

P1 = 100;
P2 = 150;
P3 = 50;

% Initial Guess (from Fixed-Point result)


x = [-3794.7331; 0.0010; 0.002291; 0.003530]; % [R1, Delta1, Delta2, Delta3]

% Solver Settings
tol = 1e-4;
max_iter = 100;
eps_safe = 1e-10;

for iter = 1:max_iter


R1 = x(1); d1 = x(2); d2 = x(3); d3 = x(4);

% Compute Residuals
F = [
k1 * d1^g1 + R1;
k2 * (d2 - d1)^g2 + R1 + P1;
k3 * (d3 - d2)^g3 + R1 + P1 + P2;
k4 * (-d3)^g4 + R1 + P1 + P2 + P3
];

% Jacobian Matrix
J = zeros(4);
J(1,1) = 1;
J(1,2) = k1 * g1 * d1^(g1 - 1);

J(2,1) = 1;
J(2,2) = -k2 * g2 * (d2 - d1)^(g2 - 1);
J(2,3) = k2 * g2 * (d2 - d1)^(g2 - 1);

J(3,1) = 1;
J(3,3) = -k3 * g3 * (d3 - d2)^(g3 - 1);
J(3,4) = k3 * g3 * (d3 - d2)^(g3 - 1);

J(4,1) = 1;
J(4,4) = -k4 * g4 * (-d3)^(g4 - 1);

dx = -J \ F;

1
% Update Loop
success = false;
for trial = 1:20
alpha = 0.5^(trial - 1);
x_new = x + alpha * dx;

d1n = x_new(2); d2n = x_new(3); d3n = x_new(4);

% Deformation Check
if (d1n > eps_safe) && ...
(d2n - d1n > eps_safe) && ...
(d3n - d2n > eps_safe) && ...
(-d3n > eps_safe)
success = true;
break;
end
end

x = x_new;
end

% Final Output
R1 = x(1); Delta1 = x(2); Delta2 = x(3); Delta3 = x(4);

fprintf("\nFinal Answers to the Unknowns:\n");


fprintf("R1 = %.4f kN\n", R1);
fprintf("Delta1 = %.6f m\n", Delta1);
fprintf("Delta2 = %.6f m\n", Delta2);
fprintf("Delta3 = %.6f m\n", Delta3);

Final Answers to the Unknowns:


R1 = -3793.6350 kN
Delta1 = 0.000999 m
Delta2 = 0.002290 m
Delta3 = 0.003528 m

Published with MATLAB® R2025a

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy