This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
walkthrough [2017/10/17 15:03] marijn.nijenhuis [Element properties] |
walkthrough [2017/10/18 10:51] (current) marijn.nijenhuis [Element properties] |
||
---|---|---|---|
Line 15: | Line 15: | ||
We start by defining the positions of the nodes where we place the origin at node 1. '' | We start by defining the positions of the nodes where we place the origin at node 1. '' | ||
<code matlab> | <code matlab> | ||
- | clc | + | clear %clear |
- | clear | + | clc %clear |
- | %% NODE POSITIONS | + | % addpath(' |
+ | |||
+ | %some dimensions | ||
L = 0.1; %[m] | L = 0.1; %[m] | ||
W = 0.05; %[m] | W = 0.05; %[m] | ||
+ | |||
%% NODE POSITIONS | %% NODE POSITIONS | ||
nodes = [0 0 0; %node 1 | nodes = [0 0 0; %node 1 | ||
Line 37: | Line 39: | ||
3 4]; %leafspring between node 3 and 4 | 3 4]; %leafspring between node 3 and 4 | ||
</ | </ | ||
- | |||
===== Node properties ===== | ===== Node properties ===== | ||
Node properties are defined by a structure array to assign properties to nodes, such as boundary conditions, applied loads, and inertia. The usage is '' | Node properties are defined by a structure array to assign properties to nodes, such as boundary conditions, applied loads, and inertia. The usage is '' | ||
Line 49: | Line 50: | ||
Furthermore, | Furthermore, | ||
<code matlab> | <code matlab> | ||
- | nprops(2).displ_initial_x =-0.01; %start with node 2 displaced | + | nprops(2).displ_initial_x =-0.01; %start with node 2 displaced |
- | nprops(2).displ_x = 0.02; %displace node 2 20mm to the right | + | nprops(2).displ_x = 0.02; %displace node 2 20 mm to the right |
</ | </ | ||
At last we apply a load of 5N in Z-direction on node 2 and 3 | At last we apply a load of 5N in Z-direction on node 2 and 3 | ||
<code matlab> | <code matlab> | ||
- | nprops(2).force_initial = [0 0 5]; %initial load of 5N i z-direction | + | nprops(2).force_initial = [0 0 5]; %initial load of 5N in z-direction |
- | nprops(3).force_initial = [0 0 5]; %initial load of 5N i z-direction | + | nprops(3).force_initial = [0 0 5]; %initial load of 5N in z-direction |
</ | </ | ||
Line 66: | Line 67: | ||
<code matlab> | <code matlab> | ||
%% ELEMENT PROPERTIES | %% ELEMENT PROPERTIES | ||
- | |||
%first element property set | %first element property set | ||
- | eprops(1).elems = [1 3]; %assing property set 1 to element | + | eprops(1).elems = [1 3]; %assing property set 1 to elements |
eprops(1).emod = 210e9; | eprops(1).emod = 210e9; | ||
- | eprops(1).smod = 70e9; %G-modulus [Pa] | + | eprops(1).smod = 70e9; %shear modulus [Pa] |
eprops(1).dens = 7800; %density | eprops(1).dens = 7800; %density | ||
- | eprops(1).dim = [0.05 0.0005]; | + | eprops(1).dim = [0.05 0.0005]; |
- | eprops(1).cshape = ' | + | eprops(1).cshape = ' |
- | eprops(1).flex = [2 3 4]; %torsional | + | eprops(1).flex = [2 3 4]; %flexible deformations: |
eprops(1).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | eprops(1).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | ||
- | eprops(1).nbeams | + | eprops(1).color = [0.8549 |
</ | </ | ||
Line 84: | Line 84: | ||
eprops(2).elems = [2]; %assing property set 2 to element 2 | eprops(2).elems = [2]; %assing property set 2 to element 2 | ||
eprops(2).dens = 2700; %density | eprops(2).dens = 2700; %density | ||
- | eprops(2).dim = [0.05 0.025]; | + | eprops(2).dim = [0.05 0.025]; |
- | eprops(2).cshape = ' | + | eprops(2).cshape = ' |
eprops(2).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | eprops(2).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | ||
+ | eprops(2).color = [0.1686 | ||
</ | </ | ||
- | ====== | + | ====== |
- | At this moment we have defined the basic configuration for our simulation and we can analyze the overconstraints in our model. For an initial suggestion for the releases to resolve the overconstraints, we can call '' | + | When all input seems complete, a call to '' |
<code matlab> | <code matlab> | ||
out = spacarlight(nodes, | out = spacarlight(nodes, | ||
</ | </ | ||
- | When the system is properly defined, the number of overconstraints and the suggestion for released deformation modes is provided in the command window like below: | + | If the model works, '' |
- | < | + | |
- | Warning: System is overconstrained; | + | |
- | A suggestion for possible releases is given in the table below. | + | |
- | + | ||
- | + | ||
- | Number of overconstraints: | + | |
- | + | ||
- | Element | + | |
- | _______ | + | |
- | + | ||
- | 1 1 1 1 1 1 1 | + | |
- | 2 1 1 1 1 1 1 | + | |
- | 3 1 1 1 1 1 1 | + | |
- | </ | + | |
- | It appears this problem contains 7 overconstraints and a suggestion is provided. Now we can add a single released deformation mode with the help of table and redo the overconstrained analyses. Therefore, we define the '' | + | |
- | + | ||
- | To release the second deformation mode of element two, we use: | + | |
- | <code matlab> | + | |
- | %% RELEASES | + | |
- | rls(1).def = [2]; | + | |
- | </ | + | |
- | If we now redo the overconstraint analysis (call '' | + | |
- | <code matlab> | + | |
- | %% RELEASES | + | |
- | rls(1).def = [1 2 3 4 5 6]; | + | |
- | rls(3).def = [3]; | + | |
- | </ | + | |
- | + | ||
- | ====== Run simulation ====== | + | |
- | When an exact constrained | + | |
- | + | ||
- | Furthermore, | + | |
+ | Also, simulation results are stored in the MATLAB workspace in the structure '' | ||
====== Example script ====== | ====== Example script ====== | ||
Line 135: | Line 104: | ||
clc | clc | ||
+ | % addpath(' | ||
+ | |||
+ | %some dimensions | ||
L = 0.1; %[m] | L = 0.1; %[m] | ||
W = 0.05; %[m] | W = 0.05; %[m] | ||
+ | |||
%% NODE POSITIONS | %% NODE POSITIONS | ||
nodes = [0 0 0; %node 1 | nodes = [0 0 0; %node 1 | ||
Line 143: | Line 115: | ||
W L 0; %node 3 | W L 0; %node 3 | ||
W 0 0]; %node 4 | W 0 0]; %node 4 | ||
- | + | ||
+ | |||
%% ELEMENT CONNECTIVITY | %% ELEMENT CONNECTIVITY | ||
elements= [1 2; | elements= [1 2; | ||
2 3; | 2 3; | ||
3 4]; %leafspring between node 3 and 4 | 3 4]; %leafspring between node 3 and 4 | ||
- | + | ||
- | + | ||
- | + | %% NODE PROPERTIES | |
- | %% NODE PROPERTIES | + | |
nprops(1).fix = true; %fix node 1 | nprops(1).fix = true; %fix node 1 | ||
nprops(4).fix = true; %fix node 4 | nprops(4).fix = true; %fix node 4 | ||
- | + | ||
- | nprops(2).displ_initial_x =-0.01; %start with node 2 displaced | + | nprops(2).displ_initial_x =-0.01; %start with node 2 displaced |
- | nprops(2).displ_x = 0.02; %displace node 2 20mm to the right | + | nprops(2).displ_x = 0.02; %displace node 2 20 mm to the right |
- | + | ||
- | nprops(2).force_initial = [0 0 5]; %initial load of 5N in z-direction | + | nprops(2).force_initial = [0 0 5]; %initial load of 5N in z-direction |
- | nprops(3).force_initial = [0 0 5]; %initial load of 5N in z-direction | + | nprops(3).force_initial = [0 0 5]; %initial load of 5N in z-direction |
- | + | ||
+ | |||
%% ELEMENT PROPERTIES | %% ELEMENT PROPERTIES | ||
- | |||
%first element property set | %first element property set | ||
- | eprops(1).elems = [1 3]; %assing property set 1 to element | + | eprops(1).elems = [1 3]; %assing property set 1 to elements |
eprops(1).emod = 210e9; | eprops(1).emod = 210e9; | ||
- | eprops(1).smod = 70e9; %G-modulus [Pa] | + | eprops(1).smod = 70e9; %shear modulus [Pa] |
eprops(1).dens = 7800; %density | eprops(1).dens = 7800; %density | ||
- | eprops(1).dim = [0.05 0.0005]; | + | eprops(1).dim = [0.05 0.0005]; |
- | eprops(1).cshape = ' | + | eprops(1).cshape = ' |
- | eprops(1).flex = [2 3 4]; %torsional | + | eprops(1).flex = [2 3 4]; %flexible deformations: |
eprops(1).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | eprops(1).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | ||
- | eprops(1).nbeams | + | eprops(1).color = [0.8549 |
+ | |||
%second element property set | %second element property set | ||
eprops(2).elems = [2]; %assing property set 2 to element 2 | eprops(2).elems = [2]; %assing property set 2 to element 2 | ||
eprops(2).dens = 2700; %density | eprops(2).dens = 2700; %density | ||
- | eprops(2).dim = [0.05 0.025]; | + | eprops(2).dim = [0.05 0.025]; |
- | eprops(2).cshape = ' | + | eprops(2).cshape = ' |
eprops(2).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | eprops(2).orien = [0 0 1]; %width-direction of leafspring oriented in z-direction | ||
- | + | eprops(2).color = [0.1686 0.3922 | |
- | + | ||
- | %% RELEASES | + | |
- | rls(1).def = [1 2 3 4 5 6]; | + | |
- | rls(3).def = [3]; | + | |
%% DO SIMULATION | %% DO SIMULATION | ||
- | out = spacarlight(nodes, | + | out = spacarlight(nodes, |
</ | </ |