Sunday, 13 March 2016

4 major principles of Object-Oriented Programming


For you new programmers or programmers new to OOP, this
article will briefly explain the 4 major principles that make a
language object-oriented: Encapsulation, Data Abstraction,
Polymorphism and Inheritence. All examples will be in VB.Net,
because in my opinion its easier for a new OOP programmer to read and
understand at first. Certainly don’t think I’m saying you should use
one .Net based language over another, as they all are based on the
CLR/CLS and all end up as the same assembly language when compiled. Its
your preference that determines what language you use.  Of course,
there are other OOP languages out there, such as Ruby, a pure OOP
language, and hybrid languages such as Python, C++ and Java to mention
a few.

Encapsulation
What is encapsulation? Well, in a nutshell, encapsulation is the
hiding of data implementation by restricting access to accessors and
mutators. First, lets define accessors and mutators:

Accessor

An accessor is a method that is used to ask an object about itself. In
OOP, these are usually in the form of properties, which have, under
normal conditions, a get method, which is an accessor method.
However, accessor methods are not restricted to properties and can be
any public method that gives information about the state of the object.
Public Class Person
    ‘ We use Private here to hide the implementation of the objects 
    ‘ fullName, which is used for the internal implementation of Person.
    Private _fullName As String = “Raymond Lewallen”

    ‘ This property acts as an accessor.  To the caller, it hides the  
    ‘ implementation of fullName and where it is set and what is  
    ‘ setting its value. It only returns the fullname state of the  
    ‘ Person object, and nothing more. From another class, calling  
    ‘ Person.FullName() will return “Raymond Lewallen”.
    ‘ There are other things, such as we need to instantiate the 
    ‘ Person class first, but thats a different discussion.
    Public ReadOnly Property FullName() As String
        Get
            Return _fullName
        End Get
    End Property

End Class
Mutator Mutators are public methods that are used to modify
the state of an object, while hiding the implementation of exactly how
the data gets modified. Mutators are commonly another portion of the
property discussed above, except this time its the set method that lets the caller modify the member data behind the scenes.
Public Class Person
    ‘ We use Private here to hide the implementation of the objects  
    ‘ fullName, which is used for the internal implementation of Person.
    Private _fullName As String = “Raymond Lewallen”

    ‘ This property now acts as an accessor and mutator.  We still  
    ‘ have hidden the implementation of fullName.
    Public Property FullName() As String
        Get
            Return FullName
        End Get
        Set(ByVal value As String)
            _fullName = value
        End Set
    End Property

End Class
Ok, now lets look at a different example that contains an accessor and a mutator:
Public Class Person
    Private _fullName As String = “Raymond Lewallen”

    ‘ Here is another example of an accessor method,  
    ‘ except this time we use a function.
    Public Function GetFullName() As String
        Return _fullName
    End Function

    ‘ Here is another example of a mutator method,  
    ‘ except this time we use a subroutine.
    Public Sub SetFullName(ByVal newName As String)
        _fullName = newName
    End Sub

End Class
So, the use of mutators and accessors provides many advantages. By
hiding the implementation of our Person class, we can make changes to
the Person class without the worry that we are going to break other
code that is using and calling the Person class for information. If we
wanted, we could change the fullName from a String to an array of
single characters (FYI, this is what a string object actually is behind
the scenes) but they callers would never have to know because we would
still return them a single FullName string, but behind the scenes we
are dealing with a character array instead of a string object. Its
transparent to the rest of the program. This type of data protection
and implementation protection is called Encapsulation. Think of accessors and mutators as the pieces that surround the data that forms the class.
Abstraction
Data abstraction is the simplest of principles to understand. Data
abstraction and encapuslation are closely tied together, because a
simple definition of data abstraction is the development of classes,
objects, types in terms of their interfaces and functionality, instead
of their implementation details. Abstraction denotes a model, a view,
or some other focused representation for an actual item. Its the
development of a software object to represent an object we can find in
the real world. Encapsulation hides the details of that implementation.
Abstraction
is used to manage complexity. Software developers use abstraction to
decompose complex systems into smaller components. As development
progresss, programmers know the functionality they can expect from as
yet undeveloped subsystems. Thus, programmers are not burdened by
considering the waysin which the implementation of later subsystesm
will affect the design of earlier development.
The best
definition of abstraction I’ve ever read is: “An abstraction denotes
the essential characteristics of an object that distinguish it from all
other kinds of object and thus provide crisply defined conceptual
boundaries, relative to the perspective of the viewer.” — G. Booch,
Object-Oriented Design With Applications, Benjamin/Cummings, Menlo
Park, California, 1991.
Lets look at this code for a person
object. What are some things that a person can do? Those things must be
represented here in our software model of a person. Things such as how
tall the person is, and the age of the person; we need to be able to
see those. We need the ability for the person to do things, such as
run. We need to be able to ask the person if they can read.
Public Class Person

    Private _height As Int16
    Public Property Height() As Int16
        Get
            Return _height
        End Get
        Set(ByVal Value As Int16)
            _height = Value
        End Set
    End Property

    Private _weight As Int16
    Public Property Weight() As Int16
        Get
            Return _weight
        End Get
        Set(ByVal Value As Int16)
            _weight = Value
        End Set
    End Property

    Private _age As Int16
    Public Property Age() As Int16
        Get
            Return _age
        End Get
        Set(ByVal Value As Int16)
            _age = Value
        End Set
    End Property

    Public Sub Sit()
        ‘ Code that makes the person sit
    End Sub

    Public Sub Run()
        ‘ Code that makes the person run
    End Sub

    Public Sub Cry()
        ‘ Code that make the person cry
    End Sub

    Public Function CanRead() As Boolean
        ‘ Code that determines if the person can read
        ‘ and returns a true or false
    End Function

