Sub Project_28_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 28_Biot-Savart Law_EN ' Updated: 7/03/25 ' Created by: Ariel R. Becerra (22/11/23) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 28 in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it. ' Note 2: This code will be integrated into the main code (into the VBA editor) to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column. ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. ' Step 4. Open the VBA editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open. ' Step 5. On the left, in the project explorer, select a non full module (or add a new one). ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one). ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! ' Visit www.sciensolar.com for news and updates of © ScienSolar. Cells(m1 - 1, n1 + 2).FormulaR1C1 = "2" Cells(m1 - 1, n1).Value = "" Cells(m1 + 0, n1 + 0).FormulaR1C1 = "=IF(R[-1]C=""ENTIRE"",15,51)" Cells(m1 + 0, n1 + 1).FormulaR1C1 = "=IF(R[-1]C[-1]=""ENTIRE"",27*R[38]C[4]+23,77)" Cells(m1 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "850" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "8" Cells(m1 + 0, n1 + 8).FormulaR1C1 = "Ariel R. Becerra (22/11/23)" Cells(m1 + 1, n1 + 1).FormulaR1C1 = "A16" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "400" 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 = "45" Cells(m1 + 2, n1 + 0).FormulaR1C1 = "t = 0,0546875 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "1000" 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 = "B" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "250" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "375" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt As String HELPtxt = "CAMPO MAGN" & ChrW(201) & "TICO DE UNA CORRIENTE" & Chr(10) & _ " ææ æ El objetivo de este modelo es comprender la ley de Biot-Savart y calcular el campo magn" & ChrW(233) & "tico de un segmento de corriente de forma casi arbitraria" & Chr(10) & _ " ææ æ El campo magn" & ChrW(233) & "tico dB de un elemento infinitesimal de corriente IdL en cualquier punto del espacio a una distancia r del elemento de corriente se calcula por la f" & ChrW(243) & "rmula de Biot-Savart:" & Chr(10) & _ " ææ æ dB=K[IdL x r]/r^3," & Chr(10) & _ " ææ æ en donde K es una constante que depende del sistema de unidades. El campo resultante de varios elementos de corriente es la suma vectorial de cada uno de los campos. En el presente modelo se analiza inicialmente el campo de 6 elementos de corriente y luego el usuario le puede agregar m" & ChrW(225) & "s elementos a la corriente y cambiar su forma con ayuda de los " & ChrW(225) & "ngulos phi y theta. Las coordenadas del campo resultante B se ven en las celdas A12=Bx, B12=By y C12=Bz y su magnitud en G11 (cuando el valor de E9=0)." & Chr(10) & _ " ææ æ La posici" & ChrW(243) & "n inicial de la corriente y su orientaci" & ChrW(243) & "n se pueden modificar en las celdas E22, E23, E24 y E25, la magnitud de la corriente y su signo enæ E26,æ y la constante K de la ley de Biot-Savart en E27.æ La forma del alambre se puede moldear cambiando el " & ChrW(225) & "ngulo inicial phi en E29 y su incremento en F29 (cada dL se va orientando progresivamente con este incremento), lo mismo para el " & ChrW(225) & "ngulo theta en E30 y su incremento en F30." & Chr(10) & _ " ææ æ Para visualizar u ocultar los radios de cada dLæ utilice la celda E16 con valores de 0 a 1: E16=0 visible y E16=1 invisible; lo mismo con la celda E17 para losæ vectores campo magn" & ChrW(233) & "tico de cada dB." & Chr(10) & _ " ææ æ Para visualizar el campo magn" & ChrW(233) & "tico en una regi" & ChrW(243) & "n del espacio en diferentes tipos de coordenadas utilice la celda E9: E9=0 para calcular el campo en un punto espec" & ChrW(237) & "fico del espacio, indicando el punto del espacio en las celdas A11, B11 y C11. Ingrese E9=1 para visualizar el campo en coordenadas cartesianas, y los par" & ChrW(225) & "metros de visualizaci" & ChrW(243) & "n se modifican en la cadena de valores de E10. Ingrese E9=2 para visualizar en coordenadas cil" & ChrW(237) & "ndricas, y sus par" & ChrW(225) & "metros en E11. Ingrese E9=3 para coordenadas esf" & ChrW(233) & "ricas, cambiando sus par" & ChrW(225) & "metros en E12." & Chr(10) & _ " AGREGAR NUEVOS ELEMENTOS dL:" & Chr(10) & _ " ææ æ Para agregar un elemento m" & ChrW(225) & "s de corriente, copie las filas enteras de la hoja desde la 51 hasta la 77 y p" & ChrW(233) & "guelas despu" & ChrW(233) & "s de la " & ChrW(250) & "ltima fila. Oprima cualquier bot" & ChrW(243) & "n de visualizaci" & ChrW(243) & "n para ver resultados, la cantidad de elementos de corriente se muestra en la celda E19. Repita este procedimiento para agregar m" & ChrW(225) & "s dL a la corriente. Entre m" & ChrW(225) & "s elementos dL tenga la corriente su campo magn" & ChrW(233) & "tico resultante se va pareciendo m" & ChrW(225) & "s al real. La longitud de cada dL se puede modificar en E28.æ" & Chr(10) & _ " Por ejemplo para dibujar una espira con corriente con 36 elementos dL, copie desde la fila 51 hasta la 77 y pegue al final 30 veces hasta que E19 tenga el valor de 36, luego coloque theta E30 =90 e incremente phi F29=10. Oprima XYZ. Los elementos van reorient" & ChrW(225) & "ndose de 10 en 10 grados hasta que los 36 elementos forman un c" & ChrW(237) & "rculo.æ" & Chr(10) & _ " AGREGAR UNA NUEVA DISTRIBUCI" & ChrW(211) & "N:æ" & Chr(10) & _ " Se puede agregar una nueva distribuci" & ChrW(243) & "n independiente (por ejemplo otro c" & ChrW(237) & "rculo con corriente). Para ello haga una copia de la hoja (click derecho sobre el nombre de la hoja, luego seleccione mover o copiar, y luego crear una copia). Vaya a la hoja copiada, seleccione las filas completas desde la 15 hasta la " & ChrW(250) & "ltima, corte y vaya a la hoja original y pegue despu" & ChrW(233) & "s de la " & ChrW(250) & "ltima fila. Elimine la hoja copiada y en la hoja original corrija las f" & ChrW(243) & "rmulas que tienen direcci" & ChrW(243) & "n hacia la hoja borrada, estas on el n" & ChrW(250) & "mero del vector a y su posici" & ChrW(243) & "n.æ" & Chr(10) & _ " " On Error Resume Next Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 14 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "B" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "250" Cells(m + 3, n + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 = "375" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 2).FormulaR1C1 = "Magnetic field of a current" Cells(m + 4, n + 12).FormulaR1C1 = "BIOT-SAVART LAW" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCTIONS" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0.3" Cells(m + 5, n + 12).FormulaR1C1 = "MAGNETIC FIELD OF CURRENTS" Cells(m + 6, n + -1).FormulaR1C1 = "=SUMIFS(C[2],C[3],""B*"")" Cells(m + 6, n + 0).FormulaR1C1 = "=SUMIFS(C[-1],C[2],""B*"")" Cells(m + 6, n + 1).FormulaR1C1 = "=SUMIFS(C[-1],C[1],""B*"")" Cells(m + 6, n + 4).FormulaR1C1 = "RESULT (Do not modify):" 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 = "Field magnitude:" Cells(m + 7, n + 4).FormulaR1C1 = "=IF(R[-3]C[-3]="""","" |B| ="","""")" Cells(m + 7, n + 5).FormulaR1C1 = "=IF(R[-3]C[-4]="""",SQRT(R[2]C[-6]^2+R[2]C[-5]^2+R[2]C[-4]^2),"""")" Cells(m + 8, n + -1).FormulaR1C1 = "0.1" Cells(m + 8, n + 0).FormulaR1C1 = "0.1" Cells(m + 8, n + 1).FormulaR1C1 = "0.1" Cells(m + 8, n + 2).FormulaR1C1 = "Number of elements dL:" Cells(m + 8, n + 21).FormulaR1C1 = "MAGNETIC FIELD OF A CURRENT" 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 + 2).FormulaR1C1 = "Total length:" Cells(m + 9, n + 21).FormulaR1C1 = "The goal of this model is to understand the Biot-Savart law and calculate the magnetic field " 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 + 21).FormulaR1C1 = "of a current segment in an almost arbitrary way." Cells(m + 11, n + -1).FormulaR1C1 = "2" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 19).FormulaR1C1 = "=IF(R[-1]C[-19]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + 21).FormulaR1C1 = "The magnetic field dB of an infinitesimal current element IdL at any point in space at a distance r " Cells(m + 3, n + 1).Interior.Color = "13434777" 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 = "a" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 13 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "a" Cells(m + 3, n + 4).FormulaR1C1 = "INITIAL DATA:" Cells(m + 3, n + 21).FormulaR1C1 = "from the current element is calculated by the Biot-Savart formula:" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "(insert your data)" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "4" Cells(m + 5, n + 1).FormulaR1C1 = "0.3" Cells(m + 5, n + 4).FormulaR1C1 = " I =" Cells(m + 5, n + 5).FormulaR1C1 = "80000" Cells(m + 5, n + 27).FormulaR1C1 = "(Eq-28-1)" Cells(m + 6, n + -1).FormulaR1C1 = "=R[-7]C-R[1]C" Cells(m + 6, n + 0).FormulaR1C1 = "=R[-7]C-R[1]C" Cells(m + 6, n + 1).FormulaR1C1 = "=R[-7]C-R[1]C" Cells(m + 6, n + 4).FormulaR1C1 = " dL =" Cells(m + 6, n + 5).FormulaR1C1 = "0.03" Cells(m + 7, n + -1).FormulaR1C1 = "=R[3]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[4]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[5]C[4]" Cells(m + 7, n + 4).FormulaR1C1 = " K =" Cells(m + 7, n + 5).FormulaR1C1 = "0.0000001" Cells(m + 8, n + 21).FormulaR1C1 = "where K is a constant that depends on the system of units. The resulting field of several current " Cells(m + 9, n + -1).FormulaR1C1 = "=R[4]C[6]*COS(RADIANS(R[6]C[6]))*SIN(RADIANS(R[7]C[6]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R[4]C[5]*SIN(RADIANS(R[6]C[5]))*SIN(RADIANS(R[7]C[5]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R[4]C[4]*COS(RADIANS(R[7]C[4]))" Cells(m + 9, n + 4).FormulaR1C1 = "Origin:" Cells(m + 9, n + 21).FormulaR1C1 = "elements is the vector sum of each of the fields, that is, for n current elements the resulting field is" 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 = " x_o =" Cells(m + 10, n + 5).FormulaR1C1 = "0.06" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " y_o =" Cells(m + 11, n + 5).FormulaR1C1 = "0.06" Cells(m + 3, n + 1).Interior.Color = "16777215" 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 = "dL" Call AddNewVector End If ' vector ends If m = m1 + 18 Then ' vector 12 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "dL" Cells(m + 3, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 4).FormulaR1C1 = " z_o =" Cells(m + 3, n + 5).FormulaR1C1 = "0" Cells(m + 3, n + 27).FormulaR1C1 = "(Eq-28-2)" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = " r_o" Cells(m + 4, n + 5).FormulaR1C1 = "0" 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 = "Inclination:" Cells(m + 5, n + 21).FormulaR1C1 = "When the number of elements tends to infinity and the length of each of them tends to zero, this " Cells(m + 6, n + 4).FormulaR1C1 = " phi" Cells(m + 6, n + 5).FormulaR1C1 = "0" Cells(m + 6, n + 21).FormulaR1C1 = "sum becomes an integral. In the present model, however, finite magnitudes and quantities " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C+R[-7]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C+R[-7]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C+R[-7]C" Cells(m + 7, n + 4).FormulaR1C1 = " theta" Cells(m + 7, n + 5).FormulaR1C1 = "0" Cells(m + 7, n + 21).FormulaR1C1 = "are used." Cells(m + 8, n + 4).FormulaR1C1 = "Flexion:" Cells(m + 8, n + 21).FormulaR1C1 = "Here the field of a few current elements is initially analyzed and then the reader can add more and " Cells(m + 9, n + -1).FormulaR1C1 = "=R18C7*COS(RADIANS(R27C7+R30C7*R[-6]C[2]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R18C7*SIN(RADIANS(R27C7+R30C7*R[-6]C[1]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R18C7*COS(RADIANS(R28C7+R31C7*R[-6]C))" Cells(m + 9, n + 4).FormulaR1C1 = "Azimuth:" Cells(m + 9, n + 5).FormulaR1C1 = "0" Cells(m + 9, n + 21).FormulaR1C1 = "change their shape with the help of the bending angles. The coordinates of the resulting " Cells(m + 10, n + -1).FormulaR1C1 = "=IF(R[-14]C[6]<0,3,1)" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "Elevation:" Cells(m + 10, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + 21).FormulaR1C1 = "field B are seen in cells A12=Bx, B12=By and C12=Bz and its magnitude in G10." Cells(m + 11, n + -1).FormulaR1C1 = "=IF(R[-15]C[6]>0,3,1)" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "2" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "The initial position of the wire and its orientation can be modified in cells G22, G23, G24 and G25, its " Cells(m + 3, n + 1).Interior.Color = "6740479" 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 = "r" Call AddNewVector End If ' vector ends If m = m1 + 27 Then ' vector 11 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "r" Cells(m + 3, n + 4).FormulaR1C1 = "DISPLAY:" Cells(m + 3, n + 21).FormulaR1C1 = "inclination in G27 and G28, its bending along the azimuth in G30 and bending with elevation angle " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "in G31. The magnitude of the current and its sign are changed in G17, the Biot-Savart law constant " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "2" Cells(m + 5, n + 1).FormulaR1C1 = "=R36C7" Cells(m + 5, n + 4).FormulaR1C1 = "Show / hide:" Cells(m + 5, n + 21).FormulaR1C1 = "K in G19, and the length of each current element is set in cell G18. To display or hide the radii of " Cells(m + 6, n + 0).FormulaR1C1 = "=R19C7*R17C7/(POWER(R[3]C[-1]^2+R[3]C^2+R[3]C[1]^2,3/2))" Cells(m + 6, n + 4).FormulaR1C1 = "radius:" Cells(m + 6, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 21).FormulaR1C1 = "each dLæ use cell G37 with values from 0 to 1: G37 =0 visible and G37 =1 invisible; the same with " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 4).FormulaR1C1 = "dB:" Cells(m + 7, n + 5).FormulaR1C1 = "1" Cells(m + 7, n + 21).FormulaR1C1 = "cell G38 for the magnetic field vectors of each dB. To display the magnetic field in a region of " Cells(m + 8, n + -1).FormulaR1C1 = "B fiel radious" Cells(m + 8, n + 21).FormulaR1C1 = "space in different types of coordinates use cell C7: C7 empty to calculate the field at a specific " Cells(m + 9, n + -1).FormulaR1C1 = "=R18C1-R21C1" Cells(m + 9, n + 0).FormulaR1C1 = "=R18C2-R21C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R18C3-R21C3" Cells(m + 9, n + 4).FormulaR1C1 = "Qty of dL:" Cells(m + 9, n + 21).FormulaR1C1 = "point in space, indicating the point in space in cells A11, B11 and C11. Enter C7 =o to display the " 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 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "field in Cartesian coordinates, and the display parameters are modified to the value string of C7. " Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " n =" Cells(m + 11, n + 5).FormulaR1C1 = "=COUNTIF(C[-3],""B""&R[2]C&""_*"")" Cells(m + 11, n + 21).FormulaR1C1 = "Enter C7 =c to display in cylindrical coordinates and its parameters. Enter C7 =s for spherical " Cells(m + 3, n + 1).Interior.Color = "11826222" 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 + 36 Then ' vector 10 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 4).FormulaR1C1 = " L =" Cells(m + 3, n + 5).FormulaR1C1 = "=R[-1]C*R[-24]C" Cells(m + 3, n + 21).FormulaR1C1 = "coordinates, changing its parameters in the same cell after pressing the XYZ button." Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "Wire No." Cells(m + 4, n + 5).FormulaR1C1 = "1" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "2" Cells(m + 5, n + 1).FormulaR1C1 = "=R37C7" Cells(m + 5, n + 21).FormulaR1C1 = "ADD NEW dL ELEMENTS:" Cells(m + 6, n + 21).FormulaR1C1 = "To add one more current element press the +OBJ button and to remove a current element use the - OBJ " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 21).FormulaR1C1 = "button. Press any display button to view results, the number of current elements is displayed in cell G11. " Cells(m + 8, n + -1).FormulaR1C1 = "Field dB" Cells(m + 8, n + 21).FormulaR1C1 = "The more dL elements the current has, the more its resulting magnetic field resembles the real one. " Cells(m + 9, n + -1).FormulaR1C1 = "=(R[-18]C[1]*R[-9]C[2]-R[-18]C[2]*R[-9]C[1])*R[-12]C[1]" Cells(m + 9, n + 0).FormulaR1C1 = "=(-R[-18]C[-1]*R[-9]C[1]+R[-18]C[1]*R[-9]C[-1])*R[-12]C" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-18]C[-2]*R[-9]C[-1]-R[-18]C[-1]*R[-9]C[-2])*R[-12]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=""B""&R43C7&""_""&R[-24]C[-1]" Cells(m + 9, n + 21).FormulaR1C1 = "To add or remove several elements at the same time, indicate in cell B2 the number of elements before " 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 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "pressing the respective button; this number must be an integer." Cells(m + 11, n + -1).FormulaR1C1 = "2" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "255" 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 + 45 Then ' vector 9 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-27]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "ADD A NEW CURRENT:" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "The model allows cloning wires with currents and changing the parameters of the cloned current. " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 21).FormulaR1C1 = "To do this, enter B2=ENTIRE, B3=15 and in C3 write the number of the last non-empty and uncolored " Cells(m + 6, n + 21).FormulaR1C1 = "row of column A, which depends on how many elements the original current has. Press the +OBJ " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 21).FormulaR1C1 = "button. The new current will be added, whose parameters can be observed and modified in " Cells(m + 8, n + 0).FormulaR1C1 = "dL" Cells(m + 8, n + 21).FormulaR1C1 = "column G at the end of the sheet. In the cell next to ""Wire No."" type the consecutive number for " Cells(m + 9, n + -1).FormulaR1C1 = "=R18C7*COS(RADIANS(R27C7+R30C7*R[-6]C[2]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R18C7*SIN(RADIANS(R27C7+R30C7*R[-6]C[1]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R18C7*COS(RADIANS(R28C7+R31C7*R[-6]C))" Cells(m + 9, n + 21).FormulaR1C1 = "the new wire. Change the position and parameters of the new wire so that it can be observed in" 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 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = " the coordinate system. To add a second current, keeping the values __of B2, B3 and C3 press +OBJ. " Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "Likewise to eliminate a cloned object, with the values __of B2, B3 and C3 already set simply press -OBJ." Cells(m + 3, n + 1).Interior.Color = "6740479" 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 + 54 Then ' vector 8 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "Examples" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R36C7" Cells(m + 5, n + 21).FormulaR1C1 = "1. Study the magnetic field of a circular loop of radius 57.3 mm with a current of 2 A." Cells(m + 6, n + 0).FormulaR1C1 = "=R19C7*R17C7/(POWER(R[3]C[-1]^2+R[3]C^2+R[3]C[1]^2,3/2))" Cells(m + 6, n + 21).FormulaR1C1 = "Solution:" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 21).FormulaR1C1 = "First we must build the loop, to do this we will decide that we are going to build it with 36 current elements " Cells(m + 8, n + 0).FormulaR1C1 = "r" Cells(m + 8, n + 21).FormulaR1C1 = "and we are going to distribute them with an azimuth of 10 degrees each time, that is, 36x10 = 360 " Cells(m + 9, n + -1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 21).FormulaR1C1 = "degrees to close the loop. The length of the circumference is 2Pi x radius = L = 2x3.1416x57.3 = 360, " Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "that is, each element must have an approximate length of 10 mm." Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "Insert the following initial values:" Cells(m + 3, n + 1).Interior.Color = "11826222" 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 + 63 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 22).FormulaR1C1 = "K:" Cells(m + 4, n + 23).FormulaR1C1 = "G19=" Cells(m + 4, n + 24).FormulaR1C1 = "0.0000001" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R37C7" Cells(m + 5, n + 22).FormulaR1C1 = "dL:" Cells(m + 5, n + 23).FormulaR1C1 = "G18=" Cells(m + 5, n + 24).FormulaR1C1 = "0.01" Cells(m + 6, n + 22).FormulaR1C1 = "I:" Cells(m + 6, n + 23).FormulaR1C1 = "G17=" Cells(m + 6, n + 24).FormulaR1C1 = "2" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 22).FormulaR1C1 = "x_o:" Cells(m + 7, n + 23).FormulaR1C1 = "G22=" Cells(m + 7, n + 24).FormulaR1C1 = "0" Cells(m + 8, n + 0).FormulaR1C1 = "dB" Cells(m + 8, n + 22).FormulaR1C1 = "y_o:" Cells(m + 8, n + 23).FormulaR1C1 = "G23=" Cells(m + 8, n + 24).FormulaR1C1 = "0" Cells(m + 9, n + -1).FormulaR1C1 = "=(R[-18]C[1]*R[-9]C[2]-R[-18]C[2]*R[-9]C[1])*R[-12]C[1]" Cells(m + 9, n + 0).FormulaR1C1 = "=(-R[-18]C[-1]*R[-9]C[1]+R[-18]C[1]*R[-9]C[-1])*R[-12]C" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-18]C[-2]*R[-9]C[-1]-R[-18]C[-1]*R[-9]C[-2])*R[-12]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=""B""&R43C7&""_""&R[-24]C[-1]" Cells(m + 9, n + 22).FormulaR1C1 = "z_o:" Cells(m + 9, n + 23).FormulaR1C1 = "G24=" Cells(m + 9, n + 24).FormulaR1C1 = "0" Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 22).FormulaR1C1 = "r_o " Cells(m + 10, n + 23).FormulaR1C1 = "G25=" Cells(m + 10, n + 24).FormulaR1C1 = "0" Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 22).FormulaR1C1 = "Inclination:" Cells(m + 3, n + 1).Interior.Color = "255" 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 + 72 Then ' vector 6 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-27]C+1" Cells(m + 3, n + 22).FormulaR1C1 = "Phi:" Cells(m + 3, n + 23).FormulaR1C1 = "G27=" Cells(m + 3, n + 24).FormulaR1C1 = "0" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 22).FormulaR1C1 = "theta:" Cells(m + 4, n + 23).FormulaR1C1 = "G28=" Cells(m + 4, n + 24).FormulaR1C1 = "90" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 22).FormulaR1C1 = "Flexion:" Cells(m + 6, n + 22).FormulaR1C1 = "Azimuth:" Cells(m + 6, n + 23).FormulaR1C1 = "G30=" Cells(m + 6, n + 24).FormulaR1C1 = "10" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 22).FormulaR1C1 = "Elevation:" Cells(m + 7, n + 23).FormulaR1C1 = "G31=" Cells(m + 7, n + 24).FormulaR1C1 = "0" Cells(m + 8, n + 0).FormulaR1C1 = "dL" Cells(m + 8, n + 22).FormulaR1C1 = "Show:" Cells(m + 9, n + -1).FormulaR1C1 = "=R18C7*COS(RADIANS(R27C7+R30C7*R[-6]C[2]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R18C7*SIN(RADIANS(R27C7+R30C7*R[-6]C[1]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R18C7*COS(RADIANS(R28C7+R31C7*R[-6]C))" Cells(m + 9, n + 22).FormulaR1C1 = "radii:" Cells(m + 9, n + 23).FormulaR1C1 = "G36=" Cells(m + 9, n + 24).FormulaR1C1 = "0" 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 + 22).FormulaR1C1 = "dB:" Cells(m + 10, n + 23).FormulaR1C1 = "G37=" Cells(m + 10, n + 24).FormulaR1C1 = "1" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 22).FormulaR1C1 = "Coordinate type:" Cells(m + 3, n + 1).Interior.Color = "6740479" 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 + 81 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 22).FormulaR1C1 = "Point:" Cells(m + 3, n + 23).FormulaR1C1 = "C7=" Cells(m + 3, n + 24).FormulaR1C1 = "Empty" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 22).FormulaR1C1 = "Field observation point:" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R36C7" Cells(m + 5, n + 22).FormulaR1C1 = "x=" Cells(m + 5, n + 23).FormulaR1C1 = "A11=" Cells(m + 5, n + 24).FormulaR1C1 = "0" Cells(m + 6, n + 0).FormulaR1C1 = "=R19C7*R17C7/(POWER(R[3]C[-1]^2+R[3]C^2+R[3]C[1]^2,3/2))" Cells(m + 6, n + 22).FormulaR1C1 = "y=" Cells(m + 6, n + 23).FormulaR1C1 = "B11=" Cells(m + 6, n + 24).FormulaR1C1 = "0.057" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 22).FormulaR1C1 = "z=" Cells(m + 7, n + 23).FormulaR1C1 = "C11=" Cells(m + 7, n + 24).FormulaR1C1 = "0" Cells(m + 8, n + 0).FormulaR1C1 = "r" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 21).FormulaR1C1 = "To add the 36 current elements, check G11 for the existing quantity; if G11 =4, 32 more must be added. " Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 21).FormulaR1C1 = "Enter B2=32 and press +OBJ, wait a moment for Excel to execute the command. The loop will " Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 21).FormulaR1C1 = "appear in the XY plane and touching the coordinate origin. Now analyze different points for " Cells(m + 3, n + 1).Interior.Color = "11826222" 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 + 90 Then ' vector 4 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "the field by modifying the values in A11, B11, C11. To hide the radius vectors, G36=1. If you want " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "to center the loop, insert G23 = - 0,057." Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R37C7" Cells(m + 6, n + 21).FormulaR1C1 = "To view the field in the entire space, set C7=o and wait a few seconds or minutes for Excel " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 21).FormulaR1C1 = "to execute the command. The field configuration in a certain region of space will appear. To view the " Cells(m + 8, n + 0).FormulaR1C1 = "dB" Cells(m + 8, n + 21).FormulaR1C1 = "field in cylindrical coordinates change the value to C7=c and finally C7 must be empty to return to the initial " Cells(m + 9, n + -1).FormulaR1C1 = "=(R[-18]C[1]*R[-9]C[2]-R[-18]C[2]*R[-9]C[1])*R[-12]C[1]" Cells(m + 9, n + 0).FormulaR1C1 = "=(-R[-18]C[-1]*R[-9]C[1]+R[-18]C[1]*R[-9]C[-1])*R[-12]C" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-18]C[-2]*R[-9]C[-1]-R[-18]C[-1]*R[-9]C[-2])*R[-12]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=""B""&R43C7&""_""&R[-24]C[-1]" Cells(m + 9, n + 21).FormulaR1C1 = "single vector view." Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "2. Study the magnetic field of a spiral." Cells(m + 3, n + 1).Interior.Color = "255" 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 + 99 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-27]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "Solution:" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "In the previous problem set the Elevation G31 = -0.1 for the spiral to advance upwards and G30 = 20 " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 21).FormulaR1C1 = "to make the same 36 elements for two turns. Due to the increase in azimuth angle, the radius will be " Cells(m + 6, n + 21).FormulaR1C1 = "reduced. In A11, B11, C11 modify the observation point (check that C7 is empty)." Cells(m + 7, n + -1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-27]C+R[-25]C" Cells(m + 8, n + 0).FormulaR1C1 = "dL" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "Exercises:" Cells(m + 9, n + -1).FormulaR1C1 = "=R18C7*COS(RADIANS(R27C7+R30C7*R[-6]C[2]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 = "=R18C7*SIN(RADIANS(R27C7+R30C7*R[-6]C[1]))*SIN(RADIANS(R28C7+R31C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 = "=R18C7*COS(RADIANS(R28C7+R31C7*R[-6]C))" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" 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 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "1. Build the model of the magnetic field of a rectilinear current." Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "2. Build the model for a semicircle-shaped current." Cells(m + 3, n + 1).Interior.Color = "6740479" 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 + 108 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "3. Build a model for two currents: one circular and one rectilinear." Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R36C7" Cells(m + 6, n + 0).FormulaR1C1 = "=R19C7*R17C7/(POWER(R[3]C[-1]^2+R[3]C^2+R[3]C[1]^2,3/2))" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 8, n + 0).FormulaR1C1 = "r" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-27]C-R[-36]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "11826222" 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 + 117 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=R[-27]C" Cells(m + 5, n + 1).FormulaR1C1 = "=R37C7" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-7]C+R[-9]C" Cells(m + 8, n + 0).FormulaR1C1 = "dB" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=(R[-18]C[1]*R[-9]C[2]-R[-18]C[2]*R[-9]C[1])*R[-12]C[1]" Cells(m + 9, n + 0).FormulaR1C1 = "=(-R[-18]C[-1]*R[-9]C[1]+R[-18]C[1]*R[-9]C[-1])*R[-12]C" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-18]C[-2]*R[-9]C[-1]-R[-18]C[-1]*R[-9]C[-2])*R[-12]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=""B""&R43C7&""_""&R[-24]C[-1]" Cells(m + 10, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + -1).FormulaR1C1 = "=R[-27]C" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-27]C" Cells(m + 3, n + 1).Interior.Color = "255" 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 = 14 End If ' vector ends If m = m1 + 117 Then Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub