This is the alternative way beside using proEngineer..
============================================================
% FINITE ELEMENT ANALYSIS
% FRAME STRUCTURE
% pre_frame
% —————-
% Data preparation prior to the calculation in the Main Program
% ————————————————————————————–
input(‘ “Program of Data Input (enter)” ‘);
input(‘ “the following programs : main_frame_01, main_frame_02, post_frame” ‘);
input(‘ “the output file: out_frame_01.m” ‘);
clear all;
% *******************************************************************
% input
% n=number of elements
n=8;
% nsk=total number of dof
nsk=27;
% numbc=number of boundary conditions
numbc=6;
% nbc(i)= restricted degree of freedom
nbc(1)=1;
nbc(2)=2;
nbc(3)=3;
nbc(4)=25;
nbc(5)=26;
nbc(6)=27;
% Material & Geometrical Data
inert=0.01e-6; % [m^4] 40x40x3.0 (square)
area=0.03; % [m^2]
% ym=modulus of elasticity
ym=210e9; % [Pascal] taken from 4130 Alloy steel 29 x 10^6 psi
% External Loads :
force=650.0; % [Newton]
% case: validation, clamped-clamped supported beam
% data of each element
% no. elemen i, no.nod.i, no.nod.j
% ——————————–
deg=pi/180.;
nodi(1)=1;nodj(1)=2;e(1)=ym;iz(1)=inert;hl(1)=2;s(1)=area;teta(1)=0.*deg;
nodi(2)=2;nodj(2)=3;e(2)=ym;iz(2)=inert;hl(2)=2;s(2)=area;teta(2)=0.*deg;
nodi(3)=3;nodj(3)=4;e(3)=ym;iz(3)=inert;hl(3)=2;s(3)=area;teta(3)=0.*deg;
nodi(4)=4;nodj(4)=5;e(4)=ym;iz(4)=inert;hl(4)=2;s(4)=area;teta(4)=0.*deg;
nodi(5)=5;nodj(5)=6;e(5)=ym;iz(5)=inert;hl(5)=2;s(5)=area;teta(5)=0.*deg;
nodi(6)=6;nodj(6)=7;e(6)=ym;iz(6)=inert;hl(6)=2;s(6)=area;teta(6)=0.*deg;
nodi(7)=7;nodj(7)=8;e(7)=ym;iz(7)=inert;hl(7)=2;s(7)=area;teta(7)=0.*deg;
nodi(8)=8;nodj(8)=9;e(8)=ym;iz(8)=inert;hl(8)=2;s(8)=area;teta(8)=0.*deg;
% Vector of Load
for i=1:nsk
f(i)=0;
end;
% Vertical Down load
f(5)=-force;
f(8)=-force;
f(11)=-force;
f(14)=-force;
f(17)=-force;
f(20)=-force;
f(23)=-force;
% end input
% *******************************************************************
% Print-out data on file
% ———————–
fid = fopen(‘out_frame_01.m’,'w’);
fprintf(fid,’Data Frame Elemen’);
fprintf(fid,’\n’);
fprintf(fid,’ i nod-i nod-j E Iz L S Teta’);
fprintf(fid,’\n’);
for i=1:n
fprintf(fid,’%4.0f’,i);
fprintf(fid,’%4.0f’,nodi(i));
fprintf(fid,’%4.0f’,nodj(i));
fprintf(fid,’%12.2e’,e(i));
fprintf(fid,’%12.2e’,iz(i));
fprintf(fid,’%12.2e’,hl(i));
fprintf(fid,’%12.2e’,s(i));
fprintf(fid,’%12.2e’,teta(i));
fprintf(fid,’\n’);
end;
fprintf(fid,’\n’);
for i=1:nsk
fprintf(fid,’%12.2e’,f(i));
fprintf(fid,’\n’);
end;
fclose(fid);