End Class
So, there we have started to create a software model of a person
object; we have created an abstract type of what a person object is to
us outside of the software world. The abstract person is defined by the
operations that can be performed on it, and the information we can get
from it and give to it. What does the abstracted person object look
like to the software world that doesn’t have access to its inner
workings? It looks like this:

You can’t really see what the code is that makes the person run. This is encapsulation that we discuseed.
So,
in short, data abstraction is nothing more than the implementation of
an object that contains the same essential properties and actions we
can find in the original object we are representing.
Inheritance
Now lets discuss inheritance.  Objects can relate to eachother
with either a “has a”, “uses a” or an “is a” relationship.  “Is a”
is the inheritance way of object relationship.  The example of
this that has always stuck with me over the years is a library (I think
I may have read it in something Grady Booch wrote).  So, take a
library, for example.  A library lends more than just books, it
also lends magazines, audiocassettes and microfilm.  On some
level, all of these items can be treated the same: All four types
represent assets of the library that can be loaned out to people.
However, even though the 4 types can be viewed as the same, they are
not identical.  A book has an ISBN and a magazine does not.
And audiocassette has a play length and microfilm cannot be checked out
overnight.
Each of these library’s assets should be represented by its own
class definition.  Without inheritance though, each class must
independently implement the characteristics that are common to all
loanable assets.  All assets are either checked out or available
for checkout.  All assets have a title, a date of acquisition and
a replacement cost.  Rather than duplicate functionality,
inheritance allows you to inherit functionality from another class,
called a superclass or base class.
Let us look at loanable assets base class.  This will be used
as the base for assets classes such as book and audiocassette:
Public Class LibraryAsset

    Private _title As String
    Public Property Title() As String
        Get
            Return _title
        End Get
        Set(ByVal Value As String)
            _title = Value
        End Set
    End Property

    Private _checkedOut As Boolean
    Public Property CheckedOut() As Boolean
        Get
            Return _checkedOut
        End Get
        Set(ByVal Value As Boolean)
            _checkedOut = Value
        End Set
    End Property

    Private _dateOfAcquisition As DateTime
    Public Property DateOfAcquisition() As DateTime
        Get
            Return _dateOfAcquisition
        End Get
        Set(ByVal Value As DateTime)
            _dateOfAcquisition = Value
        End Set
    End Property

    Private _replacementCost As Double
    Public Property ReplacementCost() As Double
        Get
            Return _replacementCost
        End Get
        Set(ByVal Value As Double)
            _replacementCost = Value
        End Set
    End Property

End Class
This LibraryAsset is a superclass, or base class, that maintains
only the data and methods that are common to all loanable assets.
Book, magazine, audiocassette and microfilm will all be subclasses or derived classes
or the LibraryAsset class, and so they inherit these
characteristics.  The inheritance relationship is called the “is
a” relationship.  A book “is a” LibraryAsset, as are the other 3
assets.
Let’s look at book and audiocassette classes that inherit from out LibraryAsset class:
Public Class Book
    Inherits LibraryAsset

    Private _author As String
    Public Property Author() As String
        Get
            Return _author
        End Get
        Set(ByVal Value As String)
            _author = Value
        End Set
    End Property

    Private _isbn As String
    Public Property Isbn() As String
        Get
            Return _isbn
        End Get
        Set(ByVal Value As String)
            _isbn = Value
        End Set
    End Property

End Class

Public Class AudioCassette
    Inherits LibraryAsset

    Private _playLength As Int16
    Public Property PlayLength() As Int16
        Get
            Return _playLength
        End Get
        Set(ByVal Value As Int16)
            _playLength = Value
        End Set
    End Property

End Class
Now, lets create an instance of the book class so we can record a new book into the library inventory:
Dim myBook As Book = New Book
 myBook.Author = “Sahil Malik”
 myBook.CheckedOut = False
 myBook.DateOfAcquisition = #2/15/2005#
 myBook.Isbn = “0-316-63945-8″
 myBook.ReplacementCost = 59.99
 myBook.Title = “The Best Ado.Net Book You’ll Ever Buy”
You see, when we create a new book, we have all the properties of
the LibraryAsset class available to us as well, because we inherited
the class.  Methods can be inherited as well.  Let’s add a
few methods to our LibraryAsset class:
Public Class LibraryAsset

    ‘ Pretend the properties listed above are right here

    Public Sub CheckOut()
        If Not _checkedOut Then _checkedOut = True
    End Sub

    Public Sub CheckIn()
        If _checkedOut Then _checkedOut = False
    End Sub

