×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

OpenFEM - Beam element script

OpenFEM - Beam element script

OpenFEM - Beam element script

(OP)
Does anybody have a simple model with beam elements than runs to completion in a static analysis?

I'm a newbie with it and can't find a few necessary parameters in the 'help'.

Specifically I can get a solution but can't process the results into a displayable form.

clear;
fegui;
model = struct('Node',[],'Elt',[]);
%           NodeID  unused   x y z
model.Node=[  1      0 0 0    0 1 0;
              2      0 0 0    0 0 0;
              3      0 0 0    1 1 0;
              4      0 0 0    1 0 0;
              5      0 0 0    2 0 0;
              6      0 0 0    2 1 0;
              7      0 0 0    1 1 1];


model.Elt=[     Inf     abs('beam1')
                1       3      1    1     7       0
                3       6      1    1     7       0
                2       4      1    1     7       0
                4       5      1    1     7       0
                2       3      1    1     7       0
                4       6      1    1     7       0
                3       4      1    1     7       0
                5       6      1    1     7       0 ];


%feplot(model);
model.pl=[ 1   fe_mat('m_elastic','SI',1)  7.2e+10  0.3   2700 ];
model.il = [ ...
       1 fe_mat('p_beam','SI',1) 5e-9   5e-9   5e-9   2e-5  0 0
       p_beam('dbval 2','circle 4e-3')
       p_beam('dbval 3','rectangle 4e-3 3e-3')
]


model=fe_case(model,'SetCase1', ...  
  'FixDof','2-D motion',[.03 .04 .05]', ...
  'FixDof','Clamp edge',[1 2]');             


data  = struct('DOF',6.02,'def',10000);       


model = fe_case(model,  'AddToCase1', 'DofLoad','PointLoad',data)   
model = fe_mk(model);
Load = fe_load(model,'Case1');
%from help
def = struct('def',[],'DOF',model.DOF)
kd = ofact(model.K{2}); % use the factor object for large matrices
def.def = kd\Load.def;
ofact('clear',kd);  % Clear the factor when done
'ok to here'
Stress = fe_stres('stress mises',model,def);
% problem is that def.def is just the active DOFs, def.DOF is all of them, also stress mises is probably wrong for a beam element
 

 

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: OpenFEM - Beam element script

Hy,

Your main problem is the def definition.
def.DOF is not equal to model.DOF but just equal to model.Stack{1,3}.DOF

The software compute the solution
>> def.def

ans =

   (1,1)    -1.3808e-002
   (2,1)     3.3156e-002
   (3,1)     3.9453e-002
   (4,1)     6.9714e-003
   (5,1)     4.0000e-002
   (6,1)     4.0321e-002
   (7,1)     7.0032e-003
   (8,1)     8.7123e-002
   (9,1)     3.5865e-002
  (10,1)    -2.0722e-002
  (11,1)     8.7150e-002
  (12,1)     4.0765e-002

You can animate the solution with :
feplot(model.Node,model.Elt,def.def,def.DOF)

For the stress computation, the command fe_stres generate an error :
Warning: stress computation not supported beam1

David

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources