clearvars close all InputFile='input_File_1'; %% Pre-Processing %Read Input File eval(InputFile); %Draw Structure v=DrawStructure(iDrawStructure,0, anElement, Nodes); %% Processing %Indexing, Structural Matrix Allocations Process_Input; % Evaluate Elemental properties and finally the Structural Stiffness Matrix for i1=1:Nelements %% Evaluate Element Length anElement{i1}.Length=GetLength(anElement{i1}.iEnd,Nodes); %% Evaluate Transformation Matrix anElement{i1}.Lambda=Evaluate_Transformation_Matrix(anElement{i1}.Length,... anElement{i1}.iEnd,Nodes); %% Evaluate Element Local Stiffness Matrix anElement{i1}.k=Evaluate_Local_Stiffness(anElement{i1}); %% Evaluate Element Global Stiffness Matrix anElement{i1}.kg=Evaluate_Global_Stiffness(anElement{i1}); %% Add Contribution of the Element Global Stiffness to the Structural aStructure.Kg=aStructure.Kg+Evaluate_Elemental_Contribution(anElement{i1},Ndofs); end %Keep for output %% Rotate Nodes if required %% Boundary Conditions %Fetch rearrangement matrix aStructure.V=Get_V_Mat(aStructure.Bdofs,Ndofs); %Re-arrange stiffness matrix aStructure.Km=aStructure.V*aStructure.Kg*aStructure.V'; %Isolated Kff, Kss, Kfs, Ksf Nfixed=aStructure.NBdofs; Nfree =Ndofs-Nfixed; Kff=aStructure.Km(1:Nfree,1:Nfree); Kfs=aStructure.Km(1:Nfree,Nfree+1:Nfixed+Nfree); Ksf=Kfs'; Kss=aStructure.Km(Nfree+1:Nfixed+Nfree,Nfree+1:Nfixed+Nfree); %% External Loading aStructure.Pext=Apply_External_Loading(Nodes,Ndofs); aStructure.Pextm=aStructure.V*aStructure.Pext; Pf=aStructure.Pextm(1:Nfree); %% Analysis %Den einai aparaititi i antistrofi tou pinaka, arkei epilysi me %pisw antikatastasi %Df=inv(Kff)*Pf; Df=Kff\Pf; Ds=zeros(Nfixed,1); Um=[Df;Ds]; aStructure.U=aStructure.V'*Um; %%END OF PROCESSING %%BEGIN POST-PROCESSING %% Post-Processing %Get Element forces %Get Nodal Displacement %Draw Deformed Structure