Page MenuHomec4science

postprocessing_main.m
No OneTemporary

File Metadata

Created
Sat, Sep 28, 06:40

postprocessing_main.m

function PPDATA = postprocessing_main(IDDATA, CMDATA)
%{
Function for postprocessing the results.
--------------------------------------------------------------------------
Syntax :
PPDATA = postprocessing_main(IDDATA, CMDATA)
--------------------------------------------------------------------------
File Description :
Based on the results achieved from the integration of the system equations
of motion, we here define some values of interests and plot them,
including:
1- humeral head translations along with time (abduction) in
the glenoid frame and in the thorax frame.
2- velocity of the humeral head translations along with time
(abduction) in the glenoid frame and in the thorax frame.
3- contact force associated with the 6DOF and 3DOF joints.
4- contact pattern on the humeral head (contact area)
5- migration of the humeral head center on the glenoid fossa.
6- contact pattern on the fossa (contact area)
7- maximum cartilage deformation at each time step
--------------------------------------------------------------------------
%}
for j = 1:size(IDDATA.t,2)-1
% --------------------------------------------------------------------
% define the humeral head translations in the glenoid frame
% --------------------------------------------------------------------
% define the glenoid motion using the scapulohumeral rhythm:
u = [IDDATA.Coordinate_Evolution(:,j);
IDDATA.Coordinate_Evolution_D(:,j)]; % the generalized coordinate and velocity vector
R_G2T = versatile_function('define Rot_G2T',u); % define the rotation matrix
% humeral head coordinates in the glenoid frame
PPDATA.HHT(:,j) = R_G2T'*IDDATA.Coordinate_Evolution(4:6,j);
% humeral head velocities in the glenoid frame
PPDATA.HHT_D(:,j) = R_G2T'*IDDATA.Coordinate_Evolution_D(4:6,j);
% --------------------------------------------------------------------
% define the contact data
% --------------------------------------------------------------------
Rot_H2T = versatile_function('define Rot_H2T',u); % define the rotation matrix
r_HH = [u(4) u(5) u(6)]'; % HH coordinates
DRot_H2T = versatile_function('define DRot_H2T',u); % define the rate of change of the rotation matrix
Dr_HH = [u(10) u(11) u(12)]'; % HH velocities
PPDATA = postprocessing_contact_model(j,Rot_H2T,DRot_H2T,r_HH,Dr_HH,CMDATA, PPDATA);
end
% --------------------------------------------------------------------
% define the contact pattern on the humeral head
% --------------------------------------------------------------------
postprocessing_contact_pattern_HH(CMDATA, PPDATA, IDDATA);
% --------------------------------------------------------------------
% define the contact pattern on the glenoid fossa
% --------------------------------------------------------------------
postprocessing_contact_pattern_GF(CMDATA, PPDATA, IDDATA);
% --------------------------------------------------------------------
% plot the results
% --------------------------------------------------------------------
postprocessing_plots(IDDATA, CMDATA, PPDATA);
return

Event Timeline