0% found this document useful (0 votes)
38 views3 pages

Visual Studio: Herramientas

This document contains code for calculating area and the Reynolds number in Visual Studio. It includes controls like text boxes, buttons, and checkboxes. The area calculation code takes values from text boxes, calculates the area, and displays it. The Reynolds number code calculates the number based on inputs for density, velocity, diameter, and clears values with a button. It classifies the flow as laminar, turbulent, etc. based on the Reynolds number value.

Uploaded by

jose 32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Visual Studio: Herramientas

This document contains code for calculating area and the Reynolds number in Visual Studio. It includes controls like text boxes, buttons, and checkboxes. The area calculation code takes values from text boxes, calculates the area, and displays it. The Reynolds number code calculates the number based on inputs for density, velocity, diameter, and clears values with a button. It classifies the flow as laminar, turbulent, etc. based on the Reynolds number value.

Uploaded by

jose 32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

VISUAL STUDIO

Herramientas
Label, Button, Checkbox, Radio Button, Text Box, Group Box, DataGridView.

CALCULO DE AREA

Public Class Form1


Dim A, B, C As Single

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
C = A * B
TextBox3.Text = C

End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
End Class
CALCULO DEL NUMERO DE REYNOLDS

Public Class Form1


Dim S, DEN, VP, PC, VEL, NRE As Single

Dim FLUJ As String

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


Dim ID, OH, OD As Single
If CheckBox1.Checked Then
ID = InputBox("pulg2", "DIAMETRO INTERNO CÑ")
S = ID
ElseIf CheckBox2.Checked Then
OH = InputBox("pulg2", "DIAMETRO DEL AGUJERO")
OD = InputBox("pulg2", "DIAMETRO EXTERNO CÑ")
S = OH - OD
End If
DEN = Val(TextBox1.Text)
VP = Val(TextBox2.Text)
PC = Val(TextBox3.Text)
VEL = Val(TextBox4.Text)
NRE = (928 * DEN * VEL * S) / (VP + 6.65 * (S / VEL) * PC)
TextBox5.Text = NRE
If (NRE < 100) Then
FLUJ = "FLUJO TAPON"
ElseIf (NRE < 2100) Then
FLUJ = "FLUJO LAMINAR"
ElseIf (NRE < 4000) Then
FLUJ = "FLUJO DE TRANSICION"
Else
FLUJ = "FLUJO TURBULENTO"
End If
Label10.Text = FLUJ

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


End
End Sub
End Class

You might also like