Sub Project_29_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 29_Charge distributions_EN ' Updated: 7/03/25 ' Created by: Ariel R. Becerra (21/11/23) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 29 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 = "1" Cells(m1 - 1, n1).Value = "" Cells(m1 + 0, n1 + 0).FormulaR1C1 = "=IF(R[-1]C=""ENTIRE"",15,33)" Cells(m1 + 0, n1 + 1).FormulaR1C1 = "=IF(R[-1]C[-1]=""ENTIRE"",18*R[45]C[4]+14,50)" 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 (21/11/23)" 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,578125 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "1" 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 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "200" 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 = "CAMPO DE UN CUADRUPOLO EL" & ChrW(201) & "CTRICO" & Chr(10) & _ " (See english version at the end)" & Chr(10) & _ " Un cuadrupolo el" & ChrW(233) & "ctrico se puede definir como el conjunto de cuatro cargas puntuales q distribuidas en el espacio. La forma m" & ChrW(225) & "s sencilla de un cuadrupolo son cuatro cargas distribuidas en los v" & ChrW(233) & "rtices de un cuadrado. Para hallar el campo el" & ChrW(233) & "ctrico de un cuadrupolo en cualquier punto del espacio, se aplica el principio de superposici" & ChrW(243) & "n, es decir, en cada punto del espacio el campo el" & ChrW(233) & "ctrico del dipolo es la suma vectorial de los campos el" & ChrW(233) & "ctricos de las cuatro cargas por aparte: " & Chr(10) & _ " E = E1 + E2 + E3 + E4, E1 = k q1 /r1^2, E2 = k q2 /r2^2, E3 = k q3 /r3^2, E4 = k q4 /r4^2 ." & Chr(10) & _ " En las celdas A84, B84 y C84 est" & ChrW(225) & "n las componentes para el campo resultante de las cuatro cargas cargas. En las celdas A10, B10 y C210 se introducen las coordenadas en el espacio en donde se ubica la primera carga y en las celdas A21, B21, C21 est" & ChrW(225) & "n ubicadaa las ecuaciones para calcular el campo el" & ChrW(233) & "ctrico de la primera carga: " & Chr(10) & _ " E1x= k q1(x1" & ChrW(233) & "x01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/2)" & Chr(10) & _ " E1y = k q1(y1" & ChrW(233) & "y01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/)2 " & Chr(10) & _ " E1z= k q1(z1" & ChrW(233) & "z01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/2)." & Chr(10) & _ " De manera similar en A28, B28, C28 se introduce la posici[on de la segunda carga y su campo en A39, B39, C39; en A46, B46, C46 la posici" & ChrW(243) & "n de la tercera carga y su campo en A57, B57, C57, finalmente en A64, B64, C64 la posici" & ChrW(243) & "n de la tercera carga y su campo en A75, B75, C75. " & Chr(10) & _ " Modifique la magnitud de las cargas y su signo en las celdas C6, C24, C42 y C60, as" & ChrW(237) & " como el color de su apariencia. Para calcular el campo el" & ChrW(233) & "ctrico en cualquier punto del espacio, introduzca las coordenadas del punto en A83, B83, C83 y oprima cualquier bot" & ChrW(243) & "n de coordenadas. " & Chr(10) & _ " La configuraci" & ChrW(243) & "n espacial del campo se puede visualizar en diferentes tipos de coordenadas utilizando la celda C79. Para ver el campo en coordenadas esf" & ChrW(233) & "ricas coloque C79=s, en cil" & ChrW(237) & "ndricas C79=c y en cartesianas C79=o y oprima cualquier bot" & ChrW(243) & "n de coordenadas. Modifique a conveniencia los par" & ChrW(225) & "metros del campo en la cadena que aparece en esta misma celda. " & Chr(10) & _ " Para visdualizar el campo el" & ChrW(233) & "ctrico resultante con mayor resoluci" & ChrW(243) & "n, en la celda C43 modifique entre los primeros par" & ChrW(233) & "ntesis cuadrados el valor, poniendo uno m" & ChrW(225) & "s peque" & ChrW(233) & "o, por ejemplo o[0,5]; entre m" & ChrW(225) & " peque" & ChrW(233) & "o sea el valor, mejor ser" & ChrW(225) & " la resoluci" & ChrW(243) & "n pero tardar" & ChrW(225) & " m" & ChrW(225) & "s tiempo en renderizar. Para ver de nuevo los vectores campo solamente en un punto en particular, borre el contenido del la celda C43 y escriba las coordenadas en donde desee ver el campo en las celdas en A83, B83, C83, por ejemplo A47=0, B47=0, C47=3. " & Chr(10) & _ " (ENGLISH)" & Chr(10) & _ " FIELD OF AN ELECTRICAL QUADRUPOLE" & Chr(10) & _ " An electric quadrupole can be defined as the set of four point charges q distributed in space. The simplest form of a quadrupole is four charges distributed at the vertices of a square. To find the electric field of a quadrupole at any point in space, the superposition principle is applied, that is, at each point in space the electric field of the dipole is the vector sum of the electric fields of the four charges separately:" & Chr(10) & _ " E = E1 + E2 + E3 + E4, E1 = k q1 /r1^2, E2 = k q2 /r2^2, E3 = k q3 /r3^2, E4 = k q4 /r4^2 ." & Chr(10) & _ " In cells A84, B84 and C84 are the components of the field resulting from the four charges. In cells A10, B10 and C210 the coordinates in space where the first charge is located are entered and in cells A21, B21, C21 the equations are located to calculate the electric field of the first charge:" & Chr(10) & _ " E1x= k q1(x1" & ChrW(233) & "x01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/2)" & Chr(10) & _ " E1y = k q1(y1" & ChrW(233) & "y01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/)2" & Chr(10) & _ " E1z= k q1(z1" & ChrW(233) & "z01)/((x1 " & ChrW(233) & " x01)^2 + (y1 " & ChrW(233) & " y01)^2 + (z1 " & ChrW(233) & " z01)^2)^(3/2)." & Chr(10) & _ " Similarly in A28, B28, C28 the position of the second charge and its field are entered in A39, B39, C39; in A46, B46, C46 the position of the third charge and its field in A57, B57, C57, finally in A64, B64, C64 the position of the third charge and its field in A75, B75, C75." & Chr(10) & _ " Change the magnitude of the charges and their sign in cells C6, C24, C42 and C60, as well as the color of their appearance. To calculate the electric field at any point in space, enter the coordinates of the point at A83, B83, C83 and press any coordinate button." & Chr(10) & _ " The spatial configuration of the field can be displayed in different types of coordinates using cell C79. To see the field in spherical coordinates, place C79=s, in cylindrical C79=c and in Cartesian C79=o and press any coordinate button. Modify the field parameters in the string that appears in this very cell. To visualize the resulting electric field with greater resolution, in cell C43 modify the value between the first brackets, putting a smaller one, for example o[0,5]; the smaller the value, the better the resolution, but it will take longer to render. To return to seeing the field vectors only at a particular point, delete the contents of cell C43 and type the coordinates where you want to see the field in cells A83, B83, C83, for example A47=0, B47=0, C47 =3." & Chr(10) & _ " " On Error Resume Next Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 11 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "E" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "200" Cells(m + 3, n + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 = "15" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 1).FormulaR1C1 = "=IF(R[34]C[4]=1,R[35]C[4],IF(R[34]C[4]=2,R[36]C[4],IF(R[34]C[4]=3,R[37]C[4],"""")))" Cells(m + 4, n + 2).FormulaR1C1 = "Electric field of charge distributions" Cells(m + 4, n + 12).FormulaR1C1 = "ELECTRIC FIELD OF A LINEAR CHARGE DISTRIBUTION" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCCIONS" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" 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 + 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 + 4).FormulaR1C1 = " |E| =" Cells(m + 7, n + 5).FormulaR1C1 = "=ROUND(SQRT(R[2]C[-6]^2+R[2]C[-5]^2+R[2]C[-4]^2),2)" Cells(m + 7, n + 21).FormulaR1C1 = "The simulation allows the electric field due to linear charge distributions in space to " Cells(m + 8, n + -1).FormulaR1C1 = "0" Cells(m + 8, n + 0).FormulaR1C1 = "57.3" Cells(m + 8, n + 1).FormulaR1C1 = "5" Cells(m + 8, n + 2).FormulaR1C1 = "<< --- Field Study Point P" Cells(m + 8, n + 21).FormulaR1C1 = "be calculated and visualized in three dimensions. The model starts with 5 charges forming a " 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 = " " Cells(m + 9, n + 21).FormulaR1C1 = "line, however you can add more charge elements dq and calculate the electric field of the system " 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 = "at any point in space. The procedure for adding more load items is described at the end." Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 1).Interior.Color = "5287936" 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 = "L1" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 10 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "=""L""&R[1]C[5]" Cells(m + 3, n + 1).FormulaR1C1 = "1" Cells(m + 3, n + 2).FormulaR1C1 = "=""<< --dq charge element""&RC[-3]/2" Cells(m + 3, n + 4).FormulaR1C1 = "Initial data" Cells(m + 3, n + 21).FormulaR1C1 = "The total field can be calculated by the superposition principle as the vector sum of each of the " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "Line No.:" Cells(m + 4, n + 5).FormulaR1C1 = "1" Cells(m + 4, n + 21).FormulaR1C1 = "fields generated by each load element at the point under study:" 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 = "Q_Total=" Cells(m + 5, n + 5).FormulaR1C1 = "50" Cells(m + 6, n + 4).FormulaR1C1 = "dL" Cells(m + 6, n + 5).FormulaR1C1 = "10" Cells(m + 6, n + 27).FormulaR1C1 = "(Eq-29-1)" 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 + 2).FormulaR1C1 = "=""<< -- Position of dq""&R[-4]C[-3]/2" Cells(m + 7, n + 4).FormulaR1C1 = "k=" Cells(m + 7, n + 5).FormulaR1C1 = "10000" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" 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 + 9, n + 4).FormulaR1C1 = "Origin:" Cells(m + 9, n + 21).FormulaR1C1 = "where each dE is established by Coulomb's law:" 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" 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" Cells(m + 11, n + 27).FormulaR1C1 = "(Eq-29-2)" 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 + 18 Then ' vector 9 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 4).FormulaR1C1 = " z_o =" Cells(m + 3, n + 5).FormulaR1C1 = "0" 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 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R34C7" Cells(m + 5, n + 4).FormulaR1C1 = "Inclination" Cells(m + 6, n + 4).FormulaR1C1 = "phi" Cells(m + 6, n + 5).FormulaR1C1 = "-5" Cells(m + 6, n + 21).FormulaR1C1 = "The constant k depends on the system of units and its value is entered in cell G19. These equations " 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 = "theta" Cells(m + 7, n + 5).FormulaR1C1 = "90" Cells(m + 7, n + 21).FormulaR1C1 = "are generated in the model for each charge element automatically, and the components of the " 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 + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "Bending:" Cells(m + 8, n + 21).FormulaR1C1 = "resulting field are observed in cells A12, B12 and C12." 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R16C7&""_""&R[-15]C[-3]/2" Cells(m + 9, n + 4).FormulaR1C1 = "Azimuth" Cells(m + 9, n + 5).FormulaR1C1 = "10" 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 = "Elevation" Cells(m + 10, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + 21).FormulaR1C1 = "When the number of elements tends to infinity and the length of each of them tends to zero, this " 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "sum becomes an integral. In the present model, however, finite magnitudes and quantities " Cells(m + 3, n + 1).Interior.Color = "9851952" 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 8 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-18]C+1" Cells(m + 3, n + 2).FormulaR1C1 = "=""<< -- Charge element dq""&RC[-3]/2" Cells(m + 3, n + 4).FormulaR1C1 = "Show E_i:" Cells(m + 3, n + 21).FormulaR1C1 = "are used. Here the field of some charge elements is initially analyzed and then the reader can add " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "YES = 0, NO = 1" Cells(m + 4, n + 5).FormulaR1C1 = "1" Cells(m + 4, n + 21).FormulaR1C1 = "more and change the line shape with the help of bending angles. The coordinates of the resulting " 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 + 21).FormulaR1C1 = "field E are seen in cells A12=Bx, B12=By and C12=Bz and its magnitude in G10. You can modify the " Cells(m + 6, n + 21).FormulaR1C1 = "initial position of the wire and its orientation in cells G22, G23 and G24, its inclination in G27 and G28, " Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 = "=""<< -- Position of dq""&R[-4]C[-3]/2" Cells(m + 7, n + 21).FormulaR1C1 = "its bending in azimuth in G30 and its bending with elevation angle in G31. The magnitude of the " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "COORDINATES:" Cells(m + 8, n + 21).FormulaR1C1 = "charge and its sign are changed in G17, the Coulomb's law constant k in G19, and the length of " 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 + 9, n + 21).FormulaR1C1 = "each charge element is set in cell G18. To show or hide the field vectors of each dq use " 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(R[1]C[1]=0,""Insert P(x,y,z) in A11, B11, C11"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "cell G34 with values from 0 to 1, G34 =0 visible and G34 =1 invisible. To display the electric field " 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 = "0, 1, 2 or 3:" Cells(m + 11, n + 5).FormulaR1C1 = "0" Cells(m + 11, n + 21).FormulaR1C1 = "in a region of space in different types of coordinates use cell G41: G41 =0 to calculate the field " 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 + 36 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 4).FormulaR1C1 = "=IF(R[-1]C[1]=1,"" 1- Cart.-->>"",""|"")" Cells(m + 3, n + 5).FormulaR1C1 = "=IF(R[-1]C=1,""o[40]x=[-200;200]o2[10]y=[-200;200]o3[10]z=[50;50]color=[8]origin[cart.]=[0;0;0]tfactor=0,003125s"","""")" Cells(m + 3, n + 21).FormulaR1C1 = "at a specific point in space, indicating the spatial point in cells A11, B11 and C11. Enter G41 =1 " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "=IF(R[-2]C[1]=2,"" 2- Cyl -->>"",IF(R[-2]C[1]=3,"""",IF(R[-2]C[1]=1,"""",""|"")))" Cells(m + 4, n + 5).FormulaR1C1 = "=IF(R[-2]C=2,""c[10]rho=[90;90]c2[10]phi=[0;360]c3[10]z=[-200;200]color=[8]origin[cart.]=[0;0;0]tfactor=0,00323606s"","""")" Cells(m + 4, n + 21).FormulaR1C1 = "to display the field in Cartesian coordinates and the display parameters are changed in the string " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R34C7" Cells(m + 5, n + 4).FormulaR1C1 = "=IF(R[-3]C[1]=3,"" 3- Sph -->>"",""|"")" Cells(m + 5, n + 5).FormulaR1C1 = "=IF(R[-3]C=3,""s[10]r=[150;150]s2[10]phi=[0;360]s3[10]theta=[0;180]color=[8]origin[cart.]=[0;0;0]tfactor=0,003322398s"","""")" Cells(m + 5, n + 21).FormulaR1C1 = "value in G42. Enter G41 =2 to display in cylindrical coordinates and its parameters in G43. Enter " Cells(m + 6, n + 4).FormulaR1C1 = "||||||||||||||||||||||||" Cells(m + 6, n + 21).FormulaR1C1 = "G41 =3 for spherical coordinates, changing its parameters in G44." Cells(m + 7, n + -1).FormulaR1C1 = "=R28C1" Cells(m + 7, n + 0).FormulaR1C1 = "=R28C2" Cells(m + 7, n + 1).FormulaR1C1 = "=R28C3" 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 + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "Wire:" Cells(m + 8, n + 21).FormulaR1C1 = "ADD NEW dL ELEMENTS:" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R16C7&""_""&R[-15]C[-3]/2" Cells(m + 9, n + 4).FormulaR1C1 = " n =" Cells(m + 9, n + 5).FormulaR1C1 = "=COUNTIF(C[-3],""E_""&R[-32]C&""_*"")" Cells(m + 9, n + 21).FormulaR1C1 = "To add one more dq load item, press the +OBJ button and to remove one load item use the - OBJ " 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 = " L =" Cells(m + 10, n + 5).FormulaR1C1 = "=R[-31]C*R[-1]C" Cells(m + 10, n + 21).FormulaR1C1 = "button. Press any screen button to view the results; The number of loaded items is displayed " 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "in cell G11. The smaller dL is and the more dq elements the wire has, the more similar the resulting " Cells(m + 3, n + 1).Interior.Color = "9851952" 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 6 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-18]C+1" Cells(m + 3, n + 2).FormulaR1C1 = "=""<< -- Charge element dq""&RC[-3]/2" Cells(m + 3, n + 21).FormulaR1C1 = "electric field is to the real field. To add or remove several elements at the same time, indicate " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "in cell B2 the number of elements before pressing the respective button; this number must " 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 + 21).FormulaR1C1 = "be an integer." Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 = "=""<< -- Position of dq""&R[-4]C[-3]/2" Cells(m + 7, n + 21).FormulaR1C1 = "ADD A NEW DISTRIBUTION:" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "A new independent distribution can be added (for example another charged wire). To do this, " 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 + 9, n + 21).FormulaR1C1 = "in cell B2 write ENTIRE, B2=ENTIRE, which means that the entire wire will be copied; In B3 place " 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 first row that corresponds to the wire, in this case B3=15. In C3 enter the number of the " 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "last row that includes the elements of the wire, that is, the number of the last non-empty row " 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 + 54 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "of the last vector in column A. Then press +OBJ. Finally go down the sheet and locate the " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "new wire cells and change their initial position and settings. The new wire added is a copy of" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R34C7" Cells(m + 5, n + 21).FormulaR1C1 = " the existing one." Cells(m + 7, n + -1).FormulaR1C1 = "=R28C1" Cells(m + 7, n + 0).FormulaR1C1 = "=R28C2" Cells(m + 7, n + 1).FormulaR1C1 = "=R28C3" Cells(m + 7, n + 21).FormulaR1C1 = "Examples:" 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 + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "1. Study the electric field of a circular loop of radius 57.3 with a total charge of 1 C." 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R16C7&""_""&R[-15]C[-3]/2" Cells(m + 9, n + 21).FormulaR1C1 = "Solution:" 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 = "First we must build the loop, to do this we will decide that we are going to build it with 36 charge " 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "elements and we are going to distribute them with an azimuth of 10 degrees each time, that is, " Cells(m + 3, n + 1).Interior.Color = "9851952" 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 4 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-18]C+1" Cells(m + 3, n + 2).FormulaR1C1 = "=""<< -- Charge element dq""&RC[-3]/2" Cells(m + 3, n + 21).FormulaR1C1 = "36x10 = 360 degrees to close the loop. The length of the circumference is " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "2Pi x radius = L = 2x3.1416x57.3 = 360, that is, each element must have an approximate " 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 + 21).FormulaR1C1 = "length of 10." Cells(m + 6, n + 22).FormulaR1C1 = "k:" Cells(m + 6, n + 23).FormulaR1C1 = "G19=" Cells(m + 6, n + 24).FormulaR1C1 = "300" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 = "=""<< -- Position of dq""&R[-4]C[-3]/2" Cells(m + 7, n + 22).FormulaR1C1 = "dL:" Cells(m + 7, n + 23).FormulaR1C1 = "G18=" Cells(m + 7, n + 24).FormulaR1C1 = "10" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 = "Q:" Cells(m + 8, n + 23).FormulaR1C1 = "G17=" Cells(m + 8, n + 24).FormulaR1C1 = "1" 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 + 9, n + 22).FormulaR1C1 = "x_o:" Cells(m + 9, n + 23).FormulaR1C1 = "G22=" 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 + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 22).FormulaR1C1 = "y_o:" Cells(m + 10, n + 23).FormulaR1C1 = "G23=" Cells(m + 10, n + 24).FormulaR1C1 = "0" 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 22).FormulaR1C1 = "z_o:" Cells(m + 11, n + 23).FormulaR1C1 = "G24=" Cells(m + 11, n + 24).FormulaR1C1 = "0" 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 3 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 22).FormulaR1C1 = "r_o " Cells(m + 3, n + 23).FormulaR1C1 = "G25=" 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 = "Inclination" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R34C7" Cells(m + 5, n + 22).FormulaR1C1 = "phi:" Cells(m + 5, n + 23).FormulaR1C1 = "G27=" Cells(m + 5, n + 24).FormulaR1C1 = "0" Cells(m + 6, n + 22).FormulaR1C1 = "theta:" Cells(m + 6, n + 23).FormulaR1C1 = "G28=" Cells(m + 6, n + 24).FormulaR1C1 = "90" Cells(m + 7, n + -1).FormulaR1C1 = "=R28C1" Cells(m + 7, n + 0).FormulaR1C1 = "=R28C2" Cells(m + 7, n + 1).FormulaR1C1 = "=R28C3" Cells(m + 7, n + 22).FormulaR1C1 = "Bending:" 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 + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 = "Azimut:" Cells(m + 8, n + 23).FormulaR1C1 = "G30=" Cells(m + 8, n + 24).FormulaR1C1 = "10" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R16C7&""_""&R[-15]C[-3]/2" Cells(m + 9, n + 22).FormulaR1C1 = "Elevation:" Cells(m + 9, n + 23).FormulaR1C1 = "G31=" 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 + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 22).FormulaR1C1 = "Show:" 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 22).FormulaR1C1 = "E Vectors:" Cells(m + 11, n + 23).FormulaR1C1 = "G34=" Cells(m + 11, n + 24).FormulaR1C1 = "0" Cells(m + 3, n + 1).Interior.Color = "9851952" 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 2 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 1).FormulaR1C1 = "=R[-18]C+1" Cells(m + 3, n + 2).FormulaR1C1 = "=""<< -- Charge element dq""&RC[-3]/2" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 22).FormulaR1C1 = "Coordinates:" 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 + 22).FormulaR1C1 = "Type:" Cells(m + 5, n + 23).FormulaR1C1 = "G41=" Cells(m + 5, n + 24).FormulaR1C1 = "0" Cells(m + 6, n + 22).FormulaR1C1 = "Field observation point:" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 = "=""<< -- Position of dq""&R[-4]C[-3]/2" Cells(m + 7, n + 22).FormulaR1C1 = "x=" Cells(m + 7, n + 23).FormulaR1C1 = "A11=" Cells(m + 7, n + 24).FormulaR1C1 = "0" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 = "y=" Cells(m + 8, n + 23).FormulaR1C1 = "B11=" Cells(m + 8, n + 24).FormulaR1C1 = "57" 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 + 9, n + 22).FormulaR1C1 = "z=" Cells(m + 9, n + 23).FormulaR1C1 = "C11=" 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 + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "To add the 36 charge elements, check G11 for the existing quantity; if G11 =5, 31 more must " 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 + 90 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 = "be added. Enter B2=31 and press +OBJ, wait a moment for Excel to execute the command." Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "The loop will appear in the XY plane and touching the coordinate origin. Now analyze different " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R34C7" Cells(m + 5, n + 21).FormulaR1C1 = "points for the field by modifying the values in A11, B11, C11. To hide the individual field vectors, " Cells(m + 6, n + 21).FormulaR1C1 = "insert G36=1. If you want to center the loop, insert G23 = - 57." Cells(m + 7, n + -1).FormulaR1C1 = "=R28C1" Cells(m + 7, n + 0).FormulaR1C1 = "=R28C2" Cells(m + 7, n + 1).FormulaR1C1 = "=R28C3" 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 + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "To view the field in the entire space, set G41 = 1 and wait a few seconds or minutes for " 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" 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)*R19C7*R17C7/R48C7" Cells(m + 9, n + 2).FormulaR1C1 = "=""E_""&R16C7&""_""&R[-15]C[-3]/2" Cells(m + 9, n + 21).FormulaR1C1 = "Excel to execute the command. The field configuration in a certain region of space will appear. " 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 = "To view the field in cylindrical coordinates change the value to G41=2 and finally G41=0 to return " 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 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "to the initial single vector view." Cells(m + 3, n + 1).Interior.Color = "9851952" 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 = 11 End If ' vector ends If m = m1 + 90 Then Cells(m + 13, n + 21).FormulaR1C1 = "2. Study the electric field of a charged spiral." Cells(m + 14, n + 21).FormulaR1C1 = "Solution:" Cells(m + 15, n + 21).FormulaR1C1 = "In the previous problem set the Elevation G31 = -0.1 for the spiral to advance upwards and G30 = 20 " Cells(m + 16, n + 21).FormulaR1C1 = "to make the same 36 elements for two turns. Due to the increase of the azimuth angle, the radius " Cells(m + 17, n + 21).FormulaR1C1 = "will be reduced. In A11, B11, C11 modify the observation point (also taking into account that G41=0)." Cells(m + 19, n + 21).FormulaR1C1 = "Exercises:" Cells(m + 21, n + 21).FormulaR1C1 = "1. Construct the model of the electric field of a straight wire charged with charge Q." Cells(m + 22, n + 21).FormulaR1C1 = "2. Build the model of a charged wire in the shape of a semicircle." Cells(m + 23, n + 21).FormulaR1C1 = "3. Build a model of a set of two independent wires, one semicircular and the other rectilinear." Cells(m + 24, n + 21).FormulaR1C1 = "Help" Cells(m + 24, n + 22).FormulaR1C1 = "1. In B2 capitalize ENTIRE, B2=ENTIRE." Cells(m + 25, n + 22).FormulaR1C1 = "2. Observe in column A what is the number of the last non-empty row of the last vector." Cells(m + 26, n + 22).FormulaR1C1 = "3. Put B3=15 and in C3 put the number of the last non-empty row." Cells(m + 27, n + 22).FormulaR1C1 = "4. Press +OBJ to add the new line as a copy of the existing one." Cells(m + 28, n + 22).FormulaR1C1 = "5. Go down the sheet and you will see that the cells for the new line appeared, change " Cells(m + 29, n + 22).FormulaR1C1 = "the starting position of the new line and press XYZ." Cells(m + 30, n + 22).FormulaR1C1 = "6. In the cell corresponding to LINE No. Place the number 2." Cells(m + 31, n + 22).FormulaR1C1 = "7. Correct the formula in cell number n so that it is the same as the original." Cells(m + 32, n + 22).FormulaR1C1 = "8. Change the new line settings." Cells(m + 33, n + 21).FormulaR1C1 = "Note: if the new line did not appear, possibly you did not correctly indicate the range of rows in cells " Cells(m + 34, n + 21).FormulaR1C1 = " B3 and C3, the rows must correspond from the 15th to the last non-empty one." Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub