SDT-base Contents   Functions      PDF Index |
Experimental setups can be defined with a cell arrays containing all the information relative to the sensors and wireframe geometry. This array is meant to be filled any table editor (Excel, CSV, ...), often outside MATLAB. Note you can also use the URN format in many cases section 4.6.4.
Using EXCEL you can read raw data with data=sdtacx('excel read filename',sheetnumber) or use wire=ufread('filename.xlsx') which expects the Nodes, Elements, Sensors tabs.
The Sensors tab is mandatory and stored in MATLAB as a cell array. The first row gives column labels (the order in which they are given is free). Each of the following rows define a sensor. Known column headers are
'dir x y z' | Direction of measurement specified trough its components in global coordinates (the vector is normalized). |
'X' | [1 0 0], translation in the reference frame |
'Y' | [0 1 0], in the reference frame |
'Z' | [0 0 1], in the reference frame |
'R' | unit radius translation in the cylindrical reference frame |
'THETA' | unit azimuth translation in the cylindrical reference frame |
'N' | normal to the element(s) to which the sensor is matched (automatically detected in the subsequent call to SensMatch) |
'TX' | tangent to matched surface in the N,X plane. |
'TY' | tangent to matched surface in the N,Y plane |
'TZ' | tangent to matched surface in the N,Z plane |
'TR' | tangent to matched surface in the N,R plane |
'TTHETA' | tangent to matched surface in the N,THETA plane |
'N^TX' | tangent orthogonal to the N,X plane |
'N^TY' | tangent orthogonal to the N,Y plane |
'N^TZ' | tangent orthogonal to the N,Z plane |
'N^TR' | tangent orthogonal to the N,R plane |
'N^TTHETA' | tangent orthogonal to the N,THETA plane |
'laser xs ys zs' | where (xs,ys,zs) are the coordinates of the primary or secondary source (when mirrors are used). |
'FEM 10.01' | associated FEM DOF |
'ColAct,1' | Collocated to FEM Load Act column 1. |
Additional accepted specifications for non linear time simulations (may require SDT-nlsim license). Note that the using can then also be given DirSpec using lab.{unit=*coef=ulab}.
'PX','PY','PZ' | absolute position in the reference frame |
'rX','rY','rZ' | rotation with respect to reference frame |
'vx','vy','vz' | velocity with respect to reference frame (time derivative of 'x','y','z') |
'ax','ay','az' | acceleration with respect to reference frame (second derivative of 'x','y','z') |
'ux','uy','uz' | for springs relative motion in reference frame |
'sx1','sy1','sz1' | springs resultant on first node in frame associated with that node |
'Fx','Fy','Fz' | surface resultants require additional specification of type (either Resultant for fixed matrix elastic resultants, ZRes for non-linear resultants), the selected elements EltSel, resultant surface SurfSel. 'Corner:Fx{"Zres","eltsel","surfsel",dir,"dirvalue"}' |
'Mx','My','Mz' | Same as surface resultant but for moments. |
triax sensors are dealt with by defining three sensors with the same 'lab' but different 'SensId' and 'DirSpec'. In this case, a straightforward way to define the measurement directions is to make the first axis be the normal to the matching surface. The second axis is then forced to be parallel to the surface and oriented along a preferred reference axis, allowed by the possibility to define 'T*'. The third axis is therefore automatically built so that the three axes form a direct orthonormal basis with a specification such as N^T*. Note that there is no need to always consider the orthonormal basis as a whole and a single trans sensor with either 'T*' or N^T* as its direction of measure can be specified.
Two optional tabs can also be provided to ease the definition of Nodes (especially when triaxes are involved) and Elements. Wireframe is then built on the fly.
Known column headers of the tab Nodes are
Known column headers of the tab Elements are
In the example below, one considers a pentahedron element and aims to observe the displacement just above the slanted face. The first vector is the normal to that face whose coordinates are [−√2/2,√2/2,0]. The second one is chosen (i.) parallel to the observed face, (ii.) in the (x,y) plane and (iii.) along x axis, so that its coordinates are [√2/2,√2/2,0]. Finally, the coordinates of the last vector can only be [0,0,−1] to comply with the orthonormality conditions. The resulting sensor placement is depicted in figure 4.10
cf=feplot;cf.model=femesh('testpenta6');fecom('triax'); RO.Node={'NodeName','NodeId','XYZ'; 'Tri' ,1 ,[.4 .6 .5] 'Mono1' ,2 ,[.4 .6 .1] 'Mono2' ,3 ,'@FEM5' 'Mono3' ,4 ,[1 0 0.5] 'Mono4' ,5 ,'@FEM6' }; RO.Elements={'Type' ,'Nodes'; 'mass1',1 ; '' ,2 ; '' ,3 ; '' ,4 ; '' ,5 }; RO.tdof={'tlab' ,'SensId','DirSpec' ; 'Tri:N' ,1.01 ,'N' ; 'Tri:TX' ,1.02 ,'TX' ; 'Tri:NTX',1.03 ,'N^TX' ; 'Mono1' ,2.01 ,'dir 1 -1 1'; 'Mono2:X',3.01 ,'FEM 5.01' ; 'Mono3:Y',4.01 ,'Y' ; 'Mono4:N',5.01 ,'N' }; %RO.BadSensId=[]; % to exclude bad sensors from operations RO.EnvSensId=100; %sens=fe_sens('tdoftable',tcell); cf.mdl=fe_case(cf.mdl,'SensDof','Test',RO); cf.mdl=fe_case(cf.mdl,'SensMatch radius1','Test','selface'); sdth.urn('Tab(Cases,Test){Proview,on,deflen,.2,arProp"linewidth,2"}',cf) sens=fe_case(cf.mdl,'sens'); fe_sens('tdoftable',cf,'Test') % see summary of match results tname=fullfile(sdtdef('tempdir'),'SensSpec.xls'); % Test write to excel to illustrate ability to reread if ispc % Only works with ActiveX and MS-Excel at the moment ufwrite(tname,cf.CStack{'Test'}) end
It is also possible to define sensor orientations and positions using only one cell array, by providing both the DirSpec and the X Y Z or FEMid position like in the example below.
model=demosdt('demo ubeam-pro'); cf=feplot; model=cf.mdl; n8=feutil('getnode NodeId 8',model); % triax pos. tdof={'lab','SensType','SensId','X','Y','Z','DirSpec';... 'sensor1 - trans','',1,0.0,0.5,2.5,'Z'; 'sensor2 - triax','',2,n8(:,5),n8(:,6),n8(:,7),'X'; 'sensor2 - triax','',3,n8(:,5),n8(:,6),n8(:,7),'Y'; 'sensor2 - triax','',4,n8(:,5),n8(:,6),n8(:,7),'Z'}; sens=fe_sens('tdoftable',tdof); cf.mdl=fe_case(cf.mdl,'SensDof','output',sens); cf.mdl=fe_case(cf.mdl,'SensMatch radius1'); fecom(cf,'curtab Cases','output'); % open sensor GUI
URN (uniform resource names) are being used more consistently throughout SDT and the effort also applies to sensors. nl_inout slab sensors are used for time domain observation (requires SDT-nlsim license) so consistent definitions will be gradually incorporated into SDT-base.
Sensors labels should be in the format BodyName:NodeName:DirSpec when nodes are associated with different bodies or lab:DirSpec. When using repeated superelements, BodyName should be of the form SeName(index).
model = femesh('testubeamt'); %model=fe_case(model,'DofSet','Base','RB{z==0}');%DofSet not FixDof to allow resultant model=fe_case(model,'FixDof','BaseF','z==0'); model=feutil('setmat 1 eta .02',model); % Define loss model=sdth.urn('nmap.Node.set',model,{'5:Base';'104:Corner'}); r1=struct('DOF',104.03,'def',1.1); % 1.1 N at node 365 direction z model=fe_case(model,'DofLoad','PointLoad',r1); model= stack_set(model,'info','Freq',70:80); try; % Possibly download solver with ofact('patchmkl'); model=stack_set(model,'info','oProp',mklserv_utils('oprop','CpxSym'));% change solver end model=fe_case(model,'sensDofInFEM','Out',{'Corner:z';'Base:Fz{Resultant,"","x==0"}'}); C1=fe_simul('DFRF -sens',model); [sys,TR]=fe2ss('free 5 10 0',model);C2=qbode(sys,C1.X{1}*2*pi,'-struct'); iicom('curveinit',{'curve','Dfrf',C1;'curve','SS',C2}) %def=fe_simul('DFRF -sens -UseDofLoad',model); % Reexpand partial DOF on full DOF dgiven=fe_def('subdof',TR,feutil('findnode z<.3',model)); mo1=fe_case(model,'DofSet','Enforced',dgiven,'remove','PointLoad'); d2=fe_simul('dfrf -matdes 1 3',stack_rm(mo1,'','Freq'));
Volume cuts are often relevant to display internal motion. These commands package calls to the underlying lsutil level set handling utilities.
model=demosdt('DemoUbeamSens NoPlot');cf=feplot(model,fe_eig(model,[5 20 1e3])) % Init phase ToFace(type,Lc,AngCosMin,epsl) % Cut phases using y= and x= planes cf.sel(1)='urn.SelLevelLines{Init{ToFace 1 .3 .9}}{y,.45 -.45,ByProId}{x,-.45 .0 .45,ByProId}'; feval(sdtm.feutil.MergeSel,'addTestNode',cf); % If you want to keep SensDof nodes and arrows cf.os_('FiCutPro') %fecom('SaveSel','@ProjectWd/selCutA.mat'); % Save selection for later reuse % Alternate format to initialize geodesic information in SelLevelLines % RI=struct('Elt','selface','ToFace',[1 .3 .9]);lsutil('EdgeSelLevelLines',cf,RI) %% Prepare for restricted superelement import, illustrated in d_cms('TutoAnsCb') moView=feval(sdtm.feutil.MergeSel,'Wire',cf.sel); % Read superelement %RO=struct('dtype','MoKTR', ... % Form with mesh, matrices K, restitution TR % 'RestrictTo',moView, ... % Restrict TR to view mesh % 'Remove','{pl,il}'); % Remove material information % SE=sdtm.nodeLoadSE(FileName,RO); % sdtm.save('FF_SEExport.mat','SE')
Cuts use nodes placed on edges, SDT thus uses two edge nodes of the original FEM per cut node. When generating a superelement export file, the convention is to
Using the feplot properties GUI, one can edit and visualize sensors. The following example loads ubeam model, defines some sensors and opens the sensor GUI.
model=demosdt('demo ubeam-pro'); cf=feplot; model=cf.mdl; model=fe_case(model,'SensDof append trans','output',... [1,0.0,0.5,2.5,0.0,0.0,1.0]); % add a translation sensor model=fe_case(model,'SensDof append triax','output',8); % add triax sensor model=fe_case(model,'SensDof append strain','output',... [4,0.0,0.5,2.5,0.0,0.0,1.0]); % add strain sensor model=fe_case(model,'sensmatch radius1','output'); % match sensor set 'output' sdth.urn('Tab(Cases,output){Proview,on}',cf)% open sensor GUI
Clicking on Edit Label one can edit the full list of sensor labels.
The whole sensor set can be visualized as arrows in the feplot figure clicking on the eye button on the top of the figure. Once visualization is activated one can activate the cursor on sensors by clicking on CursorSel. Then one can edit sensor properties by clicking on corresponding arrow in the feplot figure.
The icons in the GUI can be used to control the display of wire-frame, arrows and links.