## ohukeU.m
function secU=ohukeU(b,h,tf,tw)
# 
# Restrained Wraping, e - shear centre, It - torsion constant, Iw - wraping constant

# e  - lõikekesme kaugus keskjoonest
# It - väändeinertsimoment
# Iw - sektorinertsimoment
# tw - karpprofiili seina paksus
# tf - sümmeetrilise karpprofiili ülemise ja alumise vöö paksus
##=========================================================================
## This Program is written by Andres Lahe,   2010-03-22
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,   2010-06-21
## Copyright (c)  2010 by Tallinn University of Technology 
##                Department of Mechanics
##                http://www.ttu.ee/
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
##==========
##
#%%%%%%%%%%%%%%%%%
if nargin<4, 
error(' function InsertBtoA have wrong number of input arguments!') 
end
if nargin>4, 
error(' function InsertBtoA have wrong number of input arguments!') 
end
#
##octave:1> ohukeU(8,22.8,1.2,0.9)
##b =  8, h = 22.8, tf = 1.2, tw = 0.9 
#
 e = (3*b^2*tf)/(6*b*tf + h*tw);
It = (2*b*tf^3 + h*tw^3)/3 ; 
Iw = ((tf*b^3*h^2)/12)*((3*b*tf + 2*h*tw)/(6*b*tf + h*tw));
secU(1,1)=e;
secU(1,2)=It;
secU(1,3)=Iw;
#
U3='       e      |       It   |     Iw        ';

disp('=========================================')
disp(U3)
disp('-----------------------------------------')
#

endfunction