End Class
Now, our “myBook” we created above automatically inherited these
methods, and we didn’t even have to touch the Book class in order for
it to happen.  The book and audiocassette classes above
automatically inherited the abilities to be checked out and checked
in.  In our “myBook” above, now we can check the book out by
calling “myBook.CheckOut()”.  Simple!  One of the most
powerful features of inheritance is the ability to extend components
without any knowledge of the way in which a class was implemented.
Declaration options, such as Public and Private, dictate which
members of a superclass can be inherited.  For more information on
this, see the Declaration Option section of Eric’s post.
Polymorphism
Polymorphism means one name, many forms.  Polymorphism
manifests itself by having multiple methods all with the same name, but
slighty different functionality.  Many VB6ers are familiar
with interface polymorphism.  I’m only going to discuss
polymorphism from the point of view of inheritance because this is the
part that is new to many people.  Because of this, it can be
difficult to fully grasp the full potential of polymorphism until you
get some practice with it and see exactly what happens under different
scenarios.  We’re only going to talk about polymorphism, like
the other topics, at the basic level.
There are 2 basic types of polymorphism.  Overridding, also
called run-time polymorphism, and overloading, which is referred to as
compile-time polymorphism.  This difference is, for method
overloading, the compiler determines which method will be
executed, and this decision is made when the code gets compiled.
Which method will be used for method overriding is determined at
runtime based on the dynamic type of an object.
Let’s look at some code:
‘ Base class for library assets
Public MustInherit Class LibraryAsset

    ‘ Default fine per day for overdue items
    Private Const _finePerDay As Double = 1.25

    ‘ Due date for an item that has been checked out
    Private _dueDate As DateTime
    Public Property DueDate() As DateTime
        Get
            Return _dueDate
        End Get
        Set(ByVal Value As DateTime)
            _dueDate = Value
        End Set
    End Property

    ‘ Calculates the default fine amount for an overdue item
    Public Overridable Function CalculateFineTotal() As Double
        Dim daysOverdue As Int32 = CalculateDaysOverdue()
        If daysOverdue > 0 Then
            Return daysOverdue * _finePerDay
        Else
            Return 0.0
        End If
    End Function

    ‘ Calculates how many days overdue for an item being returned
    Protected Function CalculateDaysOverdue() As Int32
        Return DateDiff(DateInterval.Day, _dueDate, DateTime.Now())
    End Function

End Class

‘ Magazine class that inherits LibraryAsset
Public NotInheritable Class Magazine
    Inherits LibraryAsset

End Class

‘ Book class that inherits LibraryAsset
Public NotInheritable Class Book
    Inherits LibraryAsset

    ‘ This is morphing the CalculateFineTotal() function of the base class.
    ‘ This function overrides the base class function, and any call
       to CalculateFineTotal from any instantiated Book class will
       use this function, not the base class function.
    ‘ This type of polymorphism is called overriding.
    Public Overrides Function CalculateFineTotal() As Double
        Dim daysOverdue As Int32 = CalculateDaysOverdue()
        If daysOverdue > 0 Then
            Return daysOverdue * 0.75
        Else
            Return 0.0
        End If
    End Function

End Class

‘ AudioCassette class that inherits LibraryAsset
Public NotInheritable Class AudioCassette
    Inherits LibraryAsset

    ‘ This is morphing the CalculateFineTotal() function of the base class.
    ‘ This is morphing the CalculateFineTotal(double) function of the
       audiocassette class.
    ‘ This function overrides the base class function, and any call
       to CalculateFineTotal() from any instantiated AudioCassette
       Class will use this function, not the base class function.
    ‘ This type of polymorphism is called overloading and overriding.
    Public Overloads Overrides Function CalculateFineTotal() As Double
        Dim daysOverdue As Int32 = CalculateDaysOverdue()
        If daysOverdue > 0 Then
            Return daysOverdue * 0.25
        Else
            Return 0.0
        End If
    End Function

    ‘ This is morphing the CalculateFineTotal() function of the
       audiocassette class.
    ‘ This type of polymorphism is called overloading.
    Public Overloads Function CalculateFineTotal(ByVal finePerDay As Double) As Double
        Dim daysOverdue As Int32 = CalculateDaysOverdue()
        If daysOverdue > 0 AndAlso finePerDay > 0.0 Then
            Return daysOverdue * finePerDay
        Else
            Return 0.0
        End If
    End Function
End Class

