image thumbnail
from Tubular Copper Conductor Design Verification by Saqer Ali Khalil
GUI to calculate the adequacy of the tubular copper conductor that links between the GIS & Transform

tcc(varargin)
function varargout = tcc(varargin)
% TCC M-file for tcc.fig
%      TCC, by itself, creates a new TCC or raises the existing
%      singleton*.
%
%      H = TCC returns the handle to a new TCC or the handle to
%      the existing singleton*.
%
%      TCC('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in TCC.M with the given input arguments.
%
%      TCC('Property','Value',...) creates a new TCC or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before tcc_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to tcc_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help tcc

% Last Modified by GUIDE v2.5 29-Jul-2007 15:16:29

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @tcc_OpeningFcn, ...
                   'gui_OutputFcn',  @tcc_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before tcc is made visible.
function tcc_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to tcc (see VARARGIN)

% Choose default command line output for tcc
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes tcc wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = tcc_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;



function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double


% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double


% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit3_Callback(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text
%        str2double(get(hObject,'String')) returns contents of edit3 as a double


% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit4_Callback(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text
%        str2double(get(hObject,'String')) returns contents of edit4 as a double


% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit5_Callback(hObject, eventdata, handles)
% hObject    handle to edit5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit5 as text
%        str2double(get(hObject,'String')) returns contents of edit5 as a double


% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit6_Callback(hObject, eventdata, handles)
% hObject    handle to edit6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit6 as text
%        str2double(get(hObject,'String')) returns contents of edit6 as a double


% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit7_Callback(hObject, eventdata, handles)
% hObject    handle to edit7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit7 as text
%        str2double(get(hObject,'String')) returns contents of edit7 as a double


% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit8_Callback(hObject, eventdata, handles)
% hObject    handle to edit8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit8 as text
%        str2double(get(hObject,'String')) returns contents of edit8 as a double


% --- Executes during object creation, after setting all properties.
function edit8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit9_Callback(hObject, eventdata, handles)
% hObject    handle to edit9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit9 as text
%        str2double(get(hObject,'String')) returns contents of edit9 as a double


% --- Executes during object creation, after setting all properties.
function edit9_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit10_Callback(hObject, eventdata, handles)
% hObject    handle to edit10 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit10 as text
%        str2double(get(hObject,'String')) returns contents of edit10 as a double


% --- Executes during object creation, after setting all properties.
function edit10_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit10 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit11_Callback(hObject, eventdata, handles)
% hObject    handle to edit11 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit11 as text
%        str2double(get(hObject,'String')) returns contents of edit11 as a double


% --- Executes during object creation, after setting all properties.
function edit11_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit11 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit12_Callback(hObject, eventdata, handles)
% hObject    handle to edit12 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit12 as text
%        str2double(get(hObject,'String')) returns contents of edit12 as a double


% --- Executes during object creation, after setting all properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit12 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit13_Callback(hObject, eventdata, handles)
% hObject    handle to edit13 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit13 as text
%        str2double(get(hObject,'String')) returns contents of edit13 as a double


% --- Executes during object creation, after setting all properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit13 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit14_Callback(hObject, eventdata, handles)
% hObject    handle to edit14 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit14 as text
%        str2double(get(hObject,'String')) returns contents of edit14 as a double


% --- Executes during object creation, after setting all properties.
function edit14_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit14 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit15_Callback(hObject, eventdata, handles)
% hObject    handle to edit15 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit15 as text
%        str2double(get(hObject,'String')) returns contents of edit15 as a double


% --- Executes during object creation, after setting all properties.
function edit15_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit15 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit16_Callback(hObject, eventdata, handles)
% hObject    handle to edit16 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit16 as text
%        str2double(get(hObject,'String')) returns contents of edit16 as a double


% --- Executes during object creation, after setting all properties.
function edit16_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit16 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


figure
imshow('ss2.bmp')
figure
imshow('ss1.jpg')


% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

format short
clc
disp('                    Tubular Copper Conductor Design Verification')
disp(' ')
disp('                                  Eng.Saqer Ali,,,')
disp(' ')
disp('                                       T.I.T')
disp(' ')
disp(' ')
disp(' ')
disp('PART 1:')
disp('-------')
disp('Cross Sectional Area of Used Tubular Copper Conductor')
disp('------------------------------------------------------')
disp(' ')
disp(' ')
disp('Outer Diameter (mm):')
disp('--------------------')
outer=findobj(tcc,'Tag','edit5');
get(outer,'String')
out=str2double(get(outer,'String'))/1000;
disp(' ')
disp('Inner Diameter (mm):')
disp('--------------------')
inner=findobj(tcc,'Tag','edit6');
get(inner,'String')
disp(' ')
disp('Thickness of Conductor (mm):')
disp('----------------------------')
(str2double(get(outer,'String'))-str2double(get(inner,'String')))/2
disp(' ')
disp('Cross Sectional Area of Conductor (mm2):')
disp('----------------------------------------')
syms Outer_Diameter Inner_Diameter
ans=pi*((Outer_Diameter/2)^2-(Inner_Diameter/2)^2);
pretty(ans)
ans=pi*(((str2double(get(outer,'String'))/2)^2-(str2double(get(inner,'String'))/2)^2))
cross=ans;
disp(' ')
disp(' ')
disp('Part 2:')
disp('-------')
disp('Minimum Required Cross Sectional Area of Tubular Copper Conductor Due to Short')
disp('Circuit Current (mm2):')
disp('-------------------------------------------------------------------------------')
syms Ik t
q=7*Ik*sqrt(t)
disp('Ik = RMS Symmetrical Fault Current (KA) .')
disp('t  = Time from Initiation to Clearing Fault (S) .')
disp('q  = Cross Sectional Area of Tubular Conductor (mm2) .')
disp(' ')
Ik=findobj(tcc,'Tag','edit2');
t=findobj(tcc,'Tag','edit3');
q=7*str2double(get(Ik,'String'))*str2double(get(t,'String'))
disp('**********************************************************************************')
if(ans>q)
    disp('Since the Cross Sectional Area of Chosen Tubular Conductor is BIGGER than the')
    disp('Minimum Required Cross Sectional Area , It is in safe ,,,')
else
    disp('Since the Cross Sectional Area of Chosen Tubular Conductor is SMALLER than the')
    disp('Minimum Required Cross Sectional Area , It is NOT Suitable ,,,')
end
disp('***********************************************************************************')
disp(' ')
disp(' ')
disp(' ')
disp('Part 3:')
disp('-------')
disp('Total Cantilever Load On a Vertically Mounted Bus Insulator FOR GIS')
disp('--------------------------------------------------------------------')
syms Kf Isc D
Fsc=(0.9*Kf*Isc^2)/(10^7*D);
disp('Fsc=')
pretty(Fsc)
disp(' ')
disp('Fsc = Electromagnetic Force Between the Conductors Through')
disp('which Short Circuit Current Flows (Kgf/m) ')
disp('Isc = Symmetrical RMS Short Circuit Current (A) .')
disp('D   = Conductor Spacing , Center to Center (m) .')
disp('Kf  = Mounting Structure Flexibility (Generally equal 1.0)')
disp(' ')
disp(' ')
disp('At GIS Bushings')
disp('---------------')
disp(' ')
Dgis=findobj(tcc,'Tag','edit7');
disp('Fsc (Kgf/m)=')
(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dgis,'String'))/1000*10^7)
disp(' ')
disp(' ')
disp(' ')
disp('Short Circuit Force Transmitted to GIS Bushings :')
disp('-------------------------------------------------')
disp(' ')
disp('Fsc(GIS)=le*Fsc')
disp(' ')
disp('Where le = Effictive Conductor Length/2 .')
disp(' ')
disp(' ')
disp('Fsc(GIS) (Kg)=')
cc=findobj(tcc,'Tag','edit4');
(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dgis,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000
disp(' ')
disp(' ')
disp('Cantilever Load At GIS :')
disp('-------------------------')
syms K2 HI HL Fsc_GIS
disp('Fis =')
Fis=(K2*(HI+HL)*Fsc_GIS)/HI;
pretty(Fis)
disp(' ')
disp('K2 = Overload Factor Applied To Short Circuit Force (Generally Equal 1) .')
disp('HI = Insulator Hight for the GIS Bushings (mm) .')
disp('HL = Bus Center Line Above Insulator (mm) .')
HI_GIS=findobj(tcc,'Tag','edit9');
HL_GIS=findobj(tcc,'Tag','edit15');
disp(' ')
disp(' ')
disp('Fis (Kg):')
((str2double(get(HI_GIS,'String'))+str2double(get(HL_GIS,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dgis,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_GIS,'String')))
disp(' ')
disp('Fis (KN):')
((str2double(get(HI_GIS,'String'))+str2double(get(HL_GIS,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dgis,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_GIS,'String')))*9.81/1000
disp(' ')
KN_GIS=findobj(tcc,'Tag','edit11');
 disp('****************************************************************************')
if(((str2double(get(HI_GIS,'String'))+str2double(get(HL_GIS,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dgis,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_GIS,'String')))*9.81/1000<str2double(get(KN_GIS,'String')))
    disp('The GIS Bushings is ADEQUATE to WithSatnd the Short Circuit Force,,')
else
    disp('The GIS Bushings is NOT ADEQUATE to WithSatnd the Short Circuit Force,,')
end
disp('******************************************************************************')
disp(' ')
disp(' ')
disp('Part 4:')
disp('--------')
disp('Total Cantilever Load On a Vertically Mounted Bus Insulator FOR T/F')
disp('--------------------------------------------------------------------')
syms Kf Isc D
Fsc=(0.9*Kf*Isc^2)/(10^7*D);
disp('Fsc=')
pretty(Fsc)
disp(' ')
disp('Fsc = Electromagnetic Force Between the Conductors Through which ')
disp('Short Circuit Current Flows (Kgf/m) .')
disp('Isc = Symmetrical RMS Short Circuit Current (A) .')
disp('D   = Conductor Spacing , Center to Center (m) .')
disp('Kf  = Mounting Structure Flexibility (Generally equal 1.0)')
disp(' ')
disp(' ')
disp('At T/F Bushings')
disp('----------------')
disp(' ')
Dtf=findobj(tcc,'Tag','edit8');
disp('Fsc (Kgf/m):')
(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dtf,'String'))/1000*10^7)
disp(' ')
disp(' ')
disp('Short Circuit Force Transmitted to T/F Bushings :')
disp('------------------- ------------------------------')
disp(' ')
disp('Fsc(T/F)=le*Fsc')
disp(' ')
disp('Where le = Efficitve Conductor Length/2 .')
disp(' ')
disp(' ')
disp('Fsc(T/F) (Kg)=')
cc=findobj(tcc,'Tag','edit4');
(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dtf,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000
disp(' ')
disp('Cantilever Load At T/F :')
disp('-------------------------')
syms K2 HI HL Fsc_GIS
disp('Fis =')
Fis=(K2*(HI+HL)*Fsc_GIS)/HI;
pretty(Fis)
disp(' ')
disp('K2 = Overload Factor Applied To Short Circuit Force (Generally Equal 1) .')
disp('HI = Insulator Hight for the GIS Bushings (mm) .')
disp('HL = Bus Center Line Above Insulator (mm) .')
HI_TF=findobj(tcc,'Tag','edit10');
HL_TF=findobj(tcc,'Tag','edit16');
disp(' ')
disp(' ')
disp('Fis (Kg):')
((str2double(get(HI_TF,'String'))+str2double(get(HL_TF,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dtf,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_TF,'String')))
disp(' ')
disp('Fis (KN):')
((str2double(get(HI_TF,'String'))+str2double(get(HL_TF,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dtf,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_TF,'String')))*9.81/1000
disp(' ')
KN_TF=findobj(tcc,'Tag','edit12');
disp('***********************************************************************************')
if(((str2double(get(HI_TF,'String'))+str2double(get(HL_TF,'String')))*(0.9*1*(str2double(get(Ik,'String'))*10^3)^2)/(str2double(get(Dtf,'String'))/1000*10^7)*str2double(get(cc,'String'))/2/1000)/(str2double(get(HI_TF,'String')))*9.81/1000<str2double(get(KN_TF,'String')))
    disp('The T/F Bushings is ADEQUATE to WithStand the Short Circuit Force,,')
else
    disp('The T/F Bushings is NOT ADEQUATE to WithStand the Short Circuit Force,,')
end
disp('************************************************************************************')
disp(' ')
disp(' ')
disp('Part 5:')
disp('-------')
disp('Calculation of Electrical Field Strength (Voltage Gradient) :')
disp('--------------------------------------------------------------')
disp(' ')
disp('  The corona effect on the conductor surface of tubular conductor is a partial')
disp('discharge in the air ; if the electrical field strength exceeds a critical value on the')
disp('conductor surface.   [The permissible limit is 16 to 19 KV/cm]')
disp(' ')
syms V B Rl h a
E=(V/sqrt(3))*(B/(Rl*log(a/Rl*2*h/sqrt(4*h^2+a^2))));
disp('E =')
pretty(E)
disp(' ')
disp(' ')
disp('E  = Surface Voltage Gradient (KV/cm)')
disp('V  = Rated Voltage (KV)')
disp('B  = Factor for Multiple Conductors , Equal 1 For Tube')
disp('Rl = Conductor Radius (cm)')
disp('a  = Phase Spacing (cm)')
disp('h  = Hight of conductor Above Ground Level (cm)')
disp(' ')
disp(' ')
voltage=findobj(tcc,'Tag','edit1');
hgis=findobj(tcc,'Tag','edit13');
htf=findobj(tcc,'Tag','edit14');
if(str2double(get(hgis,'String'))<str2double(get(htf,'String')))
    disp('  Since the hight of the GIS Bushings is LESS than the hight of the T/F Bushings')
    disp('i.e. more close to the ground level , it will be used,,,')
    disp(' ')
    disp('V(KV):')
    str2double(get(voltage,'String'))
    disp(' ')
    disp('Rl(cm):')
    (str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2
    disp(' ')
    disp('a(cm):')
    str2double(get(Dgis,'String'))/10
    disp(' ')
    disp('h(cm):')
    str2double(get(hgis,'String'))/10
    disp(' ')
    disp('So E(KV/cm):')
    t1=str2double(get(voltage,'String'))/sqrt(3);
    t2=sqrt(4*(str2double(get(hgis,'String'))/10)^2+(str2double(get(Dgis,'String'))/10)^2);
    t3=2*str2double(get(hgis,'String'))/10;
    t4=(str2double(get(Dgis,'String'))/10)/((str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2);
    t5=(str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2;
    t1/(t5*log(t4*t3/t2))
    temp=ans;
else
    disp('  Since the hight of the T/F Bushings is LESS than the hight of the GIS Bushings')
    disp('i.e. more close to the ground level , it will be used,,,')
    disp(' ')
    disp('V(KV):')
    str2double(get(voltage,'String'))
    disp(' ')
    disp('Rl(cm):')
    (str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2
    disp(' ')
    disp('a(cm):')
    str2double(get(Dtf,'String'))/10
    disp(' ')
    disp('h(cm):')
    str2double(get(htf,'String'))/10
    disp(' ')
    disp('So E(KV/cm):')
    t1=str2double(get(voltage,'String'))/sqrt(3);
    t2=sqrt(4*(str2double(get(htf,'String'))/10)^2+(str2double(get(Dtf,'String'))/10)^2);
    t3=2*str2double(get(htf,'String'))/10;
    t4=(str2double(get(Dtf,'String'))/10)/((str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2);
    t5=(str2double(get(outer,'String'))-str2double(get(inner,'String')))/2/2;
    t1/(t5*log(t4*t3/t2))
    temp=ans;
end
if(temp<19)
    disp(' ')
    disp(' ')
    disp('**************************************************************')
    disp('The Vlaue of the Voltage Gradient is ADEQUATE ,,,')
    disp('**************************************************************')
else
    disp(' ')
    disp(' ')
    disp('**************************************************************')
    disp('The Vlaue of the Voltage Gradient is NOT ADEQUATE ,,,')
    disp('**************************************************************')
end
disp(' ')
disp(' ')
disp('Part 6:')
disp('-------')
disp('Permissible Short Time Current Density:')
disp('---------------------------------------')
disp(' ')
disp('General Form of Adiabatic Temperature Rise Formula :')
syms I_Adiabatic K S B Ti Tf t
y=(K*S)/(sqrt(t))*sqrt((log((Tf+B)/(Ti+B))));
disp(' ')
disp('I_Adiabatic =')
pretty(y)
disp(' ')
disp('I_Adiabatic = Short Circuit Current Calculated In Adiabatic Basis (Amp)')
disp('t = Duration of Short Circuit (Sec.)')
disp('K = Constant Depending on the Material of Current Carrying Component')
disp('       [For Copper Tube K=226 (Amp*Sec^.5/mm2) ]')
disp('S = Cross Sectional Area of the Current Carrying Component (mm2)')
disp('Tf = Final Temperature (200 Centigrade)')
disp('Ti = Initial Temperature (90 Centigrade)')
disp('B = Reciprocal of Temperature Coefficient of Resistance of the Current')
disp('    Carrying Component [B=263.16 Centigrade]')
disp(' ')
disp(' ')
disp('  Inorder to Find the Permissible Short Time Current Density')
disp('Consider the Cross Sectional Area of the Conductor is Only 1mm2')
disp(' ')
t=findobj(tcc,'Tag','edit3');
disp('I (KA/mm2):')
((226*1)/(sqrt(str2double(get(t,'String'))))*sqrt(log((200+263.16)/(90+263.16))))/1000
tempp=ans;
disp(' ')
disp('Actual Short Time Current (KA):')
str2double(get(Ik,'String'))
disp('Cross Sectional Area of Used Conductor (mm2):')
ans=cross;
ans
disp('So , The Actual Short Time Current Density (KA/mm2):')
str2double(get(Ik,'String'))/cross
tempp1=ans;
if(tempp1<tempp)
    disp('****************************************************************')
    disp('Actual Short Time Current Density is LESS than the Permissible')
    disp('                    [In Safe]')
    disp('****************************************************************')
else
    disp('****************************************************************')
    disp('Actual Short Time Current Density is More than the Permissible')
    disp('                   [It is NOT Safe]')
    disp('****************************************************************')
end
disp(' ')
disp(' ')
disp('Part 7:')
disp('-------')
disp('Equivalent I^2*R Loss of Selected Tubular at 90 Centigrade Operating Temperature')
disp('---------------------------------------------------------------------------------')
disp(' ')
disp('Tubular Current Carrying Capacity (A):')
II=findobj(tcc,'Tag','edit17');
str2double(get(II,'String'))
disp('Resistivity (Ohm.mm2/m):')
res=findobj(tcc,'Tag','edit18');
str2double(get(res,'String'))
disp('The DC Resistnce at 20 Centigrade is :')
disp(' ')
disp('                             Ro=(Resistivity*Length)/Cross-Section /Area')
disp(' ')
disp('Ro(Micro-Ohm/m) in case of 1.m is :')
ans/cross*1e6
rr=ans;
disp(' ')
disp('Rm is the DC Resistance at Maximum Temperature ')
disp(' ')
disp('Rm =')
syms Ro Alpha20 Tm
y=Ro*(1+Alpha20*(Tm-20));
pretty(y)
disp(' ')
disp('Alpha20 = Constant Mass Temperature Coeffiecient(3.93*10^-3)')
disp(' ')
disp('Tm = Maximum Operating Temperature (Centigrade)')
te=findobj(tcc,'Tag','edit19');
str2double(get(te,'String'))
disp('Rm(Ohm/m) =')
rr*(1+0.00393*(ans-20))
r123=ans;
disp(' ')
disp('Rac is the AC Resistance of the Conductor at Maximum Temperature')
disp(' ')
disp('Rac =')
syms Rm m
y=Rm*((sqrt((1+m^2/48))+1)/2);
pretty(y)
disp(' ')
disp('                            For m = 0 to 3')
disp(' ')
disp('Where m= :')
syms f L
y=sqrt((8*pi*f*L*10^-9)/Rm);
pretty(y)
disp('f(Hz) :')
ff=findobj(tcc,'Tag','edit20');
str2double(get(ff,'String'))
disp(' ')
disp('So ,For L=1m ; m equal to:')
sqrt((8*pi*ans*10^-9)/(r123*10^-6))
r321=ans;
disp('Also , Rac(Micro-Ohm/m) :')
r123*(((sqrt(1+r321^2/48))+1)/2)
rac=ans;
disp(' ')
disp('According to the Above Calculations , I^2*R (W/m) is :')
ans*(str2double(get(II,'String')))^2*(10^-6)
ir=ans;
disp(' ')
disp(' ')
disp('Part 8:')
disp('-------')
disp('Heat Loss By Radiation & Convection')
disp('------------------------------------')
disp(' ')
syms TL d Fk Alpha_k Alpha_s Fs K Vm Vo dV Vu K1 K2 Eps Rho
disp('The Thermal Resistance of Air is (TL):')
y=1/(pi*d*(Fk*Alpha_k+Fs*Alpha_s));
pretty(y)
disp(' ')
disp('Alpha_k =')
y=(K1*0.0185)/(K*d)+K2*1.08*(dV/(K*d))^(1/4);
pretty(y)
disp(' ')
disp('Alpha_s =')
y=(Eps*Rho*((273+Vo)^4-(273+Vu)^4))/dV;
pretty(y)
disp(' ')
disp('K1 =')
y=0.919+Vm/369;
pretty(y)
disp(' ')
disp('K2 =')
y=1.033-Vm/909;
pretty(y)
disp(' ')
disp('Vm =')
y=(Vo+Vu)/2;
pretty(y)
disp(' ')
disp('dV =')
y=Vo-Vu;
pretty(y)
disp(' ')
disp('Alpha_k = Heat Transfer Coeffecient for Convection (W/m2 K)')
disp('Alpha_s = Heat Transfer Coeffecient for Radiation (W/m2 K)')
disp('Rho = 5.67*10^-8 (W/m2 K^4)')
disp('Eps = The Emissivity of the Conductor Surface (0.95)')
disp('K1 , K2 , K = Factors for Mean Temperature Account')
disp('Fs = Fk = 1 , Auxiliary Values for the Selected Conductor Arrangement')
disp('d = Outer Diameter of the Tube')
disp('Vo = Conductor Operation Temperature')
disp('Vu = Ambient Air Temperature')
disp('dV = Temperature Difference')
disp('Vm = Average Temperature')
disp(' ')
disp(' ')
disp('Vo :')
str2double(get(te,'String'))
vo=ans;
disp('Vu :')
tu=findobj(tcc,'Tag','edit21');
str2double(get(tu,'String'))
vu=ans;
disp('dV :')
str2double(get(te,'String'))-vu
dv=ans;
disp('Vm :')
(str2double(get(te,'String'))+vu)/2
vm=ans;
disp('K1 :')
0.919+vm/369
k1=ans;
disp('K2 :')
1.033-vm/909
k2=ans;
disp('Alpha_k :')
(k1*0.0185)/(1*out)+k2*1.08*(dv/out)^(1/4)
ak=ans;
disp('Alpha_s :')
(.95*5.67*10^-8*((273+vo)^4-(273+vu)^4))/dv
as=ans;
disp('Thermal Air Resistance (TL , Km/W) :')
1/((pi*0.05)*(ak+as))
tl=ans;
disp(' ')
disp('Heat Flow is :')
disp('                    Q=dV/TL')
disp(' ')
disp('Q (W/m) :')
dv/tl
q=ans;
disp(' ')
disp('**********************************************************************')
if(q<ir)
    disp('Since The Heat Losses By Convection & Radiation is LESS than the ')
    disp('Generated Heat Due to Ohmic losses in the Conductors , The Temperature ')
    disp('of Conductors Will Exceed the Maximum Allowable Temperature ,,,')
else
    disp('Since The Heat Losses By Convection & Radiation is BIGGER than the')
    disp('Generated Heat Due to Ohmic losses in the Conductors , The Temperature ')
    disp('of Conductors Will NOT Exceed the Maximum Allowable Temperature ,,,')
end
disp('***********************************************************************')
disp(' ')
disp(' ')
disp('Part 9:')
disp('-------')
disp('Equivalent Voltage Drop Due to Tube Resistance')
disp('----------------------------------------------')
disp(' ')
disp(' At The Rated Current of the Tube & the Maximum Allowable Temperature')
disp('The Voltage Drop Can Be Found According to the Following Realtions :')
disp(' ')
syms I Z Rac Xl L D r
disp('Voltage Drop (V/m) is Equal To :')
y=I*Z;
pretty(y)
disp(' ')
disp('Where Z (Ohm/m) is :')
y=sqrt(Rac^2+Xl^2);
pretty(y)
disp(' ')
disp('Xl (Ohm/m) is :')
y=2*pi*f*L;
pretty(y)
disp(' ')
disp('L (H/m) is :')
y=(2*log(D/r)+.5)*10^-7;
pretty(y)
disp(' ')
disp('Where :')
disp('D = Spacing Between Conductors (m) .')
disp('r = Radius of Conductor (m) .')
disp(' ')
d=findobj(tcc,'Tag','edit7');
d1=str2double(get(d,'String'))/1000;
d=findobj(tcc,'Tag','edit8');
d2=str2double(get(d,'String'))/1000;
r=(str2double(get(outer,'String'))-str2double(get(inner,'String')))/4/1000;
if(d1>d2)
    disp('L (H/m) :')
    (2*log(d1/r)+.5)*10^-7
    L=ans;
    disp(' ')
    disp('Xl (Ohm/m) :')
    2*pi*str2double(get(ff,'String'))*L
    Xl=ans;
    disp(' ')
    disp('Z (Ohm/m) :')
    sqrt((rac*10^-6)^2+Xl^2)
    disp(' ')
    disp('Voltage Drop (V/m) :')
    sqrt((10^-6*rac)^2+Xl^2)*str2double(get(II,'String'))
else
    disp('L (H/m) :')
    (2*log(d2/r)+.5)*10^-7
    L=ans;
    disp(' ')
    disp('Xl (Ohm/m) :')
    2*pi*str2double(get(ff,'String'))*L
    Xl=ans;
    disp(' ')
    disp('Z (Micro-Ohm/m) :')
    sqrt((10^-6*rac)^2+Xl^2)
    disp(' ')
    disp('Voltage Drop (V/m) :')
    sqrt((10^-6*rac)^2+Xl^2)*10^-6*str2double(get(II,'String'))
end
    
    
    
    
    
% --- Executes on button press in pushbutton3.

function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

close tcc 

function edit17_Callback(hObject, eventdata, handles)
% hObject    handle to edit17 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit17 as text
%        str2double(get(hObject,'String')) returns contents of edit17 as a double


% --- Executes during object creation, after setting all properties.
function edit17_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit17 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit18_Callback(hObject, eventdata, handles)
% hObject    handle to edit18 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit18 as text
%        str2double(get(hObject,'String')) returns contents of edit18 as a double


% --- Executes during object creation, after setting all properties.
function edit18_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit18 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end





function edit19_Callback(hObject, eventdata, handles)
% hObject    handle to edit19 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit19 as text
%        str2double(get(hObject,'String')) returns contents of edit19 as a double


% --- Executes during object creation, after setting all properties.
function edit19_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit19 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end





function edit20_Callback(hObject, eventdata, handles)
% hObject    handle to edit20 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit20 as text
%        str2double(get(hObject,'String')) returns contents of edit20 as a double


% --- Executes during object creation, after setting all properties.
function edit20_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit20 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end





function edit21_Callback(hObject, eventdata, handles)
% hObject    handle to edit21 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit21 as text
%        str2double(get(hObject,'String')) returns contents of edit21 as a double


% --- Executes during object creation, after setting all properties.
function edit21_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit21 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


Contact us at files@mathworks.com