Ex) Article Title, Author, Keywords
Ex) Article Title, Author, Keywords
New Phys.: Sae Mulli 2022; 72: 512-524
Published online July 31, 2022 https://doi.org/10.3938/NPSM.72.512
Copyright © New Physics: Sae Mulli.
Nguyen Ngoc Duy*
Institute of Postgraduate, Van Lang University, Ho Chi Minh City 700000, Vietnam
Department of Physics, Sungkyunkwan University, Suwon 16419, Korea
Correspondence to:*E-mail: ngocduydl@gmail.com; duy.nguyen@vlu.edu.vn
This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License(http://creativecommons.org/licenses/by-nc/3.0) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.
Computer programs play an important role in education and studies on subjects in natural science. Using computers, distance teaching and studying physics became easier, especially during the Covid-19 pandemic. Visual Basic 6.0 has emerged among various programming languages as a potential tool for physicists due to its simplicity and interactive graphical interface. This programming language does not require users' extensive computer knowledge or programming skills. With the hope of enhancing the efficiency of teaching and studying physics, I hereby present Visual Basic 6.0 potential to create graphical-user-interface (GUI) computer programs for creating a virtual laboratory, simulations, and numerical calculations. This study is used to enhance the effectiveness of computer programs in teaching, learning and doing research in physics.
Keywords: E-learning, Teaching physics, Virtual laboratory, Simulation, Computer code
Physics is one of the most difficult subjects in schools since it demands students to fully comprehend the principles or properties of physics phenomena and use them to explore nature. Many intricate concepts behind the phenomena, such as the weight and mass of an object, the velocity and acceleration, the phase in an oscillation, the quantum effects, etc. are difficult to explained to students without visual illustration[1,2]. Therefore, the visual illustration might help students have a deep understanding and long-lasting memory[3]. Different visualizing tools are used for teaching and studying physics, such as images, experimental models, simulating programs, and so on, which still require students to imagine but not practical experience. In such circumstances, virtual laboratories have been developed to visualize practical experiments and phenomena of physics, which help students not only improving their experimental skills but also increasing the efficiency of real experiments and providing a tool to for self-learning[4].
In physics, on the other hand, many experiments, like nuclear reactions, can be manually performed or repeated due to their uncertainty or feasibility, high cost, and danger. Thus, to save time and money and reduce risks on experiment performers and predict results before actual execution, computer simulation have the potential to solve these problems. For instance, it is obligatory to simulate a nuclear reaction of interest to estimate its feasibility before performing a real experiment. Additionally, under the Covid-19 pandemic situation, computer programs are highly demanded to overcome distance education or online teaching limitations. The computer is important in terms of providing computing environments for the virtual laboratories, the simulations, and calculations in physics to function well.
Visual Basic 6.0 (VB6)[5-7] like other programming languages, such as Python[8,9], Java[10,11], and C++[12-14], strongly supports physicists in descriptions of physical processes. VB6 far exceeded other languages because of its simplicity and interactive graphical-user-interface (GUI) design. Users can easily manipulate the interface to design a graphical panel with buttons, text boxes, lists, scroll bars, etc. VB6 has been used to develop educational programs simulating a motion of an object following dynamic laws, virtual laboratories to illustrate physics processes, or even codes to solve the problems in physics. For example, the dynamic parameters for a motion of a rocket shot with various angles in a short time can be clearly described using VB6. In which the change in rocket trajectories caused by air friction or the initial shot angle is visually described.
VB6 has various components that can be used for different purposes. For instance, the picture component is suitable for an oscilloscope monitor to display histograms; the shape can be an object in a motion. With this advantage, VB6 has emerged as a good candidate for beginners who do not have good programming knowledge and skills. However, for better software, users need to understand the properties of each component and use it selectively. Therefore, in this study, I present the important components of VB6 needed for creating virtual experiments, simulations, and calculations. Additionally, I present some results from a self-developed virtual laboratory that includes a system of practice lessons for undergraduates, simulation of a spring-mass system, and calculation of the nuclear properties of nuclei based on the shell-model using VB6.
Alomari
Nevertheless, coding in Java is more complicated than in VB6. Furthermore, checking error function built-in VB6 is a plus since it helps beginners check their coding immediately. Taking it all together, VB6 is considered a good language for teachers and students in physics, as indicated in Ref.[15].
Figure 1 shows a view of the VB6 programming window. A
For teaching and studying physics, there are several objects such as
We do not need to use all the properties of the objects to create an application in physics. Only several popular properties relevant to each object are used in the project. For examples, the fillstyle and forms of the
There are three main steps to build a program using Visual Basic 6.0 as follows: designing an interface on the form with objects, defining the properties of all the objects designed on the form, and coding the program based on the proper algorithms to solve physics problems of interest. Users can easily insert
According to suggestions of the authors in Refs.[19-21], a virtual laboratory requires at least two main components: computer programs to execute algorithms and instruments to provide an environment in which the program can function. A virtual laboratory also provides tools, materials, objects, etc. required for an artificial measurement. These required components can be found under the object tab in the toolbox of a project in VB6. Depending on requirements of the problems to be solved by users, a virtual laboratory can be designed with one or many projects. Each
For example, in measurement of the inertia moment of a disk shown in Fig. 2, an
To drop the plump, a
In another case, I designed a program of the virtual experiment for students to practice measuring the frictional coefficient. The devices required for this measurement are a pedestal, a protractor, two sensors, a drain, a ruler, an object, and a digital clock. The protractor and drain are mounted with the pedestal. The sensors, whose color is changed from green to red when the object passes through, are connected to the timer and mounted on the drain to measure the moving time of the object on the drain. The drain is designed to move along the protractor. The distance between the sensors is measured by the angle and height of the drain.
To design this virtual experiment, we need to consider which parts can be replaced by the objects provided in VB6. As can be seen in Fig. 3, the movable parts, which are the object, drain, and upper sensor, can be replaced by a
The two programs mentioned above indicate that VB6 offers various components to build a proper virtual laboratory to visualize physics experiments. Some components displaying instruments of the experiment can be replaced by images taken from the real laboratory for conspicuousness. The measurement procedures (e.g., changing the distance between the sensors, dropping the plump, and measuring the time) are visually demonstrated for a better understanding and long-lasting memory. As shown Fig. 2, only a form that contains
In the second example, see Fig. 3, a scrollbar was added to adjust these objects instead of manually controlling the drain and moving the sensors. By doing that, we still achieved the aims of the action but made the action simpler and more precise. Notice that VB6 also provides a drag-drop function which allows users to manipulate the objects directly in the form. The simple coding algorithm and graphical interface are advantages that do not require users to have a solid background in computer program coding. VB6, with the toolbox and GUI form, strongly helps users design an application in physics.
To specify the usefulness of VB6 to the education field, as an example, I describe how to apply the virtual experiment created using VB6 to measure the frictional coefficient (Fig. 3) in actual classes. The steps for practical study are as follows:
Reviewing physics background for the measurement: Instructors and students access
where
Taking Eq. (1) together with Eq. (2), we can determine the friction coefficient µ.
Checking the tools used to measure: i) changing the angle
Step 1: Adjusting the angle
Step 2: Adjusting and recording the distance
Step 3: Resetting the stopping watch by pressing the RESET button and setting a larger angle
Step 4: Dropping the object by pressing the ON button and recording
Other students repeat the four steps above to have a set of experimental data. The data will be analyzed according to the hint in the
When the measurement is completed, students finish the measurement by tapping the EXIT button to close that virtual room.
Compared to a real experiment, the virtual experiments offer several advantages of saving money from buying real equipment, repetition possibility, convenience, etc. In addition, the purposes of the lessons are visually illustrated so that the learners can expand their knowledge and improve their skills. By using these virtual experiments, students can study ahead of the experiments prior to the practical classes in schools. What students need is just a well-prepared guideline from instructors. The virtual experiments can be repeated many times and performed whenever at any place. Additionally, many students can individually practice a measurement at the same time. Creating a virtual laboratory helps increase study efficiency in practice and to reduce the risks to health and safety in the physics laboratory at schools.
There are various definitions of simulation according to different attitudes and fields. In physics, equation-based and the Monte-Carlo simulations are given a special attention. The equation-based simulation describes physical phenomena based on the laws of physics, which are described by formulae. For example, the airstrip of a rocket is simulated based on dynamic equations in mechanics. However, Monte-Carlo simulation is a method that uses computer algorithms with random parameters to calculate the properties or to predict the states of physical processes that could not be estimated without prior simulation. The equation-based simulation is often used for teaching and learning physics, while the Monte-Carlo is useful in doing research. VB6 enables both types of simulations.
In the equation-based simulation of a physical process, the algorithms are mostly derived from principles of the physical phenomena which are often described by mathematical formulae. The motion or changes of the physical objectives follow the rules of physics, which can be simulated using VB6. For example, the damped oscillation of a spring-mass system is mathematically described by
The velocity and accelerator of the oscillator are given by the derivatives of Eq. (3) as
where
The amplitude
where
Simulating the oscillation in a virtual laboratory requires a spring, an oscillator, and an oscilloscope to display the graphs of the position, velocity, and accelerator parameters of the oscillator, respectively. They are designed using an
The control buttons are provided to start or stop the run of the oscillation. By using GUI in VB6, all the parameters can be displayed at the same time, and thus, users can preview the process right after modifying the dynamic parameters. Notice that users also can reset all the parameters during the run instead of restarting the run. The control buttons allow users to handle the experiment's performance using the
The program designed in Fig. 4 can be applied to explain and provide a series of the properties of the damped oscillation to students in classes at high schools as below.
The definition of the damped oscillation:
Instructors turn on the simulator and ask students to observe the maximum magnitude
The students will qualitatively evaluate the phenomenon of the reduction of the magnitude;
The change in magnitude by the time can be quantitatively evaluated by considering the magnitude
The change in the magnitudes of the displacement
Instructors give a question about the change in the maximum magnitudes of the movement, velocity, and acceleration;
By visualizing the displacement, velocity, and acceleration graph, instructors help students easily realize the magnitude reduction over time.
Phase difference among the displacement
By using the graph, teachers explain the phase difference;
Changing
Impacts of either elasticity
By changing the values of these parameters and asking students to observe the graph, students can evaluate the change in the frequency or period and phase of the oscillation;
Give a conclusion that these parameters impact the frequency but do not influence the phase.
The example above indicates that by using VB6, instructors can easily design a lesson following their teaching plan. The knowledge of lessons can be visualized with the GUI programming using VB6 to enhance better understanding of students. Hence, learning using VB6 can be specifically utilized in the education field.
It should be noted that the examples mentioned above are for teaching-learning physics at high schools and first-or second-year undergraduates at universities. The present study results discussed below indicate that VB6 can be efficiently applied to graduated (master or doctoral) students and senior researchers.
In experimental physics, scientists often use the Monte-Carlo simulation to test the feasibility of a difficult measurement or to predict a hard physics process. As an example, here, I present the simulation for the identification of various exotic particles produced by the 3He-induced reactions (i.e., 3He(16O,
Because many isotopes come out as products of the reactions, scientists must identify each particle based on particle identification methods with the helps of computer programs. The separation of the particles coming from the reactions requires a simulation to define if the distributions of the particles overlap each other. The particles are distinguished by using the differences in the light time (
Because VB6 is just only a computer language itself, it is necessary to study how to apply VB6 to different aspects of physics. The discussion above obviously indicates the success of the application of VB6 to the Monte-Carlo simulation, which is important in the professional research of post-graduates and scientists at universities and institutes.
In studies on physics, researchers at universities or institutes usually analyze a huge amount of experimental and simulated data, leading to a need for help from computer programs. For instance, in the precise mass measurements using MRTOF technique[24,25], the precise mass of nuclei is determined based on the time of flight of ions. The mass-resolving power (
where
The measured or simulated flight time needs to be analyzed to determine
Using VB6, we can also develop a program for the numerical calculation based on the shell model[26] to estimate spin-parity and magnetic moment at the ground state of a nucleus in nuclear physics. According to this model, states of nucleon follow the Pauli principle[27,28] to occupy the shells of a nucleus as shown in the level diagram in Fig. 8[26]. The interface of the program designed using VB6 is shown in Fig. 9.
The odd or even feature of the wave function is characterized by the parity, π. The nucleon has an orbital angular momentum and an intrinsic spin characterized by vectors
and the parity π can be deduced by
The subscripts p and n in the equations above are for proton and neutron, respectively. The magnetic moment of an odd nucleon is given by
where
and
In this work, I analyzed how to apply the VB6 programming language in physics. The graphical-user-interface is an advantage of VB6, which helps for designing a virtual laboratory or simulation of an experiment due to the reduction of the time and graphical design skills for a computer program. The results of my self-developed computer programs indicate that VB6 can fulfill most of the requirements of the problems or phenomena of physics. By using VB6, users can visualize physics experiments and simulate or calculate physical phenomena or interactions parameters. The content used in the educational process can be derived from the simulation and visualization of a VB6 program. The procedures required for measuring a physical quantity are easily introduced to students with the help of the virtual laboratory created using VB6. Therefore, VB6 is capable of being applied for teaching and studying physics at high schools, universities, and institutes. Finally, the present study helps enhance the effectiveness of the use of computers in teaching-learning and doing research on various subjects of physics.
In this work, I analyzed how to apply the VB6 programing language in physics. The graphical-user-interface is an advantage of VB6, which helps for designing a virtual laboratory or simulation of an experiment, due to reduction of the time and graphical design skills for a computer program. The results of my self-developed computer programs indicate that VB6 can fulfill most of requirements from the problems or phenomena of physics. By using VB6, users can visualize physics experiments and simulate or calculate parameters of physical phenomena or interactions. The content used in the educational process can be derived from the simulation and visualization of a VB6 program. The procedures required for measuring a physical quantity are easily introduced to students under helps of the virtual laboratory created by using VB6. Therefore, VB6 is capable to be applied for teaching and studying physics at high schools, universities and/or institutes. Finally, the present study is helpful to enhance the effectiveness of the use of computers in teaching-learning and doing research in various subjects of physics.
I gratefully thank Dr. Jiwon Lee (Korea National University of Education) for her valuable discussion on the topic and results of the research. The support from Van Lang university for this study is also acknowledged.