A simulation method for measuring liquid viscosity coefficient experiment by falling ball method based on Matlab GUI
Through the simulation and simulation method based on Matlab GUI, the problems of cumbersome, difficulty and single parameters of traditional ball-falling method are solved, and efficient, accurate and visual measurement of liquid viscous coefficients are achieved, which deepens students' experimental understanding.
Patent Information
- Application Number
- CN202211345837.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The traditional ball-falling method has problems such as cumbersome measurement, difficulty, increased cost and long experiments. The experimental parameters are single, so the impact of temperature and infinite extension conditions cannot be effectively explored.
Using the simulation method based on Matlab GUI, we create the running interface for the experiment of measuring the viscosity coefficient of the liquid by falling ball method, build a picture database, set up the switching of multiple experimental running interfaces and the switching of the selection of experimental instruments, construct an experimental equipment model, and combine the formula of the change of liquid viscosity and density with temperature to determine the changes in the drop speed and displacement of the ball over time.
It realizes efficient, accurate and visual simulation of the measurement of liquid viscous coefficients. Students can intuitively observe the whereabouts of the ball, deepen their understanding of the experimental content, avoid errors caused by naked-eye observation, and reduce the cost and time-consuming of the experiment.
Smart Images

Figure BDA0003918310160000021 
Figure BDA0003918310160000022 
Figure BDA0003918310160000031
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of virtual simulation experiments, and particularly relates to a simulation method for simulating a falling ball method experiment for measuring liquid viscosity coefficient based on Matlab GUI. Background Art
[0002] The viscosity of liquids is widely used in production and life, for example: mechanical lubrication, liquid transportation, navigation of ships and airplanes, circulation of biological fluids, drug metabolism and other processes are all closely related to the viscosity of fluids. Therefore, the measurement of liquid viscosity coefficient is very important, and there are different measurement methods according to the size of the liquid viscosity coefficient. For liquids with large viscosity coefficients, transparent or translucent liquids, the falling ball method can usually be used for measurement. The falling ball method for measuring liquid viscosity coefficient is also one of the basic experiments routinely offered in relevant physical experiment courses in various universities.
[0003] Different schools choose different experimental forms when setting up the experiment of measuring liquid viscosity coefficient by falling ball method, mainly including: single tube falling ball method, multi-tube falling ball method or variable temperature single tube falling ball method. However, considering factors such as experimental funds, experimental space and experimental time, often only one method is selected to carry out the experiment, resulting in the limitation of exploring single experimental parameters; for example: single tube falling ball method and variable temperature single tube falling ball method, their tube diameter is single, the influence of temperature cannot be considered, and the correction of infinite extension condition cannot be explained; multi-tube falling ball method cannot consider the influence of temperature, the experimental tube diameter is fixed, the number of experimental tubes is small and cannot be adjusted. At the same time, during the experiment, due to the limitations of naked eye observation, students cannot observe and determine the falling time of the ball and the starting time and starting position of the uniform motion of the ball. When the traditional falling ball method is used to measure the viscosity coefficient of liquid, if it involves the modification of infinite extension condition, the correction formula is directly given or the multi-tube falling ball method is used to verify the correction formula. Students cannot fit or summarize the formula by themselves through multiple experimental data.
[0004] Due to the limitations of the traditional falling ball method, the experiment process often has problems such as cumbersome and difficult measurements, increased costs, and long experimental time. Therefore, it is very necessary to develop a simulation experiment that uses software to simulate the falling ball method to measure the viscosity coefficient of liquid. Summary of the invention
[0005] In view of the limitations of the traditional falling ball method mentioned above, which leads to cumbersome and difficult measurements during the experiment, increased costs, long experimental time, and a single experimental variable, the present invention proposes a simulation method for measuring the viscosity coefficient of liquid by the falling ball method based on Matlab GUI.
[0006] The technical solution adopted in this application is:
[0007] A simulation method for measuring liquid viscosity coefficient experiment by simulating a falling ball method based on Matlab GUI, comprising the following steps:
[0008] (1) Use the MATLAB platform to create the running interface of the falling ball method experiment to measure the viscosity coefficient of liquid and build an image database;
[0009] (2) Setting the switching of multiple experimental operation interfaces and the switching of multiple experimental instrument selections;
[0010] (3) Construction of experimental equipment model;
[0011] (4) Based on the formula for the change of liquid viscosity coefficient and density with temperature, determine the change of the falling speed and displacement of the experimental ball with time and the time taken for the experimental ball to fall at a uniform speed in the measurement interval;
[0012]
[0013]
[0014]
[0015] Among them, η is the viscosity coefficient of the liquid Pa·S, d is the diameter of the experimental ball m, and g is the gravitational acceleration m / s 2 , ρ1 is the density of the experimental ball Kg / m 3 , ρ2 is the density of the experimental liquid Kg / m 3 , D is the tube diameter m, l is the measurement distance m between the starting point and the end point of the experimental ball; v is the falling speed of the experimental ball m / s, s is the falling distance m of the experimental ball, t is the measurement time s of the uniform falling of the experimental ball, T is the measured liquid temperature K; m is the mass of the experimental ball, g; v0 is the final speed of the experimental ball, m / s;
[0016] (5) Based on the calculation model of step (4) and the experimental equipment of step (3), a time axis starting from 0 is established, and the measured time t of the uniformly falling experimental ball is used as the iterative variable. The dynamic simulation and drawing functions of the experimental ball are realized by using the Matlab platform, and the visual simulation of the falling ball method for measuring the viscosity coefficient of the liquid is completed by using the Matlab GUI.
[0017] It is further defined that the step (2) sets the switching of multiple experiment operation interfaces and the switching of experimental instrument selection, and the specific operations are:
[0018] (2.1) Place a pushbutton control on the interface to be switched, and set its display text and button style through the property editor;
[0019] (2.2) Write the callback function of this button control, and set its display property Visible in combination with the tag of the two interfaces to be switched. During operation, ensure that one scene is loaded and the other scenes are disabled, so as to realize the switching of multiple experimental operation interfaces and the switching of experimental instrument selection.
[0020] It is further defined that the step (3) of experimental equipment modeling specifically includes:
[0021] (3.1) Creation of two-dimensional models of vernier calipers, micrometer screws, stopwatches, and intelligent temperature control devices;
[0022] (3.2) Three-dimensional rendering of long tubes and liquids;
[0023] (3.3) Setting of experimental measurement interval in photogate instrument.
[0024] It is further defined that the creation of the two-dimensional model of the vernier caliper, micrometer screw, stopwatch and intelligent temperature control device in step (3.1) is specifically as follows:
[0025] 3.1.1) Create a panel and place the coordinate axis Axes on the panel Panel;
[0026] 3.1.2) Read the two-dimensional image file of the required experimental equipment from the image database in combination with the label of the coordinate axis and display it on the coordinate axis;
[0027] 3.1.3) Overlay the required button controls and value display boxes at the corresponding positions of the coordinate axes, and set their display text and button style through the property editor;
[0028] 3.1.4) Use the callback function of the button to control the properties of the text string in the digital display box, obtain the value in the text, adjust the value according to the button function, and reassign the adjusted value to the text box. At the same time, use the Matlab if function to limit the adjustable range of the button;
[0029] (3.2) Three-dimensional rendering of long tubes and liquids, including:
[0030] 3.2.1) Activate the drawing function. After the user clicks the "average value" button in the experimental report, it indicates that the parameters required for drawing the long tube have been determined. Write the drawing program in the callback function of this button;
[0031] 3.2.2) Use the Matlab cylinder function to generate the relevant parameter matrix (x, y, z) of a cylinder with a radius of D / 2, and then use the Matlab surf function to draw the long tube and liquid. The color and transparency of the liquid are achieved by setting its "facecolor" and "facealpha" attributes;
[0032] 3.2.3) Use Matlab fill function to draw the bottom of the tube, and then use Matlab fill3 function to draw the liquid surface, completing the three-dimensional drawing of the long tube and liquid;
[0033] (3.3) The setting of the experimental measurement interval in the photogate instrument includes:
[0034] 3.3.1) Place a slider control on one side of the long tube, set the upper and lower limits of the slider in its properties, and then determine the upper and lower limits of the photoelectric gate measurement interval, and place a reading display box above the slider;
[0035] 3.3.2) Write a callback function for the slider. Each time the slider is moved, its Value is displayed in the reading display box. At the same time, use the Matlab plot function to draw the upper and lower gates at the corresponding positions of the long tube to complete the setting of the experimental measurement interval in the photoelectric gate instrument.
[0036] It is further defined that the step (4) is specifically as follows:
[0037] (4.1) Traditional experimental data collection:
[0038] The empirical formula for simulating the change of the empirical viscosity coefficient of the liquid with temperature T is:
[0039]
[0040] The fitting formula for the change of liquid density with temperature T is:
[0041] ρ=CN·T
[0042] Among them, η jy is the empirical viscosity of the liquid, Pa·S; A and B are characteristic constants of the empirical formula of the variation of the viscosity of the liquid with temperature; T is the temperature of the liquid, K; ρ is the density of the liquid, Kg / m 3 ; C and N are characteristic constants of the empirical formula of liquid density changing with temperature;
[0043] (4.2) Based on the traditional experimental data in step (4.1), the empirical formulas for the variation of viscosity and density with temperature are obtained:
[0044]
[0045] g is the acceleration due to gravity, m / s 2 ; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3; d is the diameter of the experimental ball, m; D is the tube diameter, m; t is the measurement time of the uniform falling of the experimental ball, s; l is the measurement distance between the starting point and the end point of the experimental ball, m;
[0046] (4.3) Set the initial velocity of the experimental ball to zero, superimpose a small random quantity that obeys the normal distribution on the basis of the empirical formula in step (4.2), integrate both sides with respect to t, substitute them into the above formula, and obtain the simulated relationship between the falling velocity of the experimental ball and time:
[0047]
[0048] Then by
[0049] ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, v is the speed of the experimental ball when it falls, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g;
[0050] Integrate both sides with respect to t, and similarly simulate the relationship between the falling distance and time of the experimental ball:
[0051]
[0052] ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, Pa·S; v is the falling speed of the experimental ball, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g;
[0053] Then we can get the simulation time that the experimental ball takes to fall at a uniform speed in the measurement interval:
[0054]
[0055] t is the measurement time of the uniform falling of the experimental ball, s; l is the measurement distance between the starting point and the end point of the experimental ball, m; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; η is the viscosity coefficient of the liquid, Pa·S; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; v0 is the final velocity of the experimental ball;
[0056] Then the computational model of the falling experimental ball is determined.
[0057] It is further defined that the step (5) is specifically as follows:
[0058] (5.1) Determine the experimental conditions according to the calculation model of step (4) and the experimental equipment selected in the experimental equipment module of step (3);
[0059] (5.2) Establish a time axis starting from 0, take the measured time t required for the experimental ball to fall as the iteration variable, and use the Matlab if function to limit the iteration process. If the falling position of the experimental ball reaches the bottom of the long tube, the iteration is terminated. Use the Matlab plot function to plot the current experimental ball and get the current frame getframe;
[0060] (5.3) Use the Matlab WriteVideo function to store each frame, and use the principle of visual persistence to animate each frame to obtain a visualized experimental ball motion state, completing the simulation of the falling ball method experiment to measure liquid viscosity coefficient.
[0061] It is further defined that the step (5) further includes a step (6), which is specifically: using Matlab polyfit function to fit the data to obtain a fitting straight line formula, and then using Matlab polyval function combined with plot function to draw the fitting straight line to obtain an experimental variable relationship diagram of the experimental ball terminal speed v0 and the ratio of the experimental ball diameter to the tube diameter d / D of the experimental ball motion.
[0062] It is further defined that the step (6) is specifically:
[0063] (6.1) Repeat step (5) to simulate the experimental process of the experimental ball motion under different tube diameters and ideal conditions of tube diameter D→∞;
[0064] (6.2) Based on the experimental data of step (6.1), the Matlab polyfit function is used to fit the velocity ν of the experimental ball falling uniformly in the infinitely extended continuous fluid. 0修正后 Relationship with the ratio d / D of the experimental ball diameter to the tube diameter:
[0065]
[0066] ν 0修正前 is the ideal velocity of the experimental ball falling uniformly in an infinitely extended continuous fluid; ν 0修正后is the corrected velocity of the experimental ball when it falls uniformly in the infinitely extended continuous fluid; d is the diameter of the experimental ball, m; D is the tube diameter, m;
[0067] (6.3) The fitting straight line is plotted using the Matlab polyval function combined with the plot function to obtain the experimental variable relationship diagram of the experimental ball's final velocity v0 and the ratio of the experimental ball diameter to the tube diameter d / D.
[0068] Further defined, the method further comprises step (7), specifically:
[0069] (7.1) Repeat step (5) to simulate the motion experiment of experimental balls with different diameters;
[0070] (7.2) According to the calculation model of step (4), use Matlabplot function to draw the displacement and velocity of the experimental ball over time, i.e. St graph and vt graph;
[0071] (7.3) Track the moment when the experimental ball enters the uniform motion state, establish a time axis starting from 0, take the measured time t required for the experimental ball to fall as the iteration variable, and use the Matlab if function to limit the iteration process. If the change in the falling speed of the experimental ball is less than 10 compared with the previous moment, -3 , the iteration is terminated, and the data point is marked using the Matlab data marking function, and the data point at the same time is also marked on the St graph.
[0072] Further defined, the method further comprises step (8), specifically:
[0073] (8.1) Repeat step (5) to simulate the experimental process of the ball motion under different liquid temperatures;
[0074] (8.2) Based on the experimental data of step (8.1), use Matlab polyfit function to fit the relationship between the viscosity coefficient of the liquid and the temperature;
[0075] (8.3) Use Matlab polyval function combined with plot function to plot the fitting curve and obtain the relationship between the viscosity coefficient of the liquid and temperature.
[0076] Compared with the prior art, the beneficial effects of this application are:
[0077] 1) This application is based on Matlab GUI and can truly simulate the experimental process of measuring liquid viscosity coefficient by the falling ball method. The starting point exploration module of the uniform falling of balls of different diameters can determine the starting time, starting position and starting speed (average speed in the uniform motion interval) of the ball entering the uniform falling state under the action system of gravity, viscous resistance and buoyancy. The simulation process is accurate, and students can intuitively see the entire dynamic demonstration process of the ball falling, which deepens students' understanding of the experimental content, avoids errors caused by students' independent observation, and allows students to broaden their horizons and expand their knowledge.
[0078] 2) Based on the actual experimental content of the traditional falling ball method for measuring the viscosity coefficient of liquid, this application has developed an experimental module, which expands the research content in both depth and breadth, allowing students to broaden their horizons and expand their knowledge, and uses automated processing in data processing, which is efficient and accurate.
[0079] 3) The simulation system involved in the present invention has low requirements on operating equipment, strong compatibility, rich exploration content, and flexible operation. It overcomes the limitations of traditional physical experiments and has important teaching significance.
[0080] 4) The present invention provides physical quantities such as the speed and displacement of the ball in the process of experimental liquid flow. Users can also adjust experimental parameters such as the ball diameter, liquid temperature, and experimental tube diameter according to their own personalized experimental exploration needs, which can effectively improve experimental efficiency, expand experimental parameter setting conditions, and eliminate the limitations of hardware conditions such as experimental equipment, experimental equipment, and experimental environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 This is a schematic diagram of the operation interface of the simulation method for simulating the experiment of measuring liquid viscosity coefficient by the falling ball method based on Matlab GUI;
[0082] Figure 2 It is the experimental simulation interface of the ball falling under different diameter measuring cylinder conditions;
[0083] Figure 3 for Figure 2 The simulation result fitting line of
[0084] Figure 4 This is the experimental simulation interface for the falling balls of different diameters;
[0085] Figure 5 for Figure 4 The simulation results of the motion of balls with different diameters are shown in St diagram;
[0086] Figure 6 for Figure 4 The simulation results show the motion vt diagram of balls with different diameters;
[0087] Figure 7 This is the experimental simulation interface of a ball falling at different temperatures;
[0088] Figure 8 for Figure 7 The simulation results show the change curve of viscosity coefficient with temperature;
[0089] Fig. 9 Login interface for users;
[0090] Fig.10 Preview the interface for the experiment. DETAILED DESCRIPTION
[0091] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings and embodiments, but the present invention is not limited to the implementation modes described below.
[0092] Example 1
[0093] This embodiment is based on Matlab GUI simulation method for measuring liquid viscosity coefficient experiment by falling ball method, which includes the following steps:
[0094] (1) Using the Matlab GUI platform, the running interface of the falling ball method experiment for measuring liquid viscosity coefficient was created and an image database was constructed;
[0095] The operation interface of this embodiment is as follows Figure 1 As shown, it mainly includes: user login interface, experiment preview interface, exploration interface of the starting point of the uniform fall of balls of different diameters, exploration interface of the influence of measuring cylinders of different diameters on the viscosity coefficient of liquid, exploration module of the influence of different temperatures on the viscosity coefficient of liquid, and exploration interface of the viscosity coefficient of commonly used liquids in life.
[0096] User login interface, such as Fig. 9 : Used to check the login information entered by the user when entering the virtual simulation system before the experiment, verify the user's identity, and identify the login information (student number and name) entered by the user in the user login interface of the virtual simulation system. The virtual simulation system will judge the input login information. If it is judged that the login information is entered incorrectly, a prompt will be given (information error, please re-enter) and the login information entered by the user will be cleared. If the login information is judged to be entered correctly, the virtual simulation system will be loaded and run to allow the user to enter the virtual simulation system.
[0097] Experiment preview interface, such as Fig.10:It is used before the experimental exploration, and its purpose is to explain the purpose of the experiment, experimental instruments, experimental principles and precautions. Specifically, the experimental background, experimental overview, experimental thinking framework and core issues are retrieved and presented to the user. Specifically, the experimental preview module contains the main parts such as experimental background, experimental overview, experimental thinking framework and experimental core issues, and is presented in the form of text, relationship diagrams and tables to help users to fully preview the entire narrative experiment of measuring liquid viscosity by the falling ball method; users can click on the menu bar "Experimental Guide" to learn about the purpose of the experiment, experimental instruments and experimental principles. Users can click on "Operation Guide" to learn how to operate and use the instruments in this virtual experiment.
[0098] See also Figure 4 , The starting point exploration interface of the uniform falling of balls with different diameters: It is used to set multiple balls with different diameters according to the experimental requirements, place multiple balls with different diameters in the same set liquid, and visualize the movement process of multiple balls with different diameters after entering the liquid. Based on the force analysis and motion equation of each ball, the physical quantity of each ball movement is output in real time, and the starting time, starting position and starting speed of each ball entering the uniform falling state during the movement process are determined, and the simulation experiment report of balls with different diameters and the simulation experiment analysis chart of balls with different diameters are generated. Specifically, after the balls with different diameters enter the liquid, they move under the action of gravity, viscous resistance and buoyancy, and the starting time, starting position and starting speed of the balls entering the uniform falling state are determined, and the falling process of the balls is visualized and the displacement, speed and other physical quantities of the balls are output in real time. The simulation system allows users to adjust the diameter of the balls, observe the movement process of balls with different diameters in the liquid, and summarize the changing rules of the time, position and ending speed of the balls when the diameter changes. Finally, according to the user's parameter settings, the system outputs experimental data results such as the starting time, starting position and ending speed of balls with different diameters entering a uniform fall, and inputs the St diagram, vt diagram of the entire falling process of the ball and the calculation results of the liquid viscosity coefficient corresponding to balls with different diameters, and generates an experimental report.
[0099] The interface for exploring the influence of different diameter measuring cylinders on the viscosity coefficient of liquid is used to set multiple measuring cylinders of different diameters for holding liquid according to experimental requirements, let the ball move in the liquid of each measuring cylinder, measure the displacement, instantaneous velocity, time taken to pass through the uniform speed measurement interval, and average velocity of the ball, generate simulation experiment reports of measuring cylinders with different diameters and simulation experiment charts of measuring cylinders with different diameters, and fit the simulation experiment analysis charts of measuring cylinders with different diameters, and give the speed correction formula of the ball passing through the measurement interval under infinite extension conditions. Specifically, it is used to observe and study the influence of the diameter of the measuring cylinder holding liquid on the motion state of the ball and the influence on the measurement results of the viscosity coefficient. A multi-tube system with adjustable tube diameter is set up, and the user adjusts the tube diameter according to the experimental prompts or independent research plans. The simulation system simulates the falling process of the ball in different tube diameters, and outputs physical quantities such as the displacement, instantaneous velocity, time taken to pass through the measurement interval, and average velocity in the measurement interval of the ball. Through the drawing function provided by the system, the user can output the td / D image, the corresponding time and speed, where t is the measurement time of the uniformly falling ball, d is the diameter of the ball, and D is the diameter of the tube; the submodule provides a data fitting tool to fit the above data to give a speed correction formula for the ball passing through the measurement interval under infinite extension conditions, and generate an experimental report.
[0100] Module for exploring the influence of different temperatures on liquid viscosity coefficient: used to set the experimental temperature, measuring cylinder diameter, ball diameter and uniform speed measurement interval length to a continuously adjustable mode, let the ball move in the liquid, and visualize the movement process of the ball; change the temperature, repeat multiple times, measure the displacement, instantaneous velocity and liquid viscosity coefficient of the ball at different temperatures; generate experimental reports of liquid viscosity coefficients at different temperatures and experimental analysis charts of liquid viscosity coefficients at different temperatures. Specifically, it is used to observe and study the influence of liquid temperature changes on the motion state of the ball and the influence of viscosity coefficient measurement results, set the temperature, tube diameter, ball diameter and uniform speed measurement interval to continuously adjustable mode, and users can select or adjust relevant parameters to conduct experiments as needed. Users set parameters to output the visualization process of the ball falling, and output the displacement, instantaneous velocity and viscosity coefficient of the ball at different temperatures. After a set of experiments, the user is prompted to repeat the same experimental parameter experiment at least 5 times, and can also set repeated experiments more than 5 times to reduce experimental errors. Select and click "average value", "standard value" and "relative error" respectively, and the system automatically calculates and outputs the corresponding time average value, viscosity coefficient standard value and experimental measurement error. Select experimental data plotting, the system will automatically generate an η-T graph based on the experimental data and generate an experimental report, where η is the viscosity coefficient of the liquid and T is the temperature of the liquid.
[0101] The exploration interface of the viscosity coefficient of commonly used liquids in life: It is used to set a variety of commonly used liquids in life according to experimental requirements at a given temperature, let the ball move in different liquids, visualize the movement process of the ball, measure the displacement and instantaneous velocity of the ball in real time, generate experimental reports and experimental analysis charts of different liquid viscosity coefficients, and automatically give error analysis results. Specifically, it is used to observe and explore the movement behavior of the ball in liquids with large viscosity coefficients in common life and simulate the measurement of the viscosity coefficients of these liquids. For example: This module sets castor oil, glycerin, honey, detergent and soybean oil as commonly used liquids in life, uses a simulation temperature control device to adjust the liquid temperature to a certain value, conducts experiments, and the system automatically simulates and outputs the animation process of the ball moving in 5 liquids, outputs the displacement and instantaneous velocity of the ball in real time, and the system drawing function gives the St diagram and vt diagram of the same ball moving in different liquids. This module automatically calculates the viscosity coefficients of different liquids, gives error analysis, and generates experimental reports.
[0102] (2) Setting the switching of multiple experimental operation interfaces and the switching of multiple experimental instrument selections;
[0103] Place a pushbutton control on the interface that needs to be switched, set its display text and button style through the property editor; write the callback function of this button control, set its display property (Visible) in combination with the tag (Tag) of the two interfaces that need to be switched, and ensure that one scene is loaded and the rest are disabled during operation. Example: set(handles.jiemian1,'visible','off') sets the scene of interface 1 to be disabled, otherwise 'on' means loading the scene. The logical relationship should be: set the current interface to be disabled; after setting, the interface needs to be loaded. This can realize the switching of the running interface and the switching of the experimental instrument selection.
[0104] Run with callback function, read the required image file in the image database, and display it on the coordinate axis. Example: axes(handles.axes1); Tu1 = imread('Tu1.png'); image(Tu1) The imread function is used to read the image content, and the image function displays the image on the coordinate axis axes1.
[0105] Controllable loop display implementation method: After the user clicks the left or right switch button, first obtain the page number of the current display content, and then add or subtract 1 according to the button function as the basis for the switch function to select the case, and display the content of the corresponding page number of the case in the corresponding case. If the page number exceeds the predetermined range, then in this case, display the first page of content and set the page number back to 1.
[0106] (3) Experimental equipment modeling
[0107] (3.1) Creation of two-dimensional models of vernier calipers, micrometer screws, stopwatches, and intelligent temperature control devices;
[0108] 3.1.1) Create a panel and place the axis on the panel to avoid program confusion, because the axis is time-sensitive and will only be displayed when the drawing program is running. Therefore, if the axis is not used with the panel, the image will not be loaded when you return to the interface again;
[0109] 3.1.2) Combined with the label of the coordinate axis, read the two-dimensional image file of the required experimental equipment in the image library and display it on the coordinate axis. Example: axes(handles.axes1); Tu1 = imread('Tu1.png'); image(Tu1) The imread function is used to read the image content 'Tu1', and the image function is used to display the image;
[0110] 3.1.3) Overlay the required button controls and value display boxes at the corresponding positions of the coordinate axes, and set their display text and button style through the property editor;
[0111] 3.1.4) Use the callback function of the button to control the properties of the text (string) in the digital display box. The logical relationship should be: first obtain the value in the text, adjust the value according to the button function, and reassign the adjusted value to the text box. At the same time, in the design process, consider the upper limit of the actual instrument and use the if function to limit the adjustable range of the button. Example In this simulation experiment, left-click the "+" and "-" keys of the mouse to simulate the movement of the active foot of the vernier caliper, the movement of the micrometer screw of the micrometer, and the adjustment of the target liquid temperature.
[0112] (3.2) 3D rendering of long tubes and liquids
[0113] The basic experimental elements: liquid, small ball, tube diameter and temperature are all determined, so a three-dimensional experimental apparatus diagram of a long tube and liquid can be drawn.
[0114] 3.2.1) Activate the drawing function. After the user clicks the "average value" button in the experimental report, it indicates that the parameters required for drawing the long tube have been determined, so write the drawing program in the callback function of this button.
[0115] 3.2.2) Use the cylinder function to generate the relevant parameter matrix (x, y, z) of a cylinder with a radius of D / 2, and then use the surf function to draw the long tube and liquid. The color and transparency of the liquid are achieved by setting its "facecolor" and "facealpha" properties.
[0116] 3.2.3) Use the fill function to draw the bottom of the tube, and the fill3 function to draw the liquid surface.
[0117] (3.3) Setting of experimental measurement interval in photogate instrument
[0118] 3.3.1) Place a slider control on the right side of the long tube, set the upper and lower limits of the slider in its properties based on the actual parameters, that is, the upper and lower limits of the photoelectric gate measurement interval, and place a reading display box above the slider;
[0119] 3.3.2) Write a callback function for the slider. Each time the slider is moved, its Value is displayed in the reading display box. At the same time, use the plot function to draw the upper and lower gates at the corresponding positions of the long tube to complete the setting of the experimental measurement interval in the photoelectric gate instrument.
[0120] (4) Combining the empirical formula of the change of liquid viscosity coefficient and density with temperature, citing the traditional experimental principle analysis and Newton's second law, the change of the falling speed and displacement of the ball with time and the time taken for the experimental ball to fall at a uniform speed in the measurement interval are deduced;
[0121]
[0122]
[0123]
[0124] Where η is the viscosity of the liquid, Pa·S; d is the diameter of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; D is the tube diameter, m; l is the measurement distance between the starting point and the end point of the experimental ball, m; v is the speed of the experimental ball when it falls, m / s; s is the falling distance of the experimental ball, m; t is the measurement time of the uniform falling of the experimental ball, s; T is the measured liquid temperature, K; m is the mass of the experimental ball, g; v0 is the final speed of the experimental ball, m / s;
[0125] Specifically, step (4) is: (4.1) Traditional experimental data collection:
[0126] The empirical formula for simulating the change of the empirical viscosity coefficient of the liquid with temperature T is:
[0127]
[0128] The fitting formula for the change of liquid density with temperature T is:
[0129] ρ=CN·T
[0130] Among them, η jy is the empirical viscosity of the liquid, Pa·S; A and B are characteristic constants of the empirical formula of the variation of the viscosity of the liquid with temperature; T is the temperature of the liquid, K; ρ is the density of the liquid, Kg / m 3 ; C and N are characteristic constants of the empirical formula of liquid density changing with temperature;
[0131] (4.2) Based on the traditional experimental data in step (4.1), the empirical formulas for the variation of viscosity and density with temperature are obtained:
[0132]
[0133] g is the acceleration due to gravity, m / s 2 ; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; t is the measurement time of the uniform falling of the experimental ball, s; a is the acceleration of the experimental ball when it moves in the liquid, m / s 2 ; l is the measured distance between the starting point and the end point of the experimental ball, m; v is the falling speed of the experimental ball, m / s;
[0134] (4.3) Set the initial velocity of the experimental ball to zero, superimpose a small random quantity that obeys the normal distribution on the basis of the empirical formula in step (4.2), integrate both sides with respect to t, substitute them into the above formula, and obtain the simulated relationship between the falling velocity of the experimental ball and time:
[0135]
[0136] Then by
[0137] ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, v is the speed of the experimental ball when it falls, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g;
[0138] Integrate both sides with respect to t, and similarly simulate the relationship between the falling distance and time of the experimental ball:
[0139]
[0140] ρ1 is the density of the experimental ball, Kg / m 3; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, Pa·S; v is the falling speed of the experimental ball, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g;
[0141] Then we can get the simulation time that the experimental ball takes to fall at a uniform speed in the measurement interval:
[0142]
[0143] t is the measurement time of the uniform falling of the experimental ball, s; l is the measurement distance between the starting point and the end point of the experimental ball, m; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; η is the viscosity coefficient of the liquid, Pa·S; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; v0 is the final velocity of the experimental ball;
[0144] Then the computational model of the falling experimental ball is determined.
[0145] (5) According to the calculation model of step (4) and the experimental equipment of step (3), a time axis starting from 0 is established, and the measurement time t of the uniform falling of the experimental ball is used as the iteration (loop) variable. The dynamic image simulation and drawing functions of the Matlab platform are used to complete the simulation of the falling ball method for measuring the viscosity coefficient of the liquid in the Matlab GUI; specifically:
[0146] (5.1) Determine the experimental conditions according to the calculation model of step (4) and the experimental equipment selected in the experimental equipment module of step (5);
[0147] (5.2) Establish a time axis starting from 0, and use the measurement time t required for the experimental ball to fall as the iteration (loop) variable. Use the Matlab if function to limit the iteration process. If the falling position of the experimental ball reaches the bottom of the long tube, the iteration is terminated. Otherwise, use the Matlab plot function to plot the current experimental ball and obtain the current frame getframe;
[0148] (5.3) Use the Matlab WriteVideo function to store each frame, obtain a visualized image of the experimental ball motion, and complete the simulation of the falling ball method experiment for measuring liquid viscosity.
[0149] Example 2
[0150] This embodiment is based on the simulation method of the falling ball method for measuring the viscosity coefficient of liquids by Matlab GUI. On the basis of Embodiment 1, the user login interface in step (1) is set up, and the specific operation is as follows: a text field is set up to record and store user information, and the information will be stored in the "string" attribute of the text field. When the user information needs to be called for subsequent performance statistics, for example: get(handles.text1,'string') calls the content in text field 1. At the same time, a user information detection mechanism is set up, and the if function is used to limit the format of the user input information. If the format input is incorrect, the errordlg function is used to remind the user to re-enter.
[0151] Before the experiment, the login information entered by the user is checked when entering the virtual simulation system to verify the user's identity. The purpose is to explain the purpose of the experiment, the experimental instruments, the experimental principles and precautions. Specifically, it is used to identify the login information (student number and name) entered by the user in the user login interface of the virtual simulation system. The virtual simulation system judges the input login information. If it is judged that the login information is entered incorrectly, it will give a prompt (information error, please re-enter) and clear the login information entered by the user. If it is judged that the login information is entered correctly, the virtual simulation system will be loaded and run to allow the user to enter the virtual simulation system.
[0152] In addition, after step (5), step (6) is further included, specifically: using Matlab polyfit function to fit the data to obtain a fitting straight line formula, and then using Matlab polyval function combined with plot function to draw the fitting straight line, to obtain an experimental variable relationship diagram of the experimental ball ending speed v0 and the ratio of the experimental ball diameter to the tube diameter d / D; see Figure 2 and Figure 3 , specifically:
[0153] (6.1) Repeat step (5) to simulate the experimental process of the experimental ball motion under different tube diameters and ideal conditions of tube diameter D→∞;
[0154] (6.2) Based on the experimental data of step (6.1), the Matlab polyfit function is used to fit the velocity ν of the experimental ball falling uniformly in the infinitely extended continuous fluid. 0修正后 Relationship with the ratio d / D of the experimental ball diameter to the tube diameter:
[0155]
[0156] ν 0修正前 is the speed of the experimental ball falling uniformly in the infinitely extended continuous fluid (ideal speed); ν 0修正后is the corrected velocity of the experimental ball when it falls uniformly in the infinitely extended continuous fluid; d is the diameter of the experimental ball, m; D is the tube diameter, m;
[0157] (6.3) The fitting straight line is plotted using the Matlab polyval function combined with the plot function to obtain the experimental variable relationship diagram of the experimental ball's final velocity v0 and the ratio of the experimental ball diameter to the tube diameter d / D.
[0158] Further defined, the method further comprises step (7), specifically:
[0159] (7.1) Repeat step (5) to simulate the motion experiment of experimental balls with different diameters;
[0160] (7.2) According to the calculation model of step (4), use Matlabplot function to draw the displacement and velocity of the experimental ball over time, i.e. St graph and vt graph;
[0161] (7.3) Track the moment when the experimental ball enters the uniform motion state, establish a time axis starting from 0, use the measured time t required for the experimental ball to fall as the iteration (loop) variable, and use the Matlab if function to limit the iteration process. If the change in the speed of the experimental ball is less than 10 compared with the speed at the previous moment, -3 , the iteration is terminated, and the data point is marked using the Matlab data marking function, and the data point at the same time is also marked on the St graph.
[0162] See also Figure 5 , Figure 6 Under the same experimental conditions, the experimental balls with larger diameters (within the allowable range of tube diameter) enter the uniform motion state later, and the falling distance before entering the uniform motion state is longer and the final speed is greater, but the difference is extremely small, that is, the experimental balls with different diameters can almost be regarded as entering the uniform motion state at the moment of immersion in the liquid surface.
[0163] Example 3
[0164] This embodiment is based on the simulation method of the falling ball method experiment for measuring the viscosity coefficient of liquid using Matlab GUI. On the basis of Embodiment 1, it further includes step (8) after step (5), which is specifically:
[0165] (8.1) Repeat step (5) to simulate the experimental process of the experimental ball moving under different temperature conditions; if the temperature is changed, repeat multiple times to measure the displacement, instantaneous velocity and liquid viscosity coefficient of the experimental ball under different temperatures;
[0166] (8.2) Based on the experimental data of step (8.1), use Matlab polyfit function to fit the relationship between the viscosity coefficient of the liquid and the temperature;
[0167] (8.3) Repeat the experiment at least 5 times, take the average value of the 5 experiments, and then use the Matlab polyval function combined with the plot function to fit the η-T graph of the same experimental ball moving at different temperatures, where η is the viscosity coefficient of the liquid and T is the temperature of the liquid. Generate an experimental report on the viscosity coefficient of the liquid at different temperatures and an experimental analysis chart of the viscosity coefficient of the liquid at different temperatures, see Figure 7 , Figure 8 .Depend on Figure 7 , Figure 8 Not only can we observe the movement of the experimental ball at different temperatures, but we can also see that as the temperature increases, the viscosity coefficient of the liquid decreases.
[0168] Example 4
[0169] This embodiment is based on the simulation method of the falling ball method for measuring the viscosity coefficient of liquid based on Matlab GUI. On the basis of Embodiment 1, step (9) may be further included after step (5), i.e., simulating the movement process of the experimental ball in different liquids, specifically:
[0170] (9.1) Repeat step (5) to simulate the experimental process of the experimental ball moving in different liquids under the condition of fixed temperature T; for example, the experimental ball moves in 5 liquids commonly used in life (castor oil, glycerin, honey, detergent and soybean oil);
[0171] (9.2) Obtain the experimental data obtained in step (9.1), and use the Matlab polyfit function to fit the displacement and instantaneous velocity of the experimental ball;
[0172] (9.3) Use Matlab polyval function combined with plot function to fit the St diagram and vt diagram of the same experimental ball moving in different liquids, calculate the viscosity coefficient of different liquids, give error analysis, and generate an experimental report. From experimental observations, it can be seen that when the temperature changes, the changes in the viscosity coefficient of different liquids are different. This is because the correlation coefficients of different liquids are different and the functional relationship is nonlinear.
[0173] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A simulation method for measuring liquid viscosity coefficient experiment by simulating falling ball method based on Matlab GUI, characterized in that: The following steps are involved: (1) Use the MATLAB platform to create the running interface of the falling ball method experiment for measuring liquid viscosity coefficient and build an image database; (2) Setting the switching of multiple experimental operation interfaces and the switching of multiple experimental instrument selections; (3) Construction of experimental equipment model; (4) Based on the formula for the change of liquid viscosity coefficient and density with temperature, determine the change of the falling speed and displacement of the experimental ball with time and the time taken for the experimental ball to fall at a uniform speed in the measurement interval; Where η is the viscosity of the liquid, Pa·S; d is the diameter of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; D is the tube diameter, m; l is the measurement distance between the starting point and the end point of the experimental ball, m; v is the speed of the experimental ball when it falls, m / s; s is the falling distance of the experimental ball, m; t is the measurement time of the uniform falling of the experimental ball, s; T is the measured liquid temperature, K; m is the mass of the experimental ball, g; v0 is the final speed of the experimental ball, m / s; (5) Based on the calculation model of step (4) and the experimental equipment of step (3), a time axis starting from 0 is established, and the measured time t of the uniformly falling experimental ball is used as the iterative variable. The dynamic simulation and drawing functions of the experimental ball are realized by using the Matlab platform, and the visual simulation of the falling ball method for measuring the viscosity coefficient of the liquid is completed by using the Matlab GUI.
2. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 1 is characterized in that: The step (2) sets the switching of multiple experiment operation interfaces and the switching of experimental instrument selection, and the specific operations are as follows: (2.1) Place a pushbutton control on the interface to be switched, and set its display text and button style through the property editor; (2.2) Write the callback function of this button control, and set its display property Visible in combination with the tag of the two interfaces to be switched. During operation, ensure that one scene is loaded and the other scenes are disabled, so as to realize the switching of multiple experimental operation interfaces and the switching of experimental instrument selection.
3. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 1 is characterized in that: The step (3) of modeling the experimental equipment specifically includes: (3.1) Creation of two-dimensional models of vernier calipers, micrometer screws, stopwatches, and intelligent temperature control devices; (3.2) Three-dimensional rendering of long tubes and liquids; (3.3) Setting of experimental measurement interval in photogate instrument.
4. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 3 is characterized in that: The step (3.1) of creating the two-dimensional model of the vernier caliper, micrometer screw, stopwatch and intelligent temperature control device is specifically as follows: 3.1.1) Create a panel and place the coordinate axis Axes on the panel Panel; 3.1.2) Read the two-dimensional image file of the required experimental equipment from the image database in combination with the label of the coordinate axis and display it on the coordinate axis; 3.1.3) Overlay the required button controls and value display boxes at the corresponding positions of the coordinate axes, and set their display text and button style through the property editor; 3.1.4) Use the callback function of the button to control the properties of the text string in the digital display box, obtain the value in the text, adjust the value according to the button function, and reassign the adjusted value to the text box. At the same time, use the Matlab if function to limit the adjustable range of the button; (3.2) Three-dimensional rendering of long tubes and liquids, including: 3.2.1) Activate the drawing function. After the user clicks the "average value" button in the experimental report, it indicates that the parameters required for drawing the long tube have been determined. Write the drawing program in the callback function of this button; 3.2.2) Use the Matlab cylinder function to generate the relevant parameter matrix (x, y, z) of a cylinder with a radius of D / 2, and then use the Matlab surf function to draw the long tube and liquid. The color and transparency of the liquid are achieved by setting its "facecolor" and "facealpha" properties; 3.2.3) Use Matlab fill function to draw the bottom of the tube, and then use Matlab fill3 function to draw the liquid surface, completing the three-dimensional drawing of the long tube and liquid; (3.3) The setting of the experimental measurement interval in the photogate instrument includes: 3.3.1) Place a slider control on one side of the long tube, set the upper and lower limits of the slider in its properties, and then determine the upper and lower limits of the photoelectric gate measurement interval, and place a reading display box above the slider; 3.3.2) Write a callback function for the slider. Each time the slider is moved, its Value is displayed in the reading display box. At the same time, use the Matlab plot function to draw the upper and lower gates at the corresponding positions of the long tube to complete the setting of the experimental measurement interval in the photoelectric gate instrument.
5. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 1 is characterized in that: The step (4) is specifically: (4.1) Traditional experimental data collection: The empirical formula for simulating the change of the empirical viscosity coefficient of the liquid with temperature T is: The fitting formula for the change of liquid density with temperature T is: ρ=CN·T Among them, η jy is the empirical viscosity of the liquid, Pa·S; A and B are characteristic constants of the empirical formula of the variation of the viscosity of the liquid with temperature; T is the temperature of the liquid, K; ρ is the density of the liquid, Kg / m 3 ; C and N are characteristic constants of the empirical formula of liquid density changing with temperature; (4.2) Based on the traditional experimental data in step (4.1), the empirical formulas for the variation of viscosity and density with temperature are obtained: g is the acceleration due to gravity, m / s 2 ; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; t is the measurement time of the uniform falling of the experimental ball, s; the acceleration of the experimental ball when moving in the liquid, m / s 2 ; l is the measurement distance between the starting point and the end point of the experimental ball, m; (4.3) Set the initial velocity of the experimental ball to zero, superimpose a small random quantity that obeys the normal distribution on the basis of the empirical formula in step (4.2), integrate both sides with respect to t, substitute them into the above formula, and obtain the simulated relationship between the falling velocity of the experimental ball and time: Then by ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, v is the speed of the experimental ball when it falls, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g; Integrate both sides with respect to t, and similarly simulate the relationship between the falling distance and time of the experimental ball: ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; s is the falling distance of the experimental ball, m; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; η is the viscosity coefficient of the liquid, Pa·S; v is the falling speed of the experimental ball, m / s; t is the measurement time of the uniform falling of the experimental ball, s; D is the tube diameter, m; m is the mass of the experimental ball, g; Then we can get the simulation time that the experimental ball takes to fall at a uniform speed in the measurement interval: t is the measurement time of the uniform falling of the experimental ball, s; l is the measurement distance between the starting point and the end point of the experimental ball, m; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; η is the viscosity coefficient of the liquid, Pa·S; ρ1 is the density of the experimental ball, Kg / m 3 ; ρ2 is the density of the experimental liquid, Kg / m 3 ; g is the acceleration due to gravity, m / s 2 ; d is the diameter of the experimental ball, m; v0 is the final velocity of the experimental ball, m / s; Then the computational model of the falling experimental ball is determined.
6. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 1 is characterized in that: The step (5) is specifically as follows: (5.1) Determine the experimental conditions according to the calculation model of step (4) and the experimental equipment selected in the experimental equipment module of step (3); (5.2) Establish a time axis starting from 0, take the measured time t required for the experimental ball to fall as the iteration variable, and use the Matlab if function to limit the iteration process. If the falling position of the experimental ball reaches the bottom of the long tube, the iteration is terminated. Use the Matlab plot function to plot the current experimental ball and get the current frame getframe; (5.3) Use the Matlab WriteVideo function to store each frame, and use the principle of visual persistence to animate each frame to obtain a visualized experimental ball motion state, completing the simulation of the falling ball method experiment to measure liquid viscosity coefficient.
7. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 6 is characterized in that: The step (5) further includes a step (6), which is specifically: using the Matlab polyfit function to fit the data to obtain a fitting straight line formula, and then using the Matlab polyval function combined with the plot function to draw the fitting straight line to obtain an experimental variable relationship diagram of the experimental ball terminal speed v0 and the ratio of the experimental ball diameter to the tube diameter d / D of the experimental ball motion.
8. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation falling ball method according to claim 7 is characterized in that: The step (6) is specifically as follows: (6.1) Repeat step (5) to simulate the experimental process of the experimental ball motion under different tube diameters and ideal conditions of tube diameter D→∞; (6.2) Based on the experimental data of step (6.1), the Matlab polyfit function is used to fit the velocity ν of the experimental ball falling uniformly in the infinitely extended continuous fluid. 0修正后 Relationship with the ratio d / D of the experimental ball diameter to the tube diameter: ν 0修正前 is the ideal velocity of the experimental ball falling uniformly in an infinitely extended continuous fluid; ν 0修正后 is the corrected velocity of the experimental ball falling uniformly in the infinitely extended continuous fluid; d is the diameter of the experimental ball, m; D is the diameter of the tube, m; (6.3) The fitting straight line is plotted using the Matlab polyval function combined with the plot function to obtain the experimental variable relationship diagram of the experimental ball's final velocity v0 and the ratio of the experimental ball diameter to the tube diameter d / D.
9. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation of falling ball method according to claim 7 or 8, characterized in that: The method further comprises step (7), which is specifically: (7.1) Repeat step (5) to simulate the motion experiment of experimental balls with different diameters; (7.2) According to the calculation model of step (4), use Matlabplot function to draw the displacement and velocity of the experimental ball over time, i.e. St graph and vt graph; (7.3) Track the moment when the experimental ball enters the uniform motion state, establish a time axis starting from 0, take the measured time t required for the experimental ball to fall as the iteration variable, and use the Matlab if function to limit the iteration process. If the change in the falling speed of the experimental ball is less than 10 compared with the previous moment, -3 , the iteration is terminated, and the data point is marked using the Matlab data marking function, and the data point at the same time is also marked on the St graph.
10. The simulation method for measuring liquid viscosity coefficient experiment based on Matlab GUI simulation of falling ball method according to claim 7, characterized in that: The method further comprises step (8), which is specifically: (8.1) Repeat step (5) to simulate the experimental process of the ball motion under different liquid temperatures; (8.2) Based on the experimental data of step (8.1), use Matlab polyfit function to fit the relationship between the viscosity coefficient of the liquid and the temperature; (8.3) Use Matlab polyval function combined with plot function to plot the fitting curve and obtain the relationship between the viscosity coefficient of the liquid and temperature.
Citation Information
Patent Citations
Liquid viscosity coefficient measurement method and device based on linear array CCD
CN105319150A
Experimental device and method for measuring liquid viscosity coefficient through U-shaped tube
CN105606491A