Sub Project_20_ES(ByVal VecType, m, n, m1, n1 As Integer) ' 20_PV = nRT_ES ' Updated: 30/03/24 ' 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 20 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 to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns from INICIO to the right in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet and add a short name and the number of your new project to the last row in the projects list. ' 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 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "950" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "=CONFIG!R3C9" Cells(m1 + 0, n1 + 8).FormulaR1C1 = "Ariel R. Becerra (22/11/23)" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "500" Cells(m1 + 1, n1 + 4).FormulaR1C1 = "T" Cells(m1 + 1, n1 + 5).FormulaR1C1 = "0" Cells(m1 + 1, n1 + 6).FormulaR1C1 = "=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 = "=CONFIG!R4C9" Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "1" Cells(m1 + 2, n1 + 4).FormulaR1C1 = "V" Cells(m1 + 2, n1 + 5).FormulaR1C1 = "15" Cells(m1 + 2, n1 + 6).FormulaR1C1 = "=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 = "=CONFIG!R5C9" Cells(m1 + 3, n1 + 0).FormulaR1C1 = "P" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "250" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "P" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "120" 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; b) add the project name and number to the list on the CONFIG sheet; a) 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;" & ChrW(211) & "" & Chr(10) & _ " " & 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." Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "P" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "250" Cells(m + 3, n + 4).FormulaR1C1 = "P" Cells(m + 3, n + 5).FormulaR1C1 = "120" Cells(m + 3, n + 9).FormulaR1C1 = "SOME VECTORS WERE U N D E R S C A L E D !" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 1).FormulaR1C1 = "o[10]x=[0;250]o2[10]y=[10;250]o3[2]z=[0;0]color=[150]origin[cart.]=[0;0;0]tfactor=0,001787475s" Cells(m + 4, n + 2).FormulaR1C1 = " << -- Configuraci" & ChrW(243) & "n de la gr" & ChrW(225) & "fica 3D" Cells(m + 4, n + 12).FormulaR1C1 = "ECUACI" & ChrW(211) & "N DE ESTADO DE LOS GASES" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCCIONES" Cells(m + 5, n + -1).FormulaR1C1 = "507" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0.3" 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 = "Constantes:" Cells(m + 8, n + -1).FormulaR1C1 = "242" Cells(m + 8, n + 0).FormulaR1C1 = "241" Cells(m + 8, n + 1).FormulaR1C1 = "0" Cells(m + 8, n + 2).FormulaR1C1 = "<< -- Valores de V, T." Cells(m + 8, n + 4).FormulaR1C1 = "N =" Cells(m + 8, n + 5).FormulaR1C1 = "10" Cells(m + 8, n + 6).FormulaR1C1 = "x 10^23 mol." Cells(m + 8, n + 21).FormulaR1C1 = "En esta simulaci" & ChrW(243) & "n, se presentan las tres magnitudes termodin" & ChrW(225) & "micas (T, V, P) como tres coordenadas" Cells(m + 9, n + -1).FormulaR1C1 = "0" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-1]C[4]*RC[4]*R[-1]C[-2]/R[-1]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "<< -- F" & ChrW(243) & "rmula P = P(V,T)" Cells(m + 9, n + 4).FormulaR1C1 = "k =" Cells(m + 9, n + 5).FormulaR1C1 = "10" Cells(m + 9, n + 6).FormulaR1C1 = "x 10^(-17) erg/ĮK" Cells(m + 9, n + 21).FormulaR1C1 = "en el espacio tridimensional (x,y,z)." 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 = "6" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "0" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "En este caso la funci" & ChrW(243) & "n P=P(V,T) es representada en el eje z y depende de las dos variables V y T de " Cells(m + 3, n + 1).Interior.Color = "16777075" 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 = 1 End If ' vector ends If m = m1 + 0 Then Cells(m + 12, n + 21).FormulaR1C1 = "la forma P = NkT/V, en donde N es la cantidad de part" & ChrW(237) & "culas del gas, V su volumen, P la presi" & ChrW(243) & "n; T la " Cells(m + 13, n + 21).FormulaR1C1 = "temperatura y k la constante de Boltzman." Cells(m + 15, n + 21).FormulaR1C1 = "Las unidades las puede trabajar el usuario a conveniencia. Para este caso, las unidades de las constantes" Cells(m + 16, n + 21).FormulaR1C1 = "se introdujeron aqu" & ChrW(237) & " a manera de ejemplo en el sistema cgs. " Cells(m + 18, n + 21).FormulaR1C1 = "Se pueden observar por ejemplo las isotermas, que son curvas P vs V a temperatura constante, o tambi" & ChrW(233) & "n " Cells(m + 19, n + 21).FormulaR1C1 = "las isochoras P vs T a volumen constante. " Cells(m + 21, n + 21).FormulaR1C1 = "La advertencia SOME VECTORS WERE U N D E R S C A L E D ! En la simulaci" & ChrW(243) & "n se refiere a que algunos " Cells(m + 22, n + 21).FormulaR1C1 = "valores de la presi" & ChrW(243) & "n P que se salen de la escala del sistema de coordenadas fueron reducidos al tamaŠo " Cells(m + 23, n + 21).FormulaR1C1 = "de los ejes, por lo tanto no debe representar ning" & ChrW(250) & "n malentendido, pues las magnitudes P, V y T son " Cells(m + 24, n + 21).FormulaR1C1 = "escalares. " Cells(m + 26, n + 21).FormulaR1C1 = "La configuraci" & ChrW(243) & "n de la gr" & ChrW(225) & "fica se modifica en la celda C7, por ejemplo para observar una sola isoterma," Cells(m + 27, n + 21).FormulaR1C1 = "digamos T=70 grados K, modifique en C7 la cadena o[10]x=[0;200] por o[10]x=[70;70] y oprima el bot" & ChrW(243) & "n" Cells(m + 28, n + 21).FormulaR1C1 = "ubicado en F3 para ver el resultado. Para una sola isochora, V=100, el valor en C7 ser" & ChrW(237) & "a:" Cells(m + 29, n + 21).FormulaR1C1 = "o[10]x=[0;250]o2[10]y=[100;100]o3[2]z=[0;0]color=[150]origin[cart.]=[0;0;0]tfactor=0,001302083s" Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub