Sub Project_39_ES(ByVal VecType, m, n, m1, n1 As Integer) ' 39_Ley de Gauss, Flujo E_ES ' Updated: 5/10/25 ' Created by: Becerra Ariel, Villamizar Abiud, Yepes Alexander (1/10/25) ' Modified by: _________________ ' This file contains the code for your new ScienSolar project. ' ============================================================================== ' PROJECT CODE: 39 ' ' INTEGRATION INSTRUCTIONS: ' Note 1: The project number (39) in the function name must match the entry in the CONFIG sheet project list. Update if necessary. ' Note 2: This code will be integrated into the main VBA project to automate project loading and execution. ' Note 3: Generated formulas and values are limited to the first 30 columns. Keep all project data within this range for optimal performance. ' ' STEP-BY-STEP INTEGRATION: ================== ' 1. CONFIG Sheet Setup (for new projects): ' - Navigate to the CONFIG sheet and add a consecutive number to the last row of the projects list (column C, from row 35) ' - Add a descriptive project name in the corresponding language column ' - Replace (if it doesn't match) the number in Sub Project_48 with the new number from the list ' 2. Numbering Validation: ' - Ensure projects in the CONFIG sheet maintain ascending numerical order ' - Only integers are allowed ' 3. VBA Editor Preparation: ' - Open VBA Editor (Alt+F11 Windows / Fn+Option+F11 macOS) ' - Close other workbooks to avoid accidental code placement ' - In the Project Explorer, select an existing module with available space ' - Alternatively, insert a new module (Insert -- > Module) ' 5. Code Implementation: ' - Select all code in this file and copy it ' - Paste at the end of the selected module's code (for new projects) ' - Replace de old code with the new one (for existing projects). Verify the code ' 6. Project Testing: ' - Return to the CONFIG sheet and click 'New Sheet' ' - Select your project from the list and click '+Vector' ' - Large projects require repeated '+Vector' button presses when loading. ' - Verify successful loading in the new sheet ' SUPPORT AND UPDATES: ===================== ' Visit www.sciensolar.com for latest updates and documentation ' © ScienSolar - Advanced Solar Project Management ' ============================================================================== ' Cells(m1 - 1, n1 + 2).FormulaR1C1 = "1" Cells(m1 - 1, n1).Value = "" Cells(m1 + 0, n1 + 0).FormulaR1C1 = "24" Cells(m1 + 0, n1 + 1).FormulaR1C1 = "41" Cells(m1 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "900" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "1" Cells(m1 + 0, n1 + 8).FormulaR1C1 = "Becerra Ariel, Villamizar Abiud, Yepes Alexander (1/10/25)" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "500" Cells(m1 + 1, n1 + 4).FormulaR1C1 = "=CONFIG!R4C6" Cells(m1 + 1, n1 + 5).FormulaR1C1 = "0" Cells(m1 + 1, n1 + 6).FormulaR1C1 = "=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 = "20" Cells(m1 + 2, n1 + 0).FormulaR1C1 = "t = 0,7773438 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "20" Cells(m1 + 2, n1 + 4).FormulaR1C1 = "=CONFIG!R5C6" Cells(m1 + 2, n1 + 5).FormulaR1C1 = "15" Cells(m1 + 2, n1 + 6).FormulaR1C1 = "=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 = "0" Cells(m1 + 3, n1 + 0).FormulaR1C1 = "E" Cells(m1 + 3, n1 + 1).FormulaR1C1 = "15" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "=CONFIG!R6C5" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "15" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt As String HELPtxt = "HELP Comment:" & Chr(10) & "1. To create new projects, press the +Vector button without selecting any project in the project list." & Chr(10) & _ " 2. To load an existing project, select a project from the list and then press +Vector" & Chr(10) & "3. To export a new project, press the Get Code button. The code will be saved on your PC in the same directory where this file is located." & Chr(10) & _ " " & Chr(10) & "If necessary, use this comment to create your own HELP comment for your project. To do this, simply replace this text with your own (Right Click, Edit Comment) and avoid special characters." & Chr(10) & _ " After pressing Get Code, your comment will be updated and saved in the same txt file as your project and will be uploaded after the project appears in ScienSolar.To include the new project in ScienSolar, perform the following steps:" & Chr(10) & _ " a) Open the txt file where the project was saved; b) copy all the contents of the file and paste it in the VBA Editor of the Excel file ScienSolar; c) add the project name and number to the list on the CONFIG sheet; d) Verify that the number is correlative and that it agrees with the project header number, if not modify it in the header or in the list as necessary." & Chr(10) & _ " Right click to delete or edit this comment." & Chr(10) & "" & Chr(10) & "For documentation on ScienSolar, please visit www.sciensolar.com. ScienSolar was designed for 3D physics modeling in MS Excel.It is normal that for some projects it takes time to load it in the sheet, it depends on the number of objects in your project and the performance of your PC." On Error Resume Next Cells(m1, n1 + 9).Comment.text text:=HELPtxt ' Código para recrear controles Dim ws As Worksheet Set ws = ThisWorkbook.ActiveSheet If m = 3 Then PatronW = ActiveSheet.Cells(1, 1).Width PatronH = ActiveSheet.Cells(1, 1).Height ' ComboBox Set dd = ws.DropDowns.Add(Left:=Range("E16").Left + Range("$E$16").Width * 0, Top:=Range("$E$16").Top, Width:=Range("$E$16").Width * 1.5, Height:=Range("$E$16").Height * 1) With dd .Placement = 2 .name = "ViewType" .LinkedCell = "$X$19" .AddItem "1. Ninguna" .AddItem "2: Plana " .AddItem "3. Cil" & ChrW(237) & "ndrica" .AddItem "4. Esf" & ChrW(233) & "rica" .ListFillRange = "$W$20:$W$23" .Value = 1 .Display3DShading = True End With Set dd = Nothing ' Opton button Set opt = ws.OptionButtons.Add(Left:=Range("E11").Left + Range("$E$11").Width * 0.5, Top:=Range("$E$11").Top, Width:=Range("$E$11").Width * 0.5, Height:=Range("$E$11").Height * 1.5) opt.Caption = "" With opt .name = "YesOptionButt" .LinkedCell = "$G$11" End With Set opt = Nothing ' Opton button Set opt = ws.OptionButtons.Add(Left:=Range("F11").Left + Range("$F$11").Width * 0.5, Top:=Range("$F$11").Top, Width:=Range("$F$11").Width * 0.5, Height:=Range("$F$11").Height * 1.5) opt.Caption = "" With opt .name = "NoOptionButt" .LinkedCell = "$G$11" End With Set opt = Nothing ' Button ws.Buttons.Add(Left:=Range("G11").Left + Range("$G$11").Width * 0, Top:=Range("$G$11").Top, Width:=Range("$G$11").Width * 1, Height:=Range("$G$11").Height * 1.5).Select With Selection .name = "DelTableButt" .OnAction = "ShowHideVecConf" .text = "Borrar datos" End With ' ComboBox Set dd = ws.DropDowns.Add(Left:=Range("F16").Left + Range("$F$16").Width * 0.5, Top:=Range("$F$16").Top, Width:=Range("$F$16").Width * 1.5, Height:=Range("$F$16").Height * 1) With dd .Placement = 2 .name = "Drop Down 1540" .LinkedCell = "$W$15" .AddItem "Mostrar" .AddItem "Ocultar" .ListFillRange = "$V$14:$V$15" .Value = 1 .Display3DShading = False End With Set dd = Nothing ' ComboBox Set dd = ws.DropDowns.Add(Left:=Range("F13").Left + Range("$F$13").Width * 0.5, Top:=Range("$F$13").Top, Width:=Range("$F$13").Width * 1.5, Height:=Range("$F$13").Height * 1) With dd .Placement = 2 .name = "Drop Down 1541" .LinkedCell = "$W$14" .AddItem "Mostrar" .AddItem "Ocultar" .ListFillRange = "$V$14:$V$15" .Value = 1 .Display3DShading = False End With Set dd = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G26").Left + Range("$G$26").Width * 0, Top:=Range("$G$26").Top, Width:=Range("$G$26").Width * 0.5, Height:=Range("$G$26").Height * 1) spin.name = "Spinner 1871" spin.LinkedCell = "$G$26" spin.Min = 0 spin.max = 30000 spin.Value = 1 spin.SmallChange = 1 spin.Value = 1 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G33").Left + Range("$G$33").Width * 0, Top:=Range("$G$33").Top, Width:=Range("$G$33").Width * 0.5, Height:=Range("$G$33").Height * 1) spin.name = "Spinner 1872" spin.LinkedCell = "$G$33" spin.Min = 0 spin.max = 30000 spin.Value = 0 spin.SmallChange = 1 spin.Value = 0 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G34").Left + Range("$G$34").Width * 0, Top:=Range("$G$34").Top, Width:=Range("$G$34").Width * 0.5, Height:=Range("$G$34").Height * 1) spin.name = "Spinner 1873" spin.LinkedCell = "$G$34" spin.Min = 0 spin.max = 30000 spin.Value = 90 spin.SmallChange = 1 spin.Value = 90 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G36").Left + Range("$G$36").Width * 0, Top:=Range("$G$36").Top, Width:=Range("$G$36").Width * 0.5, Height:=Range("$G$36").Height * 1) spin.name = "Spinner 1874" spin.LinkedCell = "$G$36" spin.Min = 0 spin.max = 30000 spin.Value = 10 spin.SmallChange = 1 spin.Value = 10 spin.OnAction = "Rotate" Set spin = Nothing ' Button ws.Buttons.Add(Left:=Range("H11").Left + Range("$H$11").Width * 0, Top:=Range("$H$11").Top, Width:=Range("$H$11").Width * 0.5, Height:=Range("$H$11").Height * 1.5).Select With Selection .name = "Button 2475" .OnAction = "Rotate" .text = "" & ChrW(8629) & " " End With ' Button ws.Buttons.Add(Left:=Range("H16").Left + Range("$H$16").Width * 0, Top:=Range("$H$16").Top, Width:=Range("$H$16").Width * 0.5, Height:=Range("$H$16").Height * 1).Select With Selection .name = "Button 4399" .OnAction = "Rotate" .text = "" & ChrW(8629) & " " End With ' Button ws.Buttons.Add(Left:=Range("H13").Left + Range("$H$13").Width * 0, Top:=Range("$H$13").Top, Width:=Range("$H$13").Width * 0.5, Height:=Range("$H$13").Height * 1).Select With Selection .name = "Button 4459" .OnAction = "Rotate" .text = "" & ChrW(8629) & " " End With ' Button ws.Buttons.Add(Left:=Range("H38").Left + Range("$H$38").Width * 0, Top:=Range("$H$38").Top, Width:=Range("$H$38").Width * 0.5, Height:=Range("$H$38").Height * 1).Select With Selection .name = "AddButt1" .OnAction = "AddObject" .text = "+ OBJ" End With ' Button ws.Buttons.Add(Left:=Range("H39").Left + Range("$H$39").Width * 0, Top:=Range("$H$39").Top, Width:=Range("$H$39").Width * 0.5, Height:=Range("$H$39").Height * 1).Select With Selection .name = "DelButt1" .OnAction = "AddObject" .text = "- OBJ" End With End If Dim p As Integer For p = 1 To 0 If Range("A5").Value = "Next sub_i" Then Exit Sub Application.Run "Project_39_" & p & "_ES", VecType, m, n, m1, n1 ' Next p If m = m1 + 0 Then ' vector 4 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "E" Cells(m + 3, n + 1).FormulaR1C1 = "15" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "=CONFIG!R6C5" Cells(m + 3, n + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 = "15" Cells(m + 3, n + 9).FormulaR1C1 = "Vectors visually modified (magnitude unchanged). Adjust scale in B8" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 1).FormulaR1C1 = "=IF(R[12]C[21]=1,"""",IF(R[12]C[21]=2,R[14]C[19],IF(R[12]C[21]=3,R[15]C[19],IF(R[12]C[21]=4,R[16]C[19],IF(R[12]C[21]=5,R[17]C[19],"""")))))" Cells(m + 4, n + 2).FormulaR1C1 = "Flujo de campo a trav" & ChrW(233) & "s de superficies" Cells(m + 4, n + 12).FormulaR1C1 = "FLUJO DE CAMPO A TRAV" & ChrW(201) & "S DE UNA SUPERFICIE " Cells(m + 4, n + 24).FormulaR1C1 = "CONFIGURACI" & ChrW(211) & "N E INSTRUCCIONES" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "60*1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[6]C[20]-1" Cells(m + 5, n + 12).FormulaR1C1 = "Teorema de Ostrogradski - Gauss" Cells(m + 6, n + -1).FormulaR1C1 = "=SUMIFS(C[2],C[3],""E_*"")" Cells(m + 6, n + 0).FormulaR1C1 = "=SUMIFS(C[-1],C[2],""E_*"")" Cells(m + 6, n + 1).FormulaR1C1 = "=SUMIFS(C[-1],C[1],""E_*"")" Cells(m + 6, n + 6).FormulaR1C1 = "=IF(R[10]C[16]=1,"" Seleccionar una superficei en E16"",IF(R[10]C[16]=2,"" Editar el " & ChrW(225) & "rea en celdas Y10 -AC12 -- >> "",IF(R[10]C[16]=3,"" Editar el " & ChrW(225) & "rea en celdas Y12 -AC14) -- >>. "",IF(R[10]C[16]=4,"" Editar EL " & ChrW(193) & "REA en celdas Y13 - AC15) --- >> "",""""))))" Cells(m + 6, n + 20).FormulaR1C1 = "//////////////////////////////////////////// F" & ChrW(211) & "RMULAS DE. LA SUPERFICIE (Y10 - AC15) ///////////////////////////////////////" Cells(m + 6, n + 28).FormulaR1C1 = " L_rango" Cells(m + 7, n + -1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 2).FormulaR1C1 = "/ / / / / / / / / / FLUJO / / / / / / / / / / / " Cells(m + 7, n + 4).FormulaR1C1 = "" & ChrW(-10187) & ChrW(-8515) & " " & ChrW(8776) & " " & ChrW(8721) & "E" & ChrW(7522) & " " & ChrW(916) & "S" & ChrW(7522) & " =" Cells(m + 7, n + 5).FormulaR1C1 = "=R[7]C[23]" Cells(m + 7, n + 6).FormulaR1C1 = "=IF(AND(R[7]C[-7]>3000,R[3033]C[25]=""""),"" << -- " & ChrW(161) & "Posible imprecisi" & ChrW(243) & "n! EXTIENDA LA F" & ChrW(211) & "RMULA AL FINAL DE LA COLUMNA AE, oprima Borrar datos y vuelva a intentarlo"", IF(AND(R[3033]C[28]<>"""",R[3033]C[25]=""""),"" < -- " & ChrW(161) & "Posible imprecisi" & ChrW(243) & "n! Por favor Oprima Borrar Datos y vuelva a intentarlo. "",IF(COUNTIF(C[25],"">0"")>R[7]C[-7],"" < -- " & ChrW(161) & "Posible imprecisi" & ChrW(243) & "n! Por favor Oprima Borrar Datos y vuelva a intentarlo. "","""")))" Cells(m + 7, n + 22).FormulaR1C1 = " x_ini =" Cells(m + 7, n + 23).FormulaR1C1 = "-10" Cells(m + 7, n + 24).FormulaR1C1 = " x_fin =" Cells(m + 7, n + 25).FormulaR1C1 = "10" Cells(m + 7, n + 26).FormulaR1C1 = " Paso:" Cells(m + 7, n + 27).FormulaR1C1 = "2" Cells(m + 7, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]+RC[-1]" Cells(m + 8, n + -1).FormulaR1C1 = "10" Cells(m + 8, n + 0).FormulaR1C1 = "10" Cells(m + 8, n + 1).FormulaR1C1 = "3" Cells(m + 8, n + 2).FormulaR1C1 = "Calcular:" Cells(m + 8, n + 3).FormulaR1C1 = " SI" Cells(m + 8, n + 4).FormulaR1C1 = " NO" Cells(m + 8, n + 5).FormulaR1C1 = "2" Cells(m + 8, n + 22).FormulaR1C1 = " y_ini =" Cells(m + 8, n + 23).FormulaR1C1 = "-10" Cells(m + 8, n + 24).FormulaR1C1 = " y_fin =" Cells(m + 8, n + 25).FormulaR1C1 = "10" Cells(m + 8, n + 26).FormulaR1C1 = " Paso:" Cells(m + 8, n + 27).FormulaR1C1 = "2" Cells(m + 8, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]+RC[-1]" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-3]C[1]" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-3]C[1]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-3]C[-2]" Cells(m + 9, n + 20).FormulaR1C1 = "Color:" Cells(m + 9, n + 21).FormulaR1C1 = "0" Cells(m + 9, n + 22).FormulaR1C1 = " z_ini =" Cells(m + 9, n + 23).FormulaR1C1 = "=IF(R[7]C[-1]=3,5,10)" Cells(m + 9, n + 24).FormulaR1C1 = " z_fin =" Cells(m + 9, n + 25).FormulaR1C1 = "10" Cells(m + 9, n + 26).FormulaR1C1 = " Paso:" Cells(m + 9, n + 27).FormulaR1C1 = "=IF(RC[-4]=RC[-2],0,2)" Cells(m + 9, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]+RC[-1]" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "=IF(R[-2]C[5]=1,15,0)" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 2).FormulaR1C1 = "/ / / / / / / / / / CAMPO / / / / / / / / / / / " Cells(m + 10, n + 20).FormulaR1C1 = "Campo/superficie" Cells(m + 10, n + 22).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8601) & "_ini =" Cells(m + 10, n + 23).FormulaR1C1 = "5" Cells(m + 10, n + 24).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8601) & "_fin =" Cells(m + 10, n + 25).FormulaR1C1 = "5" Cells(m + 10, n + 26).FormulaR1C1 = " Paso:" Cells(m + 10, n + 27).FormulaR1C1 = "1" Cells(m + 10, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "=IF(R[-3]C[5]=1,36,0)" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(OR(R[36]C[1]="""",R[36]C[1]>3,R[36]C[1]=0),"" |E| ="","""")" Cells(m + 11, n + 5).FormulaR1C1 = "=SQRT(R[-2]C[-6]^2+R[-2]C[-5]^2+R[-2]C[-4]^2)" Cells(m + 11, n + 20).FormulaR1C1 = "Mostrar" Cells(m + 11, n + 21).FormulaR1C1 = "1" Cells(m + 11, n + 22).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8257) & "_ini =" Cells(m + 11, n + 23).FormulaR1C1 = "0" Cells(m + 11, n + 24).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8257) & "_fin =" Cells(m + 11, n + 25).FormulaR1C1 = "=360-RC[2]" Cells(m + 11, n + 26).FormulaR1C1 = " Paso:" Cells(m + 11, n + 27).FormulaR1C1 = "=IF(R[5]C[-5]=4,15,10)" Cells(m + 11, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]+RC[-1]" Cells(m + 3, n + 1).Interior.Color = "15773696" Cells(m + 3, n + 1).Font.Size = "14" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "S" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "S" Cells(m + 3, n + 1).FormulaR1C1 = "15" Cells(m + 3, n + 2).FormulaR1C1 = "/ / / / / / / / / / SUPERFICIE / / / / / / / / / / / / / / / / / / / / " Cells(m + 3, n + 20).FormulaR1C1 = "Ocultar" Cells(m + 3, n + 21).FormulaR1C1 = "1" Cells(m + 3, n + 22).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8271) & "_ini =" Cells(m + 3, n + 23).FormulaR1C1 = "0" Cells(m + 3, n + 24).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8271) & "_fin =" Cells(m + 3, n + 25).FormulaR1C1 = "=180-RC[2]" Cells(m + 3, n + 26).FormulaR1C1 = " Paso:" Cells(m + 3, n + 27).FormulaR1C1 = "=IF(R[4]C[-5]=4,15,10)" Cells(m + 3, n + 28).FormulaR1C1 = "=RC[-3]-RC[-5]+RC[-1]" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 1).FormulaR1C1 = "=IF(R[3]C[21]=1,"""",IF(R[3]C[21]=2,R[5]C[19],IF(R[3]C[21]=3,R[6]C[19],IF(R[3]C[21]=4,R[7]C[19],IF(R[3]C[21]=5,R[8]C[19],"""")))))" Cells(m + 4, n + 2).FormulaR1C1 = "Tipo:" Cells(m + 4, n + 20).FormulaR1C1 = "________________________________________________________________________________________________" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-2]C[20]-1" Cells(m + 5, n + 4).FormulaR1C1 = " x_o =" Cells(m + 5, n + 5).FormulaR1C1 = "0" Cells(m + 5, n + 20).FormulaR1C1 = " k =" Cells(m + 5, n + 21).FormulaR1C1 = "8990000000" Cells(m + 5, n + 22).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8448) & ChrW(8320) & " =" Cells(m + 5, n + 23).FormulaR1C1 = "0.000000000008854" Cells(m + 5, n + 26).FormulaR1C1 = " " & ChrW(-10187) & ChrW(-8515) & " = " & ChrW(8748) & "E " & ChrW(183) & " dS " & ChrW(8776) & " " & ChrW(8721) & " E " & ChrW(7522) & " " & ChrW(183) & " " & ChrW(916) & "S " & ChrW(7522) & " =" Cells(m + 5, n + 28).FormulaR1C1 = "=SUM(C[3])" Cells(m + 6, n + -1).FormulaR1C1 = "0" Cells(m + 6, n + 0).FormulaR1C1 = "0" Cells(m + 6, n + 1).FormulaR1C1 = "400" Cells(m + 6, n + 2).FormulaR1C1 = " Desplazar superficie:" Cells(m + 6, n + 4).FormulaR1C1 = " y_o =" Cells(m + 6, n + 5).FormulaR1C1 = "0" Cells(m + 6, n + 20).FormulaR1C1 = " _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ " Cells(m + 7, n + -1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[1]C" Cells(m + 7, n + 4).FormulaR1C1 = " z_o =" Cells(m + 7, n + 5).FormulaR1C1 = "0" Cells(m + 7, n + 20).FormulaR1C1 = "Superficie seleccionada:" Cells(m + 7, n + 22).FormulaR1C1 = "1" Cells(m + 7, n + 24).FormulaR1C1 = "F" & ChrW(243) & "rmula" Cells(m + 7, n + 26).FormulaR1C1 = "|" Cells(m + 7, n + 27).FormulaR1C1 = "Normalizaci" & ChrW(243) & "n (para " & ChrW(916) & "S_i)" Cells(m + 8, n + -1).FormulaR1C1 = "10" Cells(m + 8, n + 0).FormulaR1C1 = "10" Cells(m + 8, n + 1).FormulaR1C1 = "3" Cells(m + 8, n + 21).FormulaR1C1 = "1. Ninguna" Cells(m + 8, n + 23).FormulaR1C1 = " x" Cells(m + 8, n + 24).FormulaR1C1 = " y" Cells(m + 8, n + 25).FormulaR1C1 = " z" Cells(m + 8, n + 26).FormulaR1C1 = " i" Cells(m + 8, n + 27).FormulaR1C1 = " j" Cells(m + 8, n + 28).FormulaR1C1 = " k" Cells(m + 9, n + -1).FormulaR1C1 = "=IFERROR(VLOOKUP(R19C24,R21C24:R23C30,5,FALSE),0)" Cells(m + 9, n + 0).FormulaR1C1 = "=IFERROR(VLOOKUP(R19C24,R21C24:R23C30,6,FALSE),0)" Cells(m + 9, n + 1).FormulaR1C1 = "=IFERROR(VLOOKUP(R19C24,R21C24:R23C30,7,FALSE),0)" Cells(m + 9, n + 4).FormulaR1C1 = " " & ChrW(193) & "rea =" Cells(m + 9, n + 5).FormulaR1C1 = "=MAX(R[3]C[18],R[3]C[20],R[3]C[22])" Cells(m + 9, n + 20).FormulaR1C1 = "=""o[""&R[-11]C[7]&""]x=[""&R[-11]C[3]&"";""&R[-11]C[5]&""]o2[""&R[-10]C[7]&""]y=[""&R[-10]C[3]&"";""&R[-10]C[5]&""]o3[""&R[-9]C[7]&""]z=[""&R[-9]C[3]&"";""&R[-9]C[5]&""]color=[""&R[-9]C[1]&""]origin[cart.]=[""&R[-4]C[-15]&"";""&R[-3]C[-15]&"";""&R[-2]C[-15]&""]FieldLayers[0]FieldLayersRange=[0;0]LayerThickness=[1]tfactor=0,008s""" Cells(m + 9, n + 21).FormulaR1C1 = "2: Plana " Cells(m + 9, n + 22).FormulaR1C1 = "2" Cells(m + 9, n + 23).FormulaR1C1 = "0" Cells(m + 9, n + 24).FormulaR1C1 = "0" Cells(m + 9, n + 25).FormulaR1C1 = "1" Cells(m + 9, n + 26).FormulaR1C1 = "=RC[-3]/SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2)*R[4]C[-3]" Cells(m + 9, n + 27).FormulaR1C1 = "=RC[-3]/SQRT(RC[-4]^2+RC[-3]^2+RC[-2]^2)*R[4]C[-4]" Cells(m + 9, n + 28).FormulaR1C1 = "=RC[-3]/SQRT(RC[-5]^2+RC[-4]^2+RC[-3]^2)*R[4]C[-5]" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 20).FormulaR1C1 = "=""c[""&R[-9]C[7]&""]rho=[""&R[-9]C[3]&"";""&R[-9]C[5]&""]c2[""&R[-8]C[7]&""]phi=[""&R[-8]C[3]&"";""&R[-8]C[5]&""]c3[""&R[-10]C[7]&""]z=[""&R[-10]C[3]&"";""&R[-10]C[5]&""]color=[""&R[-10]C[1]&""]origin[cart.]=[""&R[-5]C[-15]&"";""&R[-4]C[-15]&"";""&R[-3]C[-15]&""]FieldLayers[0]FieldLayersRange=[0;0]LayerThickness=[1]tfactor=0,008s""" Cells(m + 10, n + 21).FormulaR1C1 = "3. Cil" & ChrW(237) & "ndrica" Cells(m + 10, n + 22).FormulaR1C1 = "3" Cells(m + 10, n + 23).FormulaR1C1 = "=(R[-5]C[-2]*(R[-2]C[-24]-R[-5]C[-18]))/((R[-2]C[-23]-R[-4]C[-18])^2+(R[-2]C[-22]-R[-3]C[-18])^2)" Cells(m + 10, n + 24).FormulaR1C1 = "=(R[-5]C[-3]*(R[-2]C[-24]-R[-4]C[-19]))/((R[-2]C[-24]-R[-4]C[-19])^2+(R[-2]C[-23]-R[-3]C[-19])^2)" Cells(m + 10, n + 25).FormulaR1C1 = "0" Cells(m + 10, n + 26).FormulaR1C1 = "=RC[-3]/SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2)*R[3]C[-1]" Cells(m + 10, n + 27).FormulaR1C1 = "=RC[-3]/SQRT(RC[-4]^2+RC[-3]^2+RC[-2]^2)*R[3]C[-2]" Cells(m + 10, n + 28).FormulaR1C1 = "=RC[-3]/SQRT(RC[-5]^2+RC[-4]^2+RC[-3]^2)*R[3]C[-3]" Cells(m + 11, n + -1).FormulaR1C1 = "2" Cells(m + 11, n + 0).FormulaR1C1 = "=R[-9]C+10" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 20).FormulaR1C1 = "=""s[""&R[-10]C[7]&""]r=[""&R[-10]C[3]&"";""&R[-10]C[5]&""]s2[""&R[-9]C[7]&""]phi=[""&R[-9]C[3]&"";""&R[-9]C[5]&""]s3[""&R[-8]C[7]&""]theta=[""&R[-8]C[3]&"";""&R[-8]C[5]&""]color=[""&R[-11]C[1]&""]origin[cart.]=[""&R[-6]C[-15]&"";""&R[-5]C[-15]&"";""&R[-4]C[-15]&""]FieldLayers[0]FieldLayersRange=[0;0]LayerThickness=[1]tfactor=0,008s""" Cells(m + 11, n + 21).FormulaR1C1 = "4. Esf" & ChrW(233) & "rica" Cells(m + 11, n + 22).FormulaR1C1 = "4" Cells(m + 11, n + 23).FormulaR1C1 = "=(R[-3]C[-24]-R[-6]C[-18])*R[-6]C[-2]/POWER((R[-3]C[-24]-R[-6]C[-18])^2+(R[-3]C[-23]-R[-5]C[-18])^2+(R[-3]C[-22]-R[-4]C[-18])^2,3/2)" Cells(m + 11, n + 24).FormulaR1C1 = "=(R[-3]C[-24]-R[-5]C[-19])*R[-6]C[-3]/POWER((R[-3]C[-25]-R[-6]C[-19])^2+(R[-3]C[-24]-R[-5]C[-19])^2+(R[-3]C[-23]-R[-4]C[-19])^2,3/2)" Cells(m + 11, n + 25).FormulaR1C1 = "=(R[-3]C[-24]-R[-4]C[-20])*R[-6]C[-4]/POWER((R[-3]C[-26]-R[-6]C[-20])^2+(R[-3]C[-25]-R[-5]C[-20])^2+(R[-3]C[-24]-R[-4]C[-20])^2,3/2)" Cells(m + 11, n + 26).FormulaR1C1 = "=RC[-3]/SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2)*R[-10]C[-1]^2*R[-9]C[1]*PI()/180*(COS(ACOS(RC[-1]/SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2)))-COS(ACOS(RC[-1]/SQRT(RC[-3]^2+RC[-2]^2+RC[-1]^2))+R[-8]C[1]*PI()/180))" Cells(m + 11, n + 27).FormulaR1C1 = "=RC[-3]/SQRT(RC[-4]^2+RC[-3]^2+RC[-2]^2)*R[-10]C[-2]^2*R[-9]C*PI()/180*(COS(ACOS(RC[-2]/SQRT(RC[-4]^2+RC[-3]^2+RC[-2]^2)))-COS(ACOS(RC[-2]/SQRT(RC[-4]^2+RC[-3]^2+RC[-2]^2))+R[-8]C*PI()/180))" Cells(m + 11, n + 28).FormulaR1C1 = "=RC[-3]/SQRT(RC[-5]^2+RC[-4]^2+RC[-3]^2)*R[-10]C[-3]^2*R[-9]C[-1]*PI()/180*(COS(ACOS(RC[-3]/SQRT(RC[-5]^2+RC[-4]^2+RC[-3]^2)))-COS(ACOS(RC[-3]/SQRT(RC[-5]^2+RC[-4]^2+RC[-3]^2))+R[-8]C[-1]*PI()/180))" Cells(m + 3, n + 1).Interior.Color = "255" Cells(m + 3, n + 1).Font.Size = "14" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "L1" Call AddNewVector End If ' vector ends If m = m1 + 18 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(LEFT(R[5]C[4],1)=""x"",""L""&R24C7,IF(R25C7>0,"" + "", "" - ""))" Cells(m + 3, n + 1).FormulaR1C1 = "=IF(R[-9]C[-1]=""S"",1,R[-18]C+1)" Cells(m + 3, n + 2).FormulaR1C1 = "/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /" Cells(m + 3, n + 4).FormulaR1C1 = "LINEA No. =" Cells(m + 3, n + 5).FormulaR1C1 = "1" Cells(m + 3, n + 20).FormulaR1C1 = "" & ChrW(193) & "rea de la superficie:" Cells(m + 3, n + 22).FormulaR1C1 = "Plana:" Cells(m + 3, n + 23).FormulaR1C1 = "=IF(R[-5]C[-1]=2,IF(R[-12]C[5]=0,R[-13]C[5]*R[-14]C[5],IF(R[-13]C[5]=0,R[-14]C[5]*R[-12]C[5],IF(R[-14]C[5]=0,R[-13]C[5]*R[-12]C[5],""""))),"""")" Cells(m + 3, n + 24).FormulaR1C1 = "Cil" & ChrW(237) & "ndrica:" Cells(m + 3, n + 25).FormulaR1C1 = "=IF(R[-5]C[-3]=3,IF(R[-12]C[3]=0,PI()*(R[-11]C^2-R[-11]C[-2]^2)*R[-10]C[3]/360,IF(R[-11]C[3]=0,2*PI()*R[-11]C*R[-12]C[3]*R[-10]C[3]/360,IF(R[-10]C[3]=0,R[-12]C[3]*R[-11]C[3],""""))),"""")" Cells(m + 3, n + 26).FormulaR1C1 = "Esf" & ChrW(233) & "rica:" Cells(m + 3, n + 27).FormulaR1C1 = "=IF(R[-5]C[-5]=4,IF(R[-11]C[1]=0,4*PI()*R[-11]C[-2]^2*R[-10]C[1]/360*R[-9]C[1]/180,IF(R[-10]C[1]=0,PI()*(R[-11]C[-2]^2-R[-11]C[-4]^2)*R[-9]C[1]/180,IF(R[-9]C[1]=0,PI()*(R[-11]C[-2]^2-R[-11]C[-4]^2)*R[-10]C[1]/360,""""))),"""")" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "=R40C7" Cells(m + 4, n + 4).FormulaR1C1 = "=""Q_""&R[-1]C[1]" Cells(m + 4, n + 5).FormulaR1C1 = "0.000001" Cells(m + 4, n + 20).FormulaR1C1 = "" & ChrW(193) & "rea por vector unitario:" Cells(m + 4, n + 23).FormulaR1C1 = "=IFERROR(R[-1]C/R17C1,0)" Cells(m + 4, n + 25).FormulaR1C1 = "=IFERROR(R[-1]C/R17C1,0)" Cells(m + 4, n + 26).FormulaR1C1 = " Nota: para cada " & ChrW(916) & "S_i de esf" & ChrW(233) & "ricas:" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = "dL =" Cells(m + 5, n + 5).FormulaR1C1 = "1" Cells(m + 5, n + 20).FormulaR1C1 = "/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" Cells(m + 5, n + 26).FormulaR1C1 = " (x,y,z)/r " & ChrW(-10187) & ChrW(-8653) & ChrW(178) & ChrW(-10187) & ChrW(-8475) & ChrW(-10187) & ChrW(-8431) & "(cos " & ChrW(952) & " - cos(" & ChrW(952) & " + " & ChrW(-10187) & ChrW(-8475) & ChrW(952) & ")" Cells(m + 7, n + -1).FormulaR1C1 = "=IF(LEFT(R[1]C[5],1)=""x"",R[1]C[6],R[-18]C+R[-16]C)" Cells(m + 7, n + 0).FormulaR1C1 = "=IF(LEFT(R[1]C[4],1)=""x"",R[2]C[5],R[-18]C+R[-16]C)" Cells(m + 7, n + 1).FormulaR1C1 = "=IF(LEFT(R[1]C[3],1)=""x"",R[3]C[4],R[-18]C+R[-16]C)" Cells(m + 7, n + 4).FormulaR1C1 = "Posici" & ChrW(243) & "n de la carga:" Cells(m + 7, n + 20).FormulaR1C1 = "BASE TE" & ChrW(211) & "RICA:" Cells(m + 8, n + 4).FormulaR1C1 = "x_o =" Cells(m + 8, n + 5).FormulaR1C1 = "0" Cells(m + 8, n + 21).FormulaR1C1 = "El flujo de campo el" & ChrW(233) & "ctrico (" & ChrW(934) & ") a trav" & ChrW(233) & "s de una superficie es una medida del n" & ChrW(250) & "mero neto de" Cells(m + 9, n + -1).FormulaR1C1 = "=R26C7*COS(RADIANS(R33C7+R36C7*R[-6]C[2]))*SIN(RADIANS(R34C7+R37C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R26C7*SIN(RADIANS(R33C7+R36C7*R[-6]C[1]))*SIN(RADIANS(R34C7+R37C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R26C7*COS(RADIANS(R34C7+R37C7*R[-6]C))" Cells(m + 9, n + 4).FormulaR1C1 = "y_o =" Cells(m + 9, n + 5).FormulaR1C1 = "0" Cells(m + 9, n + 21).FormulaR1C1 = "l" & ChrW(237) & "neas de campo que atraviesan dicha superficie. Matem" & ChrW(225) & "ticamente se define de dos formas:" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "z_o =" Cells(m + 10, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + 21).FormulaR1C1 = "Forma integral continua:" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R41C7" Cells(m + 11, n + 4).FormulaR1C1 = "Inclinaci" & ChrW(243) & "n de la l" & ChrW(237) & "nea" Cells(m + 11, n + 23).FormulaR1C1 = "" & ChrW(934) & " = " & ChrW(8748) & "E " & ChrW(183) & " dS" Cells(m + 3, n + 1).Interior.Color = "3506772" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 27 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 4).FormulaR1C1 = "phi =" Cells(m + 3, n + 5).FormulaR1C1 = "-5" Cells(m + 3, n + 21).FormulaR1C1 = "donde E es el vector campo el" & ChrW(233) & "ctrico y dS es el vector elemento de " & ChrW(225) & "rea (normal a la superficie)." Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "theta =" Cells(m + 4, n + 5).FormulaR1C1 = "90" Cells(m + 4, n + 21).FormulaR1C1 = "Forma discreta (implementada en el modelo):" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "1" Cells(m + 5, n + 4).FormulaR1C1 = "Flexi" & ChrW(243) & "n de la l" & ChrW(237) & "nea:" Cells(m + 5, n + 23).FormulaR1C1 = "" & ChrW(934) & " = " & ChrW(931) & " E " & ChrW(7522) & " " & ChrW(183) & " " & ChrW(916) & "S " & ChrW(7522) & "" Cells(m + 6, n + 4).FormulaR1C1 = "Azimut =" Cells(m + 6, n + 5).FormulaR1C1 = "10" Cells(m + 6, n + 21).FormulaR1C1 = "Esta suma se realiza sobre todos los elementos de " & ChrW(225) & "rea en que se divide la superficie, donde E " & ChrW(7522) & " es el campo " Cells(m + 7, n + -1).FormulaR1C1 = "=R11C1" Cells(m + 7, n + 0).FormulaR1C1 = "=R11C2" Cells(m + 7, n + 1).FormulaR1C1 = "=R11C3" Cells(m + 7, n + 4).FormulaR1C1 = "Elevaci" & ChrW(243) & "n =" Cells(m + 7, n + 5).FormulaR1C1 = "0" Cells(m + 7, n + 21).FormulaR1C1 = "en el centro de cada elemento " & ChrW(916) & "S " & ChrW(7522) & "." Cells(m + 8, n + -1).FormulaR1C1 = "1" Cells(m + 8, n + 0).FormulaR1C1 = "1" Cells(m + 8, n + 1).FormulaR1C1 = "1" Cells(m + 8, n + 4).FormulaR1C1 = " n =" Cells(m + 8, n + 5).FormulaR1C1 = "=COUNTIF(C[-3],""E_""&R[-14]C&""_*"")" Cells(m + 8, n + 20).FormulaR1C1 = "IMPLEMENTACI" & ChrW(211) & "N EN EL MODELO:" Cells(m + 9, n + -1).FormulaR1C1 = "=1/(POWER(POWER(R11C1-R[-11]C,2)+POWER(R11C2-R[-11]C[1],2)+POWER(R11C3-R[-11]C[2],2),3/2))*(R11C1-R[-11]C)*R17C23*R25C7/R38C7" Cells(m + 9, n + 0).FormulaR1C1 = "=1/(POWER(POWER(R11C1-R[-11]C[-1],2)+POWER(R11C2-R[-11]C,2)+POWER(R11C3-R[-11]C[1],2),3/2))*(R11C2-R[-11]C)*R17C23*R25C7/R38C7" Cells(m + 9, n + 1).FormulaR1C1 = "=1/(POWER(POWER(R11C1-R[-11]C[-2],2)+POWER(R11C2-R[-11]C[-1],2)+POWER(R11C3-R[-11]C,2),3/2))*(R11C3-R[-11]C)*R17C23*R25C7/R38C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R24C7&""_""&(R[-6]C[-3]-2)/2" Cells(m + 9, n + 4).FormulaR1C1 = " L =" Cells(m + 9, n + 5).FormulaR1C1 = "=R[-13]C*R[-1]C" Cells(m + 9, n + 21).FormulaR1C1 = " 1. Fuentes de campo el" & ChrW(233) & "ctrico" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = " Tipo =" Cells(m + 10, n + 5).FormulaR1C1 = "=IF(R[-2]C<4,9,183)" Cells(m + 10, n + 22).FormulaR1C1 = "Cargas puntuales:" Cells(m + 11, n + -1).FormulaR1C1 = "4" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " Grosor =" Cells(m + 11, n + 5).FormulaR1C1 = "=IF(R[-3]C<4,7,2)" Cells(m + 11, n + 23).FormulaR1C1 = " Magnitud y signo en celda G25" Cells(m + 3, n + 1).Interior.Color = "49407" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Cells(m1 + 2, n1 - 1).Value = 4 End If ' vector ends If m = m1 + 27 Then Cells(m + 12, n + 23).FormulaR1C1 = " Hasta 3 cargas se agregan con bot" & ChrW(243) & "n +OBJ" Cells(m + 13, n + 23).FormulaR1C1 = " Distancia regulable en G26" Cells(m + 14, n + 22).FormulaR1C1 = "L" & ChrW(237) & "nea cargada:" Cells(m + 15, n + 23).FormulaR1C1 = " Al presionar +OBJ m" & ChrW(225) & "s de 4 veces, se convierte en l" & ChrW(237) & "nea cargada" Cells(m + 16, n + 23).FormulaR1C1 = " Par" & ChrW(225) & "metros de configuraci" & ChrW(243) & "n:" Cells(m + 17, n + 23).FormulaR1C1 = " G33: " & ChrW(225) & "ngulo de inclinaci" & ChrW(243) & "n azimutal" Cells(m + 18, n + 23).FormulaR1C1 = " G34: " & ChrW(225) & "ngulo polar " Cells(m + 19, n + 23).FormulaR1C1 = " G36: " & ChrW(225) & "ngulo azimutal incremental (para curvatura)" Cells(m + 20, n + 23).FormulaR1C1 = " G37: " & ChrW(225) & "ngulo polar incremental" Cells(m + 21, n + 23).FormulaR1C1 = " Para m" & ChrW(250) & "ltiples segmentos: ingresar n" & ChrW(250) & "mero en B2 y presionar +OBJ" Cells(m + 22, n + 21).FormulaR1C1 = " 2. Superficies de c" & ChrW(225) & "lculo" Cells(m + 23, n + 22).FormulaR1C1 = "El modelo permite tres tipos de superficies:" Cells(m + 24, n + 22).FormulaR1C1 = "Seleccionar la superficie en E16" Cells(m + 25, n + 22).FormulaR1C1 = "Superficie plana: Configuraci" & ChrW(243) & "n de rangos coordenados en Y10 - AA12." Cells(m + 26, n + 22).FormulaR1C1 = "Superficie cil" & ChrW(237) & "ndrica: altura, radio y " & ChrW(225) & "ngulo en Y12 - AA14" Cells(m + 27, n + 22).FormulaR1C1 = "Superficie esf" & ChrW(233) & "rica: Radio y " & ChrW(225) & "ngulos esf" & ChrW(233) & "ricos en Y13 - AA15" Cells(m + 28, n + 22).FormulaR1C1 = "Elemento de " & ChrW(225) & "rea configurado en AC10 - AC15, determina la magnitud de " & ChrW(916) & "S_i." Cells(m + 29, n + 22).FormulaR1C1 = " F" & ChrW(243) & "rmulas de superficies en Y21AA23" Cells(m + 30, n + 22).FormulaR1C1 = " Normalizaci" & ChrW(243) & "n de vectores en AB21AD23" Cells(m + 31, n + 21).FormulaR1C1 = " 3. Control de c" & ChrW(225) & "lculo" Cells(m + 32, n + 22).FormulaR1C1 = " Activaci" & ChrW(243) & "n: S" & ChrW(237) & "/No en E11/F11" Cells(m + 33, n + 22).FormulaR1C1 = " Resultado del flujo en G10" Cells(m + 34, n + 22).FormulaR1C1 = " Importante: Presionar ""Borrar Datos"" antes de cada nuevo c" & ChrW(225) & "lculo" Cells(m + 35, n + 21).FormulaR1C1 = " Metodolog" & ChrW(237) & "a de C" & ChrW(225) & "lculo" Cells(m + 36, n + 22).FormulaR1C1 = "1. Divisi" & ChrW(243) & "n de la superficie en elementos " & ChrW(916) & "S " & ChrW(7522) & " seg" & ChrW(250) & "n el paso definido" Cells(m + 37, n + 22).FormulaR1C1 = "2. C" & ChrW(225) & "lculo del campo E_i en cada elemento considerando todas las fuentes" Cells(m + 38, n + 22).FormulaR1C1 = "3. Producto escalar de los vectores: E " & ChrW(7522) & " " & ChrW(183) & " " & ChrW(916) & "S " & ChrW(7522) & " para cada elemento" Cells(m + 39, n + 22).FormulaR1C1 = "4. Suma discreta de todas las contribuciones" Cells(m + 40, n + 22).FormulaR1C1 = "5. Visualizaci" & ChrW(243) & "n del flujo total en G10" Cells(m + 41, n + 21).FormulaR1C1 = "Este modelo permite estudiar cuantitativamente c" & ChrW(243) & "mo la geometr" & ChrW(237) & "a de las superficies y la distribuci" & ChrW(243) & "n" Cells(m + 42, n + 21).FormulaR1C1 = "de cargas afectan el flujo del campo el" & ChrW(233) & "ctrico, verificando num" & ChrW(233) & "ricamente leyes fundamentales como la de Gauss" Cells(m + 44, n + 20).FormulaR1C1 = "EJEMPLO PR" & ChrW(193) & "CTICO: c" & ChrW(225) & "lculo de flujo el" & ChrW(233) & "ctrico a trav" & ChrW(233) & "s de una superficie esf" & ChrW(233) & "rica:" Cells(m + 45, n + 21).FormulaR1C1 = "Objetivo: Calcular el flujo el" & ChrW(233) & "ctrico a trav" & ChrW(233) & "s de una superficie esf" & ChrW(233) & "rica que encierra una carga puntual positiva." Cells(m + 46, n + 21).FormulaR1C1 = " Paso 1: Preparaci" & ChrW(243) & "n Inicial. Presionar el bot" & ChrW(243) & "n ""Borrar Datos"" para limpiar c" & ChrW(225) & "lculos anteriores." Cells(m + 47, n + 21).FormulaR1C1 = " Paso 2: Configuraci" & ChrW(243) & "n de la Fuente de Campo" Cells(m + 48, n + 22).FormulaR1C1 = " En celda G25: Ingresar `1E-9` (1 nC de carga positiva)" Cells(m + 49, n + 21).FormulaR1C1 = " Paso 3: Configuraci" & ChrW(243) & "n de la Superficie Esf" & ChrW(233) & "rica" Cells(m + 50, n + 22).FormulaR1C1 = "Seleccionar Esf" & ChrW(233) & "rica en E16" Cells(m + 51, n + 22).FormulaR1C1 = "En las celdas Y13 - AA15:" Cells(m + 52, n + 22).FormulaR1C1 = "Y13: 0,15 (Radio de la esfera: 15 cm) ( o utlizando punto: 0.15 seg" & ChrW(250) & "n su sistema de Excel)" Cells(m + 53, n + 22).FormulaR1C1 = "AA13: 0,15" Cells(m + 54, n + 22).FormulaR1C1 = "Y14: 0 (" & ChrW(193) & "ngulo phi inicial)" Cells(m + 55, n + 22).FormulaR1C1 = "AA14: 360 (" & ChrW(193) & "ngulo phi final en grados)" Cells(m + 56, n + 22).FormulaR1C1 = "Y15: 0 (" & ChrW(193) & "ngulo heta inicial)" Cells(m + 57, n + 22).FormulaR1C1 = "AA15: 180 (" & ChrW(193) & "ngulo theta final en grados)" Cells(m + 58, n + 21).FormulaR1C1 = " Paso 4: Discretizaci" & ChrW(243) & "n de la Superficie" Cells(m + 59, n + 21).FormulaR1C1 = "En celdas AC14 - AC15:" Cells(m + 60, n + 22).FormulaR1C1 = "AC14: 10 (Paso angular phi en grados)" Cells(m + 61, n + 22).FormulaR1C1 = "AC15: 10 (Paso angular theta en grados)" Cells(m + 62, n + 21).FormulaR1C1 = " Paso 5: F" & ChrW(243) & "rmulas de la Superficie (Y23 - AA23): no se modifican, ya est" & ChrW(225) & "n establecidas." Cells(m + 63, n + 21).FormulaR1C1 = " Paso 6: Activaci" & ChrW(243) & "n del C" & ChrW(225) & "lculo" Cells(m + 64, n + 22).FormulaR1C1 = " En celda E11: Seleccionar ""S" & ChrW(237) & """" Cells(m + 65, n + 22).FormulaR1C1 = "Oprimir cualquiera de los botones Ejecutar (ubicados en H11 hacia abajo)" Cells(m + 66, n + 21).FormulaR1C1 = " Resultado Esperado:" Cells(m + 66, n + 23).FormulaR1C1 = "En celda G10 deber" & ChrW(237) & "a aparecer aproximadamente: `113.0 N" & ChrW(183) & "m" & ChrW(178) & "/C`" Cells(m + 67, n + 21).FormulaR1C1 = "Verificaci" & ChrW(243) & "n te" & ChrW(243) & "rica usando Ley de Gauss:" Cells(m + 68, n + 22).FormulaR1C1 = "" & ChrW(934) & "_te" & ChrW(243) & "rico = Q/" & ChrW(949) & ChrW(8320) & " = (1.0 " & ChrW(215) & " 10" & ChrW(8315) & ChrW(8313) & " C) / (8.854 " & ChrW(215) & " 10" & ChrW(8315) & ChrW(185) & ChrW(178) & " C" & ChrW(178) & "/N" & ChrW(183) & "m" & ChrW(178) & ")" Cells(m + 69, n + 22).FormulaR1C1 = " = 113.0 N" & ChrW(183) & "m" & ChrW(178) & "/C" Cells(m + 70, n + 21).FormulaR1C1 = "El resultado del modelo (G10) debe coincidir con este valor te" & ChrW(243) & "rico, confirmando que:" Cells(m + 71, n + 22).FormulaR1C1 = " La superficie esf" & ChrW(233) & "rica encierra completamente la carga" Cells(m + 72, n + 22).FormulaR1C1 = " El c" & ChrW(225) & "lculo discreto converge al valor anal" & ChrW(237) & "tico" Cells(m + 73, n + 22).FormulaR1C1 = " La implementaci" & ChrW(243) & "n num" & ChrW(233) & "rica es correcta" Cells(m + 75, n + 21).FormulaR1C1 = " Variaci" & ChrW(243) & "n del Ejemplo: Superficie Parcial" Cells(m + 76, n + 22).FormulaR1C1 = "Configuraci" & ChrW(243) & "n de media esfera:" Cells(m + 77, n + 22).FormulaR1C1 = "Y15: 90 (" & ChrW(193) & "ngulo theta inicial " & ChrW(960) & "/2, solo hemisferio superior)" Cells(m + 78, n + 22).FormulaR1C1 = "AA15: 170 (" & ChrW(193) & "ngulo theta final " & ChrW(960) & ", solo hemisferio superior. Con 180 se sobrepasar" & ChrW(237) & "a debido al " & ChrW(916) & "S)" Cells(m + 79, n + 22).FormulaR1C1 = "Resultado esperado en G10: Aproximadamente `56.5 N" & ChrW(183) & "m" & ChrW(178) & "/C` (mitad del flujo total)" Cells(m + 80, n + 22).FormulaR1C1 = "Importante: verificar que el n" & ChrW(250) & "mero de vectores en A8 sea aprox. la mitad que para toda la esfera," Cells(m + 81, n + 22).FormulaR1C1 = "si no lo es, regular el " & ChrW(225) & "ngulo en AA15 hasta lograrlo." Cells(m + 82, n + 20).FormulaR1C1 = "EJEMPLO AVANZADO: L" & ChrW(205) & "NEA CARGADA" Cells(m + 83, n + 22).FormulaR1C1 = "1. Presionar ""Borrar Datos""" Cells(m + 84, n + 22).FormulaR1C1 = "2. En B2 ingresar `10` (10 segmentos)" Cells(m + 85, n + 22).FormulaR1C1 = "3. Presionar +OBJ para crear l" & ChrW(237) & "nea cargada" Cells(m + 86, n + 22).FormulaR1C1 = "4. Configurar par" & ChrW(225) & "metros en G33 - G37:" Cells(m + 87, n + 22).FormulaR1C1 = " G33: 90 (inclinaci" & ChrW(243) & "n azimutal en grados)" Cells(m + 88, n + 22).FormulaR1C1 = " G34: 90 (inclinaci" & ChrW(243) & "n polar en grados)" Cells(m + 89, n + 22).FormulaR1C1 = " G36: 20 (curvatura azimutal en grados)" Cells(m + 90, n + 22).FormulaR1C1 = " G37: 0 (sin curvatura polar)" Cells(m + 91, n + 21).FormulaR1C1 = "Este ejemplo demostrar" & ChrW(237) & "a el c" & ChrW(225) & "lculo de flujo para distribuciones de carga m" & ChrW(225) & "s complejas." Cells(m + 93, n + 20).FormulaR1C1 = "OBSERVACI" & ChrW(211) & "N IMPORTANTE:" Cells(m + 94, n + 21).FormulaR1C1 = " Tenga en cuenta el divisor de decimales en su sistema (coma o punto) para un correcto funcionamiento." For i = 1 To 3000 ' formulas to calculate E dS in each point Cells(16 + i, n + 31).FormulaR1C1 = "=RC[7]*RC[17]+RC[8]*RC[18]+RC[9]*RC[19]" Next i Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub