El documento describe una clase llamada Revision_Vigas que contiene métodos y propiedades para realizar cálculos estructurales en vigas de concreto reforzado. La clase almacena variables privadas como la base, altura efectiva y áreas de acero de la viga. También contiene métodos para calcular valores como la cuantía mínima, máxima, balanceada y calculada, y revisar la viga evaluando estas cuantías y calculando los esfuerzos y momento resistente.
1. Código: Seleccionar todo
Imports System.IO
Imports System.Math
Public Class Revision_Vigas
'Heredando los textos
Inherits Texto
'**************** VARIABLES PRIVADAS *****************
'*****************************************************
'almacena la base de la viga
Private Base As Single
'almacena la altura d (altura efectiva a tension en cm)
Private d_Tens As Single
'almacena la altura d' (altura efectiva a compresion en cm)
Private d_Comp As Single
'Area de Acero a Tension (AS en cm ^2)
Private As_Tens As Single
'Area de Acero a Compresion (A'S en cm ^2)
Private As_Comp As Single
'resistencia a la compresion del concreto (kg/cm^2)
Private fc_ As Single
'resistencia a la compresion del Acero (kg/cm^2)
Private fy_ As Single
'factor de seguridad fi: para vigas es 0.9
Private Fi_ As Single
'*****************************************************
'**************** VARIABLES PUBLICAS *****************
'*****************************************************
''' <summary>
''' Momento último expresado en Ton*metros
''' </summary>
''' <remarks>Nilson</remarks>
Public Mu As Single 'Momento expresado en Ton*metro
''' <summary>
''' Esfuerzo de Tension de las barras de acero expresado en
kg/cm^2
''' </summary>
''' <remarks>Nilson</remarks>
Public fs_Comp As Single
''' <summary>
''' Esfuerzo de Compresion de las barras de acero expresado
en kg/cm^2
''' </summary>
''' <remarks>Nilson</remarks>
Public fs_Tens As Single
''' <summary>
''' Esta es la cuantia de la sección (en decimas), valor
adimensional
''' </summary>
''' <remarks>Nilson</remarks>
Public Cuantia_Calc As Single
''' <summary>
''' Cuantia mínima. Si el valor de la cuantia calculada es
mayor que este, entonces el acero a compresión fluye.
''' Si la cuantia calculada es menor que este, el acero a
compresion no fluye y debe calcularse por la siguiente formula:
''' f's = 6000*(c-d')/c
''' </summary>
''' <remarks></remarks>
2. Public Cuantia_Min As Single
''' <summary>
''' Equivale al 75% de la cuantia balanceada. Este es el
valor limite de la cuantia permitida según NSR 98.
''' </summary>
''' <remarks></remarks>
Public Cuantia_Max As Single
''' <summary>
''' Cuantia Balanceada. Si la cuantia calculada es mayor que
este valor, la viga es Sobre-reforzada.
''' Caso contrario, Sub-reforzada.
''' </summary>
''' <remarks></remarks>
Public Cuantia_Bal As Single
'Propiedad que almacenar valor de la base de la viga
Public Property Base_() As Single
Get
Return Base
End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;La base no puede ser menor o igual a
ceroquot;)
Else
Base = Valor
End If
End Set
End Property
'Propiedad para la altura efectiva a tensión de la viga
Public Property Altura_Efectiva_Tension() As Single
Get
Return d_Tens
End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;La Altura efectiva no puede ser menor o
igual a ceroquot;)
Else
d_Tens = Valor
End If
End Set
End Property
'Propiedad para la altura efectiva a compresión de la viga
Public Property Altura_Efectiva_Compresion() As Single
Get
Return d_Comp
End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;La Altura efectiva a compresion no puede
ser menor o igual a ceroquot;)
Else
d_Comp = Valor
End If
3. End Set
End Property
Public Property AS_Tens_() As Single
Get
Return As_Tens
End Get
Set(ByVal Valor As Single)
If Valor < 0 Then
MsgBox(quot;Error: Area negativa no se puedequot;)
Else
As_Tens = Valor
End If
End Set
End Property
Public Property AS_Comp_() As Single
Get
Return As_Comp
End Get
Set(ByVal Valor As Single)
If Valor < 0 Then
MsgBox(quot;Error: Area negativa no se puedequot;)
Else
As_Comp = Valor
End If
End Set
End Property
Public Property fc() As Single
Get
Return fc_
End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;Error, este valor no puede ser menor ni
igual que ceroquot;)
Else
fc_ = Valor
End If
End Set
End Property
Public Property fy() As Single
Get
Return fy_
End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;Error, este valor no puede ser menor ni
igual que ceroquot;)
Else
fy_ = Valor
End If
End Set
End Property
Public Property Fi() As Single
Get
Return Fi_
4. End Get
Set(ByVal Valor As Single)
If Valor <= 0 Then
MsgBox(quot;Error en el factor de seguridadquot;)
Else
Fi_ = Valor
End If
End Set
End Property
''' <summary>
''' Funcion que halla la cuantia balanceada (pagina 88 del
Libro Rochel tomo 1)
''' </summary>
''' <param name=quot;fcquot;>Resistencia del concreto expresado en
kg/cm^2</param>
''' <param name=quot;fyquot;>Resistencia del acero expresado en
kg/cm^2</param>
''' <returns>Valor de la cuantia balanceada. Valor
Adimensional</returns>
''' <remarks>Nilson</remarks>
Private Function pb(ByVal fc As Single, ByVal fy As Single)
As Single
Return Alfa(fc) * fc / fy * 6000 / (6000 + fy)
End Function
'Ecuacion 6.11 (pagina 88)
Private Function pnet_Max(ByVal fc As Single, ByVal fy As
Single) As Single
Return 0.75 * pb(fc, fy)
End Function
'Ecuacion 7.6 (pag 108)
Private Function pnet_Min(ByVal fc As Single, ByVal fy As
Single, ByVal d_Comp As Single, ByVal d_Tens As Single) As
Single
pnet_Min = Alfa(fc) * fc / fy * 6000 * d_Comp / ((6000 -
fy) * d_Tens)
End Function
'Funcion que halla la cuantia de la sección
Private Function pnet_Calc(ByVal As_Comp As Single, ByVal
As_tens As Single, ByVal b As Single, ByVal d As Single) As
Single
Return (As_tens - As_Comp) / (b * d)
End Function
Public Sub Revisar_Viga()
'Procedimiento que ejecuta la revision de la viga
Dim C_neut As Single
Dim a As Single
Dim Momento As Single 'Ton*metro
5. Cuantia_Min = pnet_Min(fc_, fy_, d_Comp, d_Tens)
Cuantia_Max = pnet_Max(fc_, fy_)
Cuantia_Calc = pnet_Calc(As_Comp, As_Tens, Base, d_Tens)
Cuantia_Bal = pb(fc_, fy_)
If Cuantia_Calc >= Cuantia_Min And Cuantia_Calc <
Cuantia_Bal Then
fs_Comp = fy_
fs_Tens = fy_
a = (As_Tens * fs_Tens - As_Comp * fs_Comp) / (0.85
* fc_ * Base) + As_Comp / Base
C_neut = a / 0.85
'Momento exacto
Momento = Momento_Exacto(a)
Mu = Momento / 100000
ElseIf Cuantia_Calc < Cuantia_Min And Cuantia_Calc <
Cuantia_Bal Then
'Sub reforzada pero el acero a compresion no fluye,
entonces debe calcularse su esfuerzo
fs_Tens = fy_
C_neut = Cuadratica(0.85 ^ 2 * fc_ * Base, -(0.85 *
fc_ * As_Comp + As_Tens * fs_Tens - 6000 * As_Comp), -6000 *
As_Comp * d_Comp)
a = C_neut * 0.85
fs_Comp = 6000 * (C_neut - d_Comp) / C_neut
'Momento exacto
Momento = Momento_Exacto(a)
Mu = Momento / 100000
ElseIf Cuantia_Calc >= Cuantia_Min And Cuantia_Calc >
Cuantia_Bal Then
fs_Comp = fy_
C_neut = Cuadratica(0.85 ^ 2 * fc_ * Base, -(0.85 *
fc_ * As_Comp - As_Comp * fs_Comp - As_Tens * 6000), -As_Tens *
6000 * d_Tens)
a = C_neut * 0.85
fs_Tens = 6000 * (d_Tens - C_neut) / C_neut
'Momento exacto
Momento = Momento_Exacto(a)
Mu = Momento / 100000
ElseIf Cuantia_Calc < Cuantia_Min And Cuantia_Calc >
Cuantia_Bal Then
'Acero a compresion no fluye: f's = 6000*(c-d')/c
===> por no cumplir limite minimo
'Viga sobre reforzada, Acero a tension no fluye: fs
= 6000*(d-c)/c
C_neut = Cuadratica(0.85 ^ 2 * fc_ * Base, -(0.85 *
fc_ * As_Comp - As_Comp * 6000 - As_Tens * 6000), -(As_Comp *
6000 * d_Comp + As_Tens * 6000 * d_Tens))
a = C_neut * 0.85
fs_Comp = 6000 * (C_neut - d_Comp) / C_neut
fs_Tens = 6000 * (d_Tens - C_neut) / C_neut
'Momento exacto
Momento = Momento_Exacto(a)
Mu = Momento / 100000
6. Else
MsgBox(quot;Falta programarquot;)
End If
End Sub
Private Function Momento_Exacto(ByVal a As Single) As Single
'Momento exacto
Momento_Exacto = Fi_ * 0.85 * fc_ * Base * a * (d_Tens -
a / 2) - Fi_ * As_Comp * 0.85 * fc_ * (d_Tens - d_Comp) + Fi_ *
As_Comp * fs_Comp * (d_Tens - d_Comp)
End Function
Public Sub Guardar_Datos()
'Guardando en el bloc de notas
Call EscribirDatoMATRIZ(1, 1, Me.Fi_, Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(2, 1, Me.Base, Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(3, 1, Me.d_Tens, Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(4, 1, Me.d_Comp, Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(5, 1, Me.As_Tens,
Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(6, 1, Me.As_Comp,
Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(7, 1, Me.fc_, Dir_Bloc_Notas)
Call EscribirDatoMATRIZ(8, 1, Me.fy_, Dir_Bloc_Notas)
End Sub
Public Sub Cargar_Datos(ByVal Text_Fi As TextBox, ByVal
Text_Base As TextBox, _
ByVal Text_d_Tens As TextBox, ByVal Text_d_Comp As TextBox _
, ByVal Text_As_Tens As TextBox, ByVal Text_As_Comp As
TextBox _
, ByVal Text_fc As TextBox, ByVal Text_fy As TextBox)
'cargando los datos desde el bloc de notas
Try
With Me
.Fi_ = LeerDatoMATRIZ(1, 1, Dir_Bloc_Notas)
Text_Fi.Text = .Fi_
.Base = LeerDatoMATRIZ(2, 1, Dir_Bloc_Notas)
Text_Base.Text = .Base
.d_Tens = LeerDatoMATRIZ(3, 1, Dir_Bloc_Notas)
Text_d_Tens.Text = .d_Tens
.d_Comp = LeerDatoMATRIZ(4, 1, Dir_Bloc_Notas)
Text_d_Comp.Text = .d_Comp
.As_Tens = LeerDatoMATRIZ(5, 1, Dir_Bloc_Notas)
Text_As_Tens.Text = .As_Tens
.As_Comp = LeerDatoMATRIZ(6, 1, Dir_Bloc_Notas)
Text_As_Comp.Text = .As_Comp
.fc_ = LeerDatoMATRIZ(7, 1, Dir_Bloc_Notas)
Text_fc.Text = .fc_
.fy_ = LeerDatoMATRIZ(8, 1, Dir_Bloc_Notas)
Text_fy.Text = .fy_
End With
7. Catch
MsgBox(quot;No se cargaron los datosquot;)
End Try
End Sub
Function Cuadratica(ByVal A_ As Single, ByVal B_ As Single,
ByVal C_ As Single, Optional ByVal Positivo As Boolean = True)
As Single
'funcion que devuelve la raiz de la ecuación.
'Ecuación de la forma: AX^2 + BX + C = 0
If Positivo = True Then
Cuadratica = (-B_ + Sqrt(B_ ^ 2 - 4 * A_ * C_)) / (2
* A_)
Else
Cuadratica = (-B_ - Sqrt(B_ ^ 2 - 4 * A_ * C_)) / (2
* A_)
End If
End Function
End Class