%Input Data For Plane Truss problem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %General Control Data nDim=2; %Space Dimension %=2 for 2D problems %=3 for 3D problems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %The nodal coordinates will be assigned to the Nodes structure Nodes{1}.x=0; Nodes{1}.y=0; Nodes{2}.x=3; Nodes{2}.y=-3; Nodes{3}.x=6; Nodes{3}.y=0; %This is the total number of Nodes nNodes=length(Nodes); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Element Connectivity %The truss elements are geometrically defined through their START (iEnd(1)) %and END (iEnd(2)) nodes anElement{1}.iEnd(1)=1;anElement{1}.iEnd(2)=2; anElement{2}.iEnd(1)=2;anElement{2}.iEnd(2)=3; anElement{3}.iEnd(1)=1;anElement{3}.iEnd(2)=3; %This is the total number of Elements nElements=length(anElement); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Material Definition aMaterial{1}.Eyoung=210000000; %Section Properties aProperty{1}.A=0.001; aProperty{2}.A=0.002; %Now assign a Material and a Property to each element anElement{1}.iMaterial=1; anElement{1}.iProperty=1; %To element 1 exei to 1 yliko kai tin 1 diatomi anElement{2}.iMaterial=1; anElement{2}.iProperty=2; %To element 2 exei to 1 yliko kai tin 2 diatomi anElement{3}.iMaterial=1; anElement{3}.iProperty=1; %To element 3 exei to 1 yliko kai tin 1 diatomi %and procceed with assigning the property and material values to each %element for ielement=1:nElements iMaterial=anElement{ielement}.iMaterial; anElement{ielement}.aMaterial.Eyoung=aMaterial{iMaterial}.Eyoung; iProperty=anElement{ielement}.iProperty; anElement{ielement}.aProperty.A=aProperty{iProperty}.A; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Boundary Conditions %If a node is constrained then its ifix variable will be larger than zero %First initiallise the properties for each node for inode=1:nNodes Nodes{inode}.ifix=0; Nodes{inode}.phi=0; end %Now proceed with making the necessary assignements Nodes{1}.ifix=11; %Prwto 1=desmefsi sti diefthynsi X1 Deftero 1 Desmefsi sti Diefthinsi X2 Nodes{3}.ifix=01; %Kylisi = Eleftheri i X1 kai desmevmeni i X2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %External Loading %If a concentrated load is applied on a node variable iload will be %non-zero for inode=1:nNodes Nodes{inode}.iload=0; end % Nodes{2}.iload=1; Nodes{2}.Pext(1,1)=100; %Fortisi kata ti diefthynsi X1 Nodes{2}.Pext(2,1)=500; %Fortisi kata ti diefthynsi X2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% aStructure.nElements=nElements; aStructure.nNodes=nNodes; aStructure.nDim=nDim;