SDT-base Contents   Functions      PDF Index |
Declaration by hand is clearly not the best way to proceed in general.feutil provides a number of commands for finite element model creation.feutil should be preferred to femesh which is a lower level command. One can find meshing examples through the feutil commands in
The principle of feutil meshing strategy is to build sub model parts using the feutil basic meshing commands (extrusion, rotation, revolution, division, ...) and to assemble those models to form the resulting model thanks to the feutil AddTest commands.
Following detailed example builds the GARTEUR model.
First the model data structure is initialized (see sdtweb model), with fields Node (that contains some initial nodes that will be used to begin building of elements by elementary operations), Elt (which is empty at this step), unit (that contains the unit of the mesh, that must be coherent with material properties defined later. Here the SI system is used that means that node positions are defined in meters.), and name (that contains model name that is used to identify the model in the assembly steps for example).
%% Step1 : Initialize model model=struct('Node',[1 0 0 0 0 0 0; 2 0 0 0 0 0 0.15; 3 0 0 0 0.4 1.0 0.176; 4 0 0 0 0.4 0.9 0.176],... 'Elt',[],'unit','SI','name','GARTEUR');
Now the fuselage is built by creating an initial beam between nodes 1 and 2 (see feutil Object commands to easily create a number of elementary models). Then the beam is extruded with an irregular spatial step in the x direction, to form quad4 elements that represents the fuselage.
%% Step2 Fuselage model.Elt=feutil('ObjectBeamLine 1 2',model); model=feutil('Extrude 0 1.0 0.0 0.0',model,... [linspace(0,.55,5) linspace(.65,1.4,6) 1.5]);
The same strategy is used to mesh the quads corresponding to the plane tail. The extremities of the initial beam to be extruded are not explicitely defined as previously, but are found in the nodes created in the last step through the feutil FindNode command (that returns the NodeId of nodes found by FindNode). Here nodes are found at z position equal to .15, and x upper than 1.4. The vertical tail is built in a temporary model named mo0. Note that mo0 is first initialized with principal model nodes (mo0=model;) so that new nodes that will be added during the extrusion respect the NodeId numerotation of the main model. Then we can simply add the vertical tail mo0 to the main model using the feutil AddTestCombine command (if node numerotation was not coherent for the new part mo0 and the main model already defined nodes, we would have to use the feutil AddTestMerge command that can be really time consuming).
%% Step3 vertical tail n1=feutil('FindNode z==.15 & x>=1.4',model); mo0=model; mo0.Elt=feutil('ObjectBeamLine',n1); mo0=feutil('Extrude 3 0 0 .1',mo0); model=feutil('AddTestCombine-noori',model,mo0);
Then the vertical horizontal tail, the right and left drums, the wings and the connection plate are built and added to main model using the same strategy:
%% Step4 Vertical horizontal tail n1=feutil('FindNode z==.45',model) mo0=model; mo0.Elt=feutil('ObjectBeamLine',n1); mo0=feutil('Extrude 0 0.0 0.2 0.0',mo0,[-1 -.5 0 .5 1]); model=feutil('AddTestCombine;-noori',model,mo0); %% right drum mo0=model; mo0.Elt=feutil('ObjectBeamLine 3 4'); mo0=feutil('Extrude 1 .4 0 0',mo0); mo0=feutil('Divide',mo0,[0 2/40 15/40 25/40 1],[0 .7 1]); model=feutil('AddTestCombine;-noori',model,mo0); %% left drum mo0=feutil('SymSel 1 0 1 0',mo0); model=feutil('AddTestCombine;-noori',model,mo0); %% wing n1=feutil('FindNode y==1 & x>=.55 & x<=.65',model); mo0=model; mo0.Elt=feutil('ObjectBeamLine',n1); mo0=feutil('Divide',mo0,[0 1-.762 1]); mo0=feutil('Extrude 0 0.0 -1.0 0.0',mo0,[0 0.1 linspace(.15,.965,9) ... linspace(1.035,1.85,9) 1.9 2.0]); model=feutil('AddTestCombine;-noori',model,mo0); %% Connection plate n1=feutil('FindNode y==0.035 | y==-0.035 & x==.55',model) mo0=model; mo0.Elt=feutil('ObjectBeamLine',n1); mo0=feutil('Divide 2',mo0); mo0=feutil('TransSel -.02 0 0',mo0); mo0=feutil('Extrude 0 1 0 0',mo0,[0 .02 .12 .14]); i1=intersect(feutil('FindNode group6',model),feutil('FindNode group1',mo0)); mo0=feutil('TransSel 0.0 0.0 -0.026',mo0); model=feutil('AddTestCombine;-noori',model,mo0);
The stiffness connecting the connection plate are built extruding a mass object to form a beam, and then changing the name of the beam group as celas which are the spring elements in SDT.
%% Step5 Stiff links for the connection mo0=model; mo0.Elt=feutil('Object mass',i1); mo0=feutil('Extrude 1 0 0 -.026',mo0); mo0.Elt=feutil('set group1 name celas',mo0);
The celas properties are defined in the element matrix (see sdtweb celas for more details). First row of mo0 is the header, the springs are stored as following rows (2nd row to the end). The springs connect the master DOF (column 3) x, y, z, θx and θy to the same DOF on the slave nodes (column 4, 0 that mean the same as master). The stiffness (column 7) is defined at 1e12. The 4 springs inmo0 are then added to the main model.
%% Step6 set connected DOFs and spring value mo0.Elt(2:end,3)=12345; % master dof mo0.Elt(2:end,4)=0; % same dof as master mo0.Elt(2:end,7)=1e12; % stiffness model=feutil('AddTestCombine;-noori',model,mo0); % add springs to main model
Then group 6 is divided in 2 groups to get the part covered by constraining layer in a separated group (in order to help the later manipulations of this part, such as material identifier definition).
%% Step7 Make a group of the part covered by the constraining layer model.Elt=feutil('Divide group 6 InNode {x>.55 & y<=.85 & y>=-.85}',model);
Then some masses are added through the ObjectMass command. Then all masses are regrouped in a same group.
%% Step8 Tip masses i1=feutil('FindNode y==0.93 | y==-0.93 & x==0.42',model) mo0=model; mo0.Elt=feutil('Object mass',i1,[0.2 0.2 0.2]); %200g model=feutil('AddTestCombine;-noori',model,mo0); i1=feutil('FindNode z==.45 & y==0',model) mo0=model; mo0.Elt=feutil('Object mass',i1,[0.5 0.5 0.5]); %500g model=feutil('AddTestCombine;-noori',model,mo0); model=feutil('Join mass1',model); % all mass in the same group
Then plates are oriented (see the feutil Orient command) so that offset in correct direction can be defined. Offset (distances in the normal direction from element plane to reference plane) are defined in element matrices in the 9th column for quad4 elements. The feutil FindElt command is used to find the indices of considered elements in the model element matrix model.Elt.
%% Step9 Orient plates that will need an off-set model.Elt=feutil('Orient 4:8 n 0 0 3',model); i1=feutil('FindElt group4:5',model); model.Elt(i1,9)=0.005; % drums (positive off-set) i1=feutil('FindElt group6:7',model); model.Elt(i1,9)=-0.005; % wing i1=feutil('FindElt group8',model); model.Elt(i1,9)=0.008; % wing
Now ProId (element property identifier) and MatId (material identifier) are defined for each element. In last meshing steps, elements have been added by group (or separated), so that we only attribute a material and element property identifier for each group.
%% Step10 Deal with material and element properties identifier: model.Elt=feutil('Set group1 mat1 pro3',model); model.Elt=feutil('Set group2:7 mat1 pro1',model); model.Elt=feutil('Set group8 mat2 pro2',model); model.Elt=feutil('Set group6 pro4',model);
And following lines define associated properties:
%% Step11 Define associated properties: model.pl=[m_elastic('dbval 1 aluminum'); m_elastic('dbval 2 steel')]; model.il = [1 fe_mat('p_shell','SI',1) 2 1 0 .01 2 fe_mat('p_shell','SI',1) 2 1 0 .016 3 fe_mat('p_shell','SI',1) 2 1 0 .05 4 fe_mat('p_shell','SI',1) 2 1 0 .011];
The result is then displayed in feplot, coloring each material differently:
%% Step12 Display in feplot cf=comgui('guifeplot -project "SDT Root"',3); % Robust open in figure(3) cf.model=model; % display model fecom(';sub 1 1;view3; colordatamat-edgealpha.1'); % 1 subplot, specify view, color,