You see our library asset class.  Pay attention to the
overridable function CalculateFineTotal().  In LibraryAsset, we
have defined the default functionality for this method that any derived
classes can use.  Any class derived from LibraryAsset can use this
default behavior and calculate fines based on the default
implementation of $1.25 per day late.  This is true for our
Magazine class.  We didn’t override the function so when late fees
are calculated for late magazine returns, it will use the default
implementation.
Now look at the book class.  We have overridden the
CalculateFineTotal to use a different value when determining late
fees.  The overrides keywork in VB tells the caller that any
method call will use the virtual method found in Book, not the default
implementation found in LibraryAsset.  We have implemented runtime
polymorphism – method overriding.
Lets move on to AudioCassette.  Here we have the same method
overriding we found in the book class.  Fines are calculated based
on $0.25 per day.  Notice we’ve added something extra.  We’ve
added the Overloads keywork to our function and to a new function with
the same name, except the new function now accepts a parameter.
Now the caller can call either method, and depending on whether or not
a parameter is passed, that determines with method will be
executed.  Notice we do not include the overrides keywork in the
2nd function with a parameter.  This is because not method exists
in LibraryAsset with that same signature (accepting a parameter of type
double).  You can only override methods with the same signature in
a base class.
Now lets look at some code that creates all these library items and
checks them in and cacluates our fines based on returning them 3 days
late:
Public Class Demo

    Public Sub Go()
        ‘ Set the due date to be three days ago
        Dim dueDate As DateTime = DateAdd(DateInterval.Day, -3, Now())
        ReturnMagazine(dueDate)
        ReturnBook(dueDate)
        ReturnAudioCassette(dueDate)
    End Sub

    Public Sub ReturnMagazine(ByVal dueDate As DateTime)
        Dim myMagazine As LibraryAsset = New Magazine
        myMagazine.DueDate = dueDate
        Dim amountDue As Double = myMagazine.CalculateFineTotal()
        Console.WriteLine(“Magazine: {0}”, amountDue.ToString())
    End Sub

    Public Sub ReturnBook(ByVal dueDate As DateTime)
        Dim myBook As LibraryAsset = New Book
        myBook.DueDate = dueDate
        Dim amountDue As Double = myBook.CalculateFineTotal()
        Console.WriteLine(“Book: {0}”, amountDue.ToString())
    End Sub

    Public Sub ReturnAudioCassette(ByVal dueDate As DateTime)
        Dim myAudioCassette As AudioCassette = New AudioCassette
        myAudioCassette.DueDate = dueDate
        Dim amountDue As Double
        amountDue = myAudioCassette.CalculateFineTotal()
        Console.WriteLine(“AudioCassette1: {0}”, amountDue.ToString())
        amountDue = myAudioCassette.CalculateFineTotal(3.0)
        Console.WriteLine(“AudioCassette2: {0}”, amountDue.ToString())
    End Sub

End Class
The output will look like the following:
Magazine: 3.75
Book: 2.25
AudioCassette1: 0.75
AudioCassette2: 9
You can see how all of our output was different, based on the method
that was executed.  We created a new Magazine, which is a type of
LibraryAsset.  That is why the instantiation says “myMagazine As
LibraryAsset”.  However, since we actually want a magazine, we
create a “New Magazine”.  Same thing with book.  For Book,
its a little bit more tricky.  Since we created a Book of the type
LibraryAsset, this is where the polymorphism comes into play.
Book overrides the CalculateFineTotal of LibraryAsset.
Audiocassette is a little bit different.  It actually extends the
implementation of LibraryAsset by including an overloaded function for
CalculateFineTotal().  If we weren’t going to use the function
that took a parameter, we would create it the same way we created the
Book and Magazine classes.  But in order to use the overloaded
function, we have to create a new AudioCassette of the type
AudioCassette, because LibraryAsset doesn’t support the overloaded
function.
Only the Magazine used the default method found in the base
class.  Book and AudioCassette used their own implementations of
the method.  Also, at compile time, the decision was made which
method would be used when we calculate amountDue for the AudioCassette
class.  The first call used the 1st method in AudioCassette
without parameters.  The 2nd call used the 2nd method with a
parameter

Monday, 22 February 2016

