GregLocock
Automotive
- Apr 10, 2001
- 23,791
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.
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.