Steel-vs-concrete and timber


  1. 1. 1 ADVANTAGES AND DISADVANTAGES OF STEEL AS A STRUCTURALDESIGN MATERIAL The following advantages in general may be credited to steel as a structural design material: 1. High strength/weight ratio. Steel has a high strength/weight ratio. Thus, the dead weight of steel structures is relatively small. This property makes steel a very attractive structural material for a. High-rise buildings b. Long-span bridges c. Structures located on soft ground d. Structures located in highly seismic areas where forces acting on the structure due to an earthquake are in general proportional to the weight of the structure. 2. Ductility. As discussed in the previous section, steel can undergo large plastic deformation before failure, thus providing large reserve strength. This property is referred to as ductility. Properly designed steel structures can have high ductility, which is an important characteristic for resisting shock loading such as blasts or earthquakes. A ductile structure has energy- absorbing capacity and will not incur sudden failure. It usually shows large visible deflections before failure or collapse. 3. Predictable material properties. Properties of steel can be predicted with a high degree of certainty. Steel in fact shows elastic behavior up to a relatively high and usually well-defined stress level. Also, in contrast to reinforced concrete, steel properties do not change considerably with time. 4. Speed of erection. Steel structures can be erected quite rapidly. This normally results in quicker economic payoff. 5. Quality of construction. Steel structures can be built with high-quality workmanship and narrow tolerances. 6. Ease of repair. Steel structures in general can be repaired quickly and easily. 7. Adaptation of prefabrication. Steel is highly suitable for prefabrication and mass production. 8. Repetitive use. Steel can be reused after a structure is disassembled. 9. Expanding existing structures. Steel buildings can be easily expanded by adding new bays or wings. Steel bridges may be widened. 10. Fatigue strength. Steel structures have relatively good fatigue strength.
  2. 2. 2 DISADVANTAGESOF STEEL 1. General cost. Steel structures may be more costly than other types of structures. 2. Fireproofing. The strength of steel is reduced substantially when heated at temperatures commonly observed in building fires. Also, steel conducts and transmits heat from a burning portion of the building quite fast. Consequently, steel frames in buildings must have adequate fireproofing. 3. Maintenance. Steel structures exposed to air and water, such as bridges, are susceptible to corrosion and should be painted regularly. Application of weathering and corrosion-resistant steels may eliminate this problem. 4. Susceptibility to buckling. Due to high strength/weight ratio, steel compression members are in general more slender and consequently more susceptible to buckling than, say, reinforced concrete compression members. As a result, considerable materials may have to be used just to improve the buckling resistance of slender steel compression members. Advantages of Reinforced Concrete 1) Reinforced concrete has a high compressive strength compared to other building materials. 2) Due to the provided reinforcement, reinforced concrete can also withstand a good amount tensile stress. 3) Fire and weather resistance of reinforced concrete is fair. 4) The reinforced concrete building system is more durable than any other building system. 5) Reinforced concrete,as a fluid material in the beginning, can be economically molded into a nearly limitless range of shapes. 6) The maintenance cost of reinforced concrete is very low. 7) In structure like footings, dams, piers etc. reinforced concrete is the most economical construction material. 8) It acts like a rigid member with minimum deflection. 9) As reinforced concrete can be molded to any shape required, it is widely used in precast structural components. It yields rigid members with minimum apparent deflection. 10) Compared to the use of steelin structure, reinforced concrete requires less skilled labor for the erection of structure. Disadvantages of Reinforced Concrete 1. The tensile strength of reinforced concrete is about one-tenth of its compressive strength. 2. The main steps of using reinforced concrete are mixing, casting, and curing. All of this affects the final strength. 3. The cost of the forms used for casting RC is relatively higher. 4. For multistoried building the rcc column section for is larger than steel section as the compressive strength is lower in the case of RCC. 5. Shrinkage causes crack development and strength loss.
  3. 3. 3 Advantages and disadvantages of Timber structures: INTRODUCTION Wood is an organic, hygroscopic and anisotropic material. Its thermal, acoustic, electrical, mechanical, aesthetic, working, etc. properties are very suitable to use it is possible to build a comfortable house using only wooden products. With other materials, it is almost impossible. But wood has some disadvantages too. Following is some very short information about this subject. Thermal Properties: Wood does not practically expand against heat. On the contrary, by the effect of heat, it dries out and gains strength. The only time wood expands a little is when the humidity level is below 0%, and this is only scientifically significant. In practice, the humidity level of wood does not drop under 5% even in the driest climate. The coefficient of thermal conductivity of the wood is very low. Specific heat of wood is high. Wood is 400 times better as a thermal insulator than steel and 14 times better than concrete. In solid form, wood also has significant thermal mass properties, retaining heat from the day and releasing it at night. Wood also acts as a humidity regulator, absorbing moisture when humid and desorbing moisture when the air is dry. Acoustic Properties: Sound isolation is based on the mass of the surface. Wood, as a light material, is not very perfect for sound isolation; but it is ideal for sound absorption. Wood prevents echo and noise by absorbing sound. For this reason it is extensively used in concert halls. Electrical Properties: Resistance to electrical current of a completely dry wood is equal to that of phenol formaldehyde. An oven dried wood is a very good electrical insulator. To some extent air dried wood is the same. Unfortunately electrical resistance of wood is lowered by increasing the moisture content. The resistance of wood saturated with water. Static electricity that is dangerous for human health is not observed in wood unlike metal, plastic and other materials. For this reason wood is preferred as a healthy material. Mechanical Properties: Although wood is a light material, its strength is quite high. For instance, while the tensile strength of wood with 0.6/cm3 specific gravity is 100 N/mm2, the tensile strength of steel with 7.89/cm3 specific gravity is 500 N/mm2. Dividing tensile strength by specific gravity gives the breaking length and quality of material. This figure means the breaking length of the material, when hung as a result of its own weight. While the breaking length of steel is used for construction is 5.4 km, chrome mobile steel is 6.8 km, hardened bow steel is 17.5 km, breaking
  4. 4. 4 length of spruce wood is 19.8 km, and laminated wood made of beech is 28.3 km. For this kind of properties, wood and laminated wood is used in wide-gap constructions like health centers and sport halls. Aesthetic Properties: Wood is a decorative material when considered as an aesthetic material. Each tree has its own color, design and smell the design of a tree does change according to the way it is sliced. It is possible to find different wooden materials according to color and design preference. It can be painted to darker colors of varnished, and can be given bright or mat touches. Oxidation Properties: Although wood has oxidation characteristics in some way, it is not the kind of oxidation seen in metals. Metals get rust, wood doesn’t. For such characteristics, use of wood is preferred to avoid rust when necessary. Working Properties: It is easy to repair and maintain wood. While old woods can be renewed by special touches other materials are highly difficult and costly to maintain and to repair. Therefore they are usually disposed of. Variation: There are more than 5000 kinds of woods in the world. Their specific gravity, macroscopic and microscopic structures are different. Accordingly, their physical, thermal, acoustic, electrical and mechanical properties are also different. Because of this variety, it is possible to find wood suitable for needs. For instance, for heat isolation and sound absorption woods in lightweight are used. Similarly, heavy ones are used for construction purposes. DISADVANTAGESOF WOOD Shrinkage and Swelling of Wood: Wood is a hygroscopic material. This means that it will adsorb surrounding condensable vapors and loses moisture to air below the fiber saturation point. Deterioration of Wood: The agents causing the deterioration and destruction of wood fall into two categories: Biotic (biological) and a biotic (non-biological). Biotic agents include decay and mold fungi, bacteria and insects. Abiotic agents include sun, wind, water, certain chemicals and fire. Biotic Deterioration of Wood: Woods are organic goods. Like any organic good, wood is a nutritional product for some plants and animals. Humans cannot digest cellulose and the other fiber ingredients of wood, but some
  5. 5. 5 fungi and insects can digest it, and use it as a nutritional product. Insects drill holes and drive lines into wood. Even more dangerously, fungi cause the wood to decay partially and even completely. Biological deterioration of wood due to attack by decay fungi, wood boring insects and marine borers during its processing and in service has technical and economical importance. Insects: Insects are only second to decay fungi in the economic loss they cause to lumber and wood in service. Insects can be separated into four categories: Termites, powder post beetles, carpenter ants and marine borers. Carpenter ants Carpenter ants do not feed on wood. They tunnel through the wood and create shelter. They attract most often wood in ground contact or wood that is intermittently wetted. Carpenter bees They cause damage primarily to unpainted wood by creating large tunnel in order to lay eggs. Marine borers They attack and can rapidly destroy wood in salt water and brackish water. Comparison Steel Vs Concrete Steel Concrete Safety : Experts acknowledge that steel can soften and melt with exposure to extremely high temperatures. However, with the addition of passive fire protection, such as spray-on fireproofing, buildings built of structural steel can sustain greater temperatures and, therefore, provide additional safety. Concrete is safer. The building’s core (where elevators, stairs, and power systems are located) will be encased in 2-foot-thick concrete for protection in the event of a fire or terrorist attack. Moreover, it can endure very high temperatures from fire for a long time without loss of structural integrity. Concrete requires no additional fireproofing treatments to meet stringent fire codes, and performs well during both natural and manmade disasters. COST Initially the cost of steel structures is greater than the Reinforced concrete structures because the section of steel are very much The cost of ready-mix concrete remains relatively stable, and even the increase in steel has had a minimal effect on reinforced concrete building projects.
  6. 6. 6 expensive, moreover they are available in certain areas which also increase transport charges. Cost of steel structures can be balanced by durability of building i.e. increase in life of building. Concrete prices remain very steady despite the fluctuating and substantial increases in other building material prices. MATERIAL AVAILABILITY . Availability of steel now days marked the steel industries around the world. Steel is mostly available in mega cities where easily can be placed to construction site but it can’t be easily available at different location. Availability also affects the cost of project, less availability increase the cost of project. Concrete and its ingredients are easily available in any native area as compare to Steel. Moreover there are many industries which make ready mix concrete and its ingredient like cement which can made available easily. Its unavailability effect very less on the project cost as compare to steel. CONSTRUCTION SCHEDULING Construction schedule of steel structures is more faster than RCC one because steel members are require to fasten in their position which take very less time and can easily be done with skilled labor or by fasten machines. Construction of RCC structures require more time than Steel structures because; while placing of concrete require to built its formwork first then placing is done. After placing it has to be cured for certain period of time which makes its construction work very slow than steel structures. DESIGN POSSIBILITIES : Steel has the highest strength-to- weight ratio of any construction material. And with new construction methods, steel buildings remain a popular choice for office and multifamily developers. Use of girder slab, staggered truss, and castellated beam construction enables lower floor-to-floor heights than typically expected in structural steel buildings. Steel can accomplish extremely long spans in structures [and] very open-bay footprints without intermediate columns. It’s a very flexible material in terms of different ways to address design requirements. Concrete buildings are taking many different shapes. In addition to the unique aesthetics achieved with concrete construction, these buildings offer some very real space advantages. Public and private developers should also realize that using cast-in-place reinforced concrete to frame a high- rise office building would yield more rentable space because of lower floor- to-floor heights. With proper engineering, concrete building can also offer uninterrupted floor plates.
  7. 7. 7 Steel Vs Timber Steel Timber Thermal The coefficient of expansion of steel is very high as compare to wood so they cause failure of structures when increases. Failure may occur due to deflection structural member which are subjected to high temperature. The coefficient of expansion of wood is very low i.e. it does not provide increase in length when temperature is raised so this may provide safety to structures and make to cool enough as compare to steel. However contraction may be danger full to timber structures because below 0 C its starts contract rapidly. Acoustics Steel structures may produce sound i.e. echo because they have less properties of absorption of sound waves so sound proof material may be used in these structures. Timber don’t reflect sound waves rather it has greater intensity to absorb sound waves so no need of providing sound proof materials in buildings which reduce cost . Cost Steel structures are very much costly than the timber structures because of their metallic behavior and used for high structural variations such as loads, span and strength. The cost of timber structures is very low because these structures are design for low loads, strength and span. Durability Steel structures are more durable than timber because these structures got extra strength which against natural agents such as wind , rain, earthquake etc. the life time steel structures may be up to 50 years Timber structures are less durable than steel structures because they have properties to against natural phenomenon. Life time may be up to 15 to 20 years. Deterioration Steel structures are liable to be corroded this may reduce life span but if steel coated with paints then corrosion is reduced at great extent. Timber deteriorates more than steel because termites badly affect the timber which makes tunnel through it and make it weak enough. It can be reduced by painting. Varieties Varieties of steel is limited, they can be made variable by industrial agents i.e. by looking adding different metals, alloys etc which may get its variation. More than 5000 kinds of wood are available in the world with different eternal structures and properties. So they can be used in engineering for various purpose
  8. 8. 8 Classification of Loads Gravity loads: Loads which acts in the direction of gravity i.e. towards the centre of earth. Gravity loads include dead load, live load whose effect is transfer to foundation and direction of force is vertical downward. Dead Load: Gravity loads of constant magnitude and fixed position that act permanetaly on the structure. These loads consist of self weight of structure (weight of Beam, column slabs and struts etc) and equipment permanently attached to structures such as Furniture load, home accessories load etc. Examples: Materials Dead load lb/ft3 Dead load KN/m3 Aluminum 170 26.7 Plain concrete 144 22.6 Reinforced concrete 150 23.6 Steel 490 77 Brick 120 18.9 plywood 36 5.7 Loads garvity loads Dead load live load Lateral loads Earthquake load Wind load lateral Pressure
  9. 9. 9 Live Loads: the gravity load which vary both in magnitude and location. They may be caused by the weights of objects temporarily placed on a structure, moving vehicle or natural forces. Usually these provide additional protection to deflection or sudden overloads .the magnitude of live load is usually specifies in building codes. They are calculated as pounds per sq:inch or KN/m2. Occupancy or use Live Load lb/ft2 Live Load kN/m Assembly areas and theaters a) Fixed seats b) Movable c) Garages 60 100 50 2.87 4.97 2.40 Office buildings a)Lobbies b)offices 100 50 4.79 2.40 Storage Ware Houses a)Light b)Heavy 125 250 6 11.97 Residential a) Dwellings b) Public rooms 40 100 1.92 4.79 Highway Bridge loads: this is gravity load in live load on bridges spans are those due to traffic, movement of heavy vehicle loading encountered is that caused by a series of trucks. Specification for tracks on highway bridges is given by LRFD bridge specification introduced by AASHTO. For two axle trucks theses loads are designated with an H.Hseries of Truck weighs 10 to 20 tons. Highway bridges are designed by two axle truck and one axle semitrailer which is designated as HS. Impact Loads: Moving vehicle may bounce or sides way as they move over bridge, and therefore they impart an impact to the deck. The percentage increase of the live loads due to impact is called impact factor I. AASHTO specifies impact factor as I=50/L+125 where L is length in feet subject to live load Snow Load: the load of snow on the structure is known as snow load. This load is considered in the areas where snow fall at regular .these loads increase the dead load of structures , if it stag on structure especially roof of less slope ;this will cause dampness on roof and may water penetrate in the roof which disturb bond between concrete and steel.
  10. 10. 10 Lateral Loads: loads which act horizontal to structures are known as lateral loads. Earthquake Loads: when two layer of earth or plates of earth strikes or slides with each other, they released certain energy in form of waves which attack horizontal to structures .this type of loads are known as earthquake loads. These loadings result from the structure’s distortion caused by ground motion and lateral resistance to structures. Effects Earthquake loading depends upon amount and ground acceleration, mass and stiffness of structures, intensity of earthquake waves and bearing capacity of soil etc. Earthquake load can be calculated by EQ=ZIKCSW Wind loads: when structure blocks the flow of wind, the wind’s kinetic energy is converted into potential energy of pressure, which causes a wind loading. The effect of wind load on a structure depends upon density, velocity of air, angle of incidence, shape and stiffness of structure and roughness of its surface. Wind load or wind pressure on structure q=1/2e V2 e=Density of air and v is velocity of air Hydrostatic and soil pressure: when structures are used to retain water, soil, or granular materials, the pressure developed by these loadings becomes an important criterion for their design. Examples of such types of structures are Tanks, dams, ships, bulkheads and retaining walls. Here laws of hydrostatics and soil mechanics are applied to define the intensity of loadings on structures. Importance of considerations of load in the analysis and Designof structures: Loads play very important role in the designs of buildings; all structures are designed accordingly. At the first stage analysis is done for specific project through which we come to know loads criteria on buildings so that design work may proceed according to load conditions. All kinds of loads are considered while designing any project if any load is missed that may cause of failure. Before going to layout of buildings Dead load, live load and Lateral force to structure are mentioned .it is worth to note that project cost will be increased according to load conditions ;an area where earthquake are more ,than more elastic materials foundations is selected which increase cost of project. More ever loads lead to failure of design if all aspect of loading to structure is not properly calculated .Thus meanwhile we can say that Loads plays backbone role in designs of civil engineering project which may result to success of project or failure of project if bad designing is done.
  11. 11. 11 Importance of Earthquake load consideration in Design of different Structures: Earthquake is a natural phenomenon that can be a huge threat for any building that is not designed and constructed properly to withstand it. It causes thousands of lives to be lost and huge amounts of property damages in the world every year. The most destructive earthquakes are caused by seismic waves that reach to the earth surface at areas where man-made structures are located. When seismic energy reaches the ground surface, it creates a strong ground motion, which is generally measured by maximum ground acceleration. Strong ground motion is also the primary cause of damage to the soil base upon which the community must rebuild. Therefore, the only way to prevent structural damage against a seismic loading in earthquake areas is through proper design and construction. For that purpose, it is important to sufficiently understand seismic activity, dynamic effect and related building response. The dynamic response of a building against an earthquake vibration is an important structural aspect which directly affects the structural resistance and consequently the hazard level. Not only the direct member displacements and member strength must be considered in structural analysis, but also second order effects caused by large displacements due to cyclic loading. - Earthquake damages on the buildings In order to design an earthquake resistant steel building, engineers can choose different methods and structural components capable to withstand lateral loads. These structural elements can be: shear walls, concentrically or eccentrically braced frames, moment resisting frames, diaphragms, truss systems and other similar systems. The determination of an appropriate earth resisting system also is dependent upon the building design's architectural concept. Therefore, the designer responsible for making an earthquake resistant building must develop a comprehensive structural system that will address the requirements of earthquake safety, building cost, building use, and importantly the architectural design.
  12. 12. 12 There are essentially two structural systems used to resist horizontal seismic actions: Braced structural frames (BSF) or truss bracing. Moment resisting frames (MRF) or simple frames. Additionally, diaphragms and shear walls are considered with these structure systems. Diaphragms are horizontal resistance elements, generally floors and roofs that transfer the lateral forces between the vertical resistance elements (shear walls or frames). Basically, a diaphragm acts as a horizontal I-beam. That is, the diaphragm itself acts as the web of the beam and its edges act as flanges. Shear walls are vertical walls that are designed to receive lateral forces from diaphragms and transmit them to the ground. The forces in these walls are predominantly shear forces in which the fibers within the wall try to slide past one another. Braced Structural Frames Braced frames develop their resistance to lateral forces by the bracing action of diagonal members. The braces induce forces in the associated beams and columns so that all work together like a truss, with all members subjected to stresses that are primarily axial. 2 Moment Resisting Frames when seismic resistance is provided by moment resistant frames, lateral forces are resisted primarily by the joints between columns and beams. These joints become highly stressed and the details of their construction are very important. Moment frames use, as a last-resort resistance strategy, the energy absorption obtained by permanent deformation of the structure prior to ultimate failure. For this reason, moment resistant frames generally are steel structures with bolts or welded joints in which the natural ductility of the material advantageous. However, properly reinforced concrete frames that contain a large amount of steel reinforcing are also effective as ductile frames. They will distort and retain resistance capacity prior to failure and will not fail in a brittle manner Conclusion: As we observe from above discussion that different structures or structural component require different construction methods to bear lateral force .Generally following consideration is taken to reduced Earthquake loads 1) Floating foundations are made to resist earthquake loads. 2) Elastic materials are used in foundation and other structural component which when subjected to earthquake loading will deformation elastically; after earthquake forces it gain its position.
  13. 13. 13 3) Shear walls are constructed in front of important structures which resist Lateral forces. 4) Flexible RCC foundations can be constructed. Earthquake Equations EQ=ZIKCSW This is American standard (Unified Building code) equation which is used to calculate earthquake load that may affect structure. Equation parameter: 1. Z=Earthquake zones This parameter indicates value of different zones of earth quake regions. Earth quake zone may be high, moderate, low. Its maximum value is 1 and minimum less than 1. 2. I=occupancy importance factor This factor need special care while designing of important buildings like Hospitals, Commercial malls, Land mark of cities, nuclear plants. For this purpose extra factor against earthquake loads are added which makes safety of structures. If this factor is neglected then disaster may brings many deaths and more hospitals may not be there for services of effected people because it may collapsed. Its range is (1.5 to 1). 3. K=Lateral Force coefficient This value indicates the index of lateral force or horizontal force to structures which is from earth quake. This value is greater in case of hydraulic structures in which tow lateral force may begin to act , one from earthquake and other due to lateral of water which is produced due to earthquake. RCC structures having water tank over it may be subjected to critical situations because due to earthquake partial dead load is converted into live which loads on structures. Range: 2 to 2.5. 4. S= bearing capacity of soil Bearing capacity of soil plays important role while transferring of loads on it through foundation. Soft soil is weak to bear loads than hard soil.
  14. 14. 14 Soft soil absorb shock waves than hard soil so for soft soil strong foundation or more elastic foundations are provided in order to bear shock waves of earthquake and make structure safe enough Range is S=1.5(when Geotechnical data is not given) Its value can be reduced when Geotechnical data is studied for area in which project is to be constructed. 5. C=Fundamental Building Period The Value of this factor depends upon the time of earthquake waves subject to structure; greater the time of earthquake greater will be disaster for structures. Value of C depends upon mainly three factors Height, time and materials. More height, more time and bad materials make structure critical. 6. W=Weight of structure. Weighted structures are directly affected by earthquake load because more the loads more will destruction. When self weight of structure is increased this ultimately brings more loads to foundation which in result more destruction. Steel structures are light in weight than RCC so they are preferred on it. 2 V=CsW Where V=Total lateral force or shear base W=Dead load of building Cs=Seismic response coefficient Cs =1.2Cv/ RT2/3 < 2.5Ca/ R Cv and Ca are the seismic coefficient based on soil profile and on the effective peak velocity – related acceleration (Av) and effective peak acceleration (Aa). R denotes response modification factor. T represent fundamental period of vibration of the structure.