Physical computing system, physical computing method, physical computing program, server, and user terminal

The physics calculation system simplifies the simulation of physical quantities in a spatial lattice by allowing user-friendly input of functions, enhancing usability and efficiency through polymorphic inheritance and GPU utilization.

JP2025152306APending Publication Date: 2025-10-09JFE STEEL CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024054137
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-10-09

AI Technical Summary

Technical Problem

Existing physics simulation methods require specialized knowledge, making them difficult for users to utilize effectively.

Method used

A physics calculation system utilizing a base class and framework class with polymorphic inheritance, allowing users to input functions for initial conditions, boundary conditions, and physical functions, which are then used to generate and simulate changes in a spatial lattice using a GPU.

Benefits of technology

Enables easy and efficient simulation of physical quantities in a spatial grid, reducing the need for specialized knowledge and improving usability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025152306000001_ABST
    Figure 2025152306000001_ABST
Patent Text Reader

Abstract

To provide a physical computing system which allows physical simulation to be easily utilized.SOLUTION: A physical computing system simulates changes in a physical amount in a space lattice. The physical computing system comprises: a storage section for storing a base class for defining a type in polymorphism, and a framework class for simulating changes in a physical amount in a space lattice using a derivative class succeeding a type of the base class; and a control section which generates a derivative class according to an input of a user for an initial condition function of a base class, delivers the generated derivative class to a framework class, executes the framework class to generate a space lattice, generates a respective derivative class according to an input of a user with respect to a boundary condition function and a physical function of the base class, delivers the generated class to the framework class and executes the framework class to simulate changes in a physical amount in a space lattice.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a physics calculation system, a physics calculation method, a physics calculation program, a server, and a user terminal. [Background technology]

[0002] It is necessary to use physical functions to simulate changes in physical quantities in a spatial grid and estimate the operating status of the equipment in order to improve the efficiency of manufacturing equipment operation, analyze the causes of failures, or for design, etc. Furthermore, by elucidating the physical phenomena in manufacturing processes in detail, it is possible to improve operations and propose new processes.

[0003] Non-Patent Document 1 describes a physical simulation method that combines adaptive mesh refinement (AMR) and a graphics processing unit (GPU). This method achieves both high speed and high accuracy of calculations by redividing the spatial grid. [Prior art documents] [Non-patent literature]

[0004] [Non-Patent Document 1] Takashi Shimokawabe, "Development of AMR Law Frameworks Towards Various Architectures," [online] Interdisciplinary Large-Scale Information Infrastructure Joint Usage and Research Center, FY2017 Joint Research Final Report, May 2018, [Retrieved February 28, 2024], Internet <URL:google.com / url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiuyvCjluaCAxUqh1YBHcmjBcYQFnoECA0QAQ&url=https%3A%2F%2Fjhpcn-kyoten.itc.u-tokyo.ac.jp%2Fdownload%2Ffinal%2Fjh170044-NAH.pdf&usg=AOvVaw1WYoJTcfPYQL5RdT2eZ27Z&opi=89978449> Summary of the Invention [Problem to be solved by the invention]

[0005] However, in order to simulate changes in physical quantities in a spatial grid using physical functions, users are required to have specialized knowledge, and therefore it has not been easy to use.

[0006] The present invention has been made in view of the above, and aims to provide a physics calculation system, a physics calculation method, a physics calculation program, a server, and a user terminal that enable easy use of physics simulation. [Means for solving the problem]

[0007] [1] In order to solve the above-mentioned problems and achieve the object, a physics calculation system according to one aspect of the present invention is a physics calculation system that simulates changes in physical quantities in a spatial lattice, the system comprising: a storage unit that stores: a base class that defines a type in polymorphism, the base class including: an initial condition function that represents the spatial distribution of the physical quantity at the start of calculation; a boundary condition function that specifies a condition that the physical quantity must satisfy at the boundary between a calculation domain and another domain; and a physical function that specifies a change amount of the physical quantity per unit time; and a framework class that simulates changes in the physical quantity in the spatial lattice using a derived class that inherits the type of the base class; and a control unit that generates the derived class in response to a user's input for the initial condition function of the base class, passes the generated derived class to the framework class, executes the framework class to generate the spatial lattice, generates the derived class in response to user's input for the boundary condition function and the physical function of the base class, respectively, passes the generated derived class to the framework class, and executes the framework class to simulate changes in the physical quantity in the spatial lattice.

[0008] [2] Furthermore, in the physics calculation system according to one aspect of the present invention, in the above [1], the base class includes a refinement determination function used to determine grid refinement in the adaptive refinement method, and the control unit generates the derived class in response to user input for the initial condition function and the refinement determination function of the base class, passes the generated derived class to the framework class, and executes the framework class to generate the spatial grid.

[0009] [3] Furthermore, in the physics calculation system according to one aspect of the present invention, in the above [2], the control unit executes the framework class to optimize the spatial grid.

[0010] [4] In addition, in a physics calculation system according to one aspect of the present invention, in the above [2] or [3], the control unit generates the derived classes using dynamic polymorphism in response to user inputs to the initial condition function, the refinement determination function, and the boundary condition function of the base class, and generates the derived classes using static polymorphism in response to user inputs to the physics functions of the base class.

[0011] [5] Furthermore, in the physics calculation system according to one aspect of the present invention, in any one of the above [1] to [4], the control unit is a GPU.

[0012] [6] Furthermore, a physics calculation method according to one aspect of the present invention provides a physics calculation system that simulates changes in a physical quantity in a spatial lattice, the physics calculation system using a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of the physical quantity at the start of calculation, a boundary condition function that specifies a condition that the physical quantity satisfies at the boundary between a calculation domain and another domain, and a physical function that specifies a change amount of the physical quantity per unit time, and a framework class that simulates changes in the physical quantity in the spatial lattice using a derived class that inherits the type of the base class, generates the derived class in response to a user's input for the initial condition function of the base class, passes the generated derived class to the framework class, and executes the framework class to generate the spatial lattice, generates the derived class in response to user input for the boundary condition function and the physical function of the base class, respectively, passes the generated derived class to the framework class, and executes the framework class to simulate changes in the physical quantity in the spatial lattice.

[0013] [7] Furthermore, a physics calculation program according to one aspect of the present invention is a physics calculation program used in a physics calculation system that simulates changes in physical quantities in a spatial lattice, the physics calculation program using a base class that defines a type in polymorphism, the base class including: an initial condition function that represents the spatial distribution of the physical quantity at the start of calculation; a boundary condition function that specifies a condition that the physical quantity must satisfy at the boundary between a calculation domain and another domain; and a physical function that specifies a change amount of the physical quantity per unit time; and a framework class that simulates changes in the physical quantity in the spatial lattice using a derived class that inherits the type of the base class, the physics calculation program generates the derived class in response to a user's input for the initial condition function of the base class, passes the generated derived class to the framework class, and executes the framework class to generate the spatial lattice, generates the derived class in response to user input for the boundary condition function and the physical function of the base class, respectively, passes the generated derived class to the framework class, and executes the framework class to simulate changes in the physical quantity in the spatial lattice.

[0014] [8] Furthermore, a server according to one aspect of the present invention is a server included in a physics calculation system that simulates changes in physical quantities in a spatial grid, and includes: a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of the physical quantities at the start of calculation, a boundary condition function that specifies a condition that the physical quantities must satisfy at the boundary between a calculation domain and another domain, and a physical function that specifies a change amount of the physical quantities per unit time; and a framework class that simulates changes in the physical quantities in the spatial grid using a derived class that inherits the type of the base class, and a control unit that generates the derived class in response to a user's input for the initial condition function of the base class, passes the generated derived class to the framework class, executes the framework class to generate the spatial grid, generates the derived class in response to user's input for the boundary condition function and the physical function of the base class, respectively, passes the generated derived class to the framework class, and executes the framework class to simulate changes in the physical quantities in the spatial grid.

[0015] [9] Furthermore, a user terminal according to one aspect of the present invention is a user terminal included in a physics calculation system that simulates changes in physical quantities in a spatial grid, and is equipped with an input unit that accepts user inputs for the initial condition function, the boundary condition function, and the physical function of a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of the physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time, and a control unit that acquires calculation results obtained by executing a framework class that simulates changes in the physical quantity in the spatial grid using a derived class that inherits the type of the base class, and outputs the calculation results to a predetermined output unit that is set by the user in a predetermined format that is set by the user. [Effects of the Invention]

[0016] According to the present invention, it is possible to realize a physics calculation system, a physics calculation method, a physics calculation program, a server, and a user terminal that allow easy use of physics simulation. [Brief explanation of the drawings]

[0017] [Figure 1] FIG. 1 is a block diagram showing the configuration of a physics calculation system according to one embodiment of the present invention. [Figure 2] FIG. 2 is a flowchart illustrating a mesh generation method according to one embodiment of the present invention. [Figure 3] FIG. 3 is a flowchart illustrating a mesh optimization method according to one embodiment of the present invention. [Figure 4] FIG. 4 is a flowchart showing a method for simulating changes in physical quantities in a spatial lattice according to one embodiment of the present invention. [Figure 5] FIG. 5 is a diagram showing the base class of the initial condition function. [Figure 6] FIG. 6 is a diagram showing derived classes of initial condition functions. [Figure 7] FIG. 7 is a diagram illustrating grid generation using an initial condition function in the framework class. [Figure 8] FIG. 8 is a diagram illustrating the passing of an initial condition function to a framework class. [Figure 9] FIG. 9 is a diagram showing base classes of boundary condition functions. [Figure 10] FIG. 10 is a diagram showing derived classes of boundary condition functions. [Figure 11] FIG. 11 is a diagram showing the registration of boundary condition functions in a framework class. [Figure 12] FIG. 12 is a diagram showing the passing of boundary condition functions to framework classes. [Figure 13] FIG. 13 is a diagram illustrating the implementation of physics functions in framework classes. [Figure 14]FIG. 14 is a diagram showing base classes of physical functions. [Figure 15] FIG. 15 is a diagram showing derived classes of physical functions. [Figure 16] FIG. 16 is a diagram illustrating the initialization of a mesh and the execution of a physics function. [Figure 17] FIG. 17 is a diagram illustrating an example of a base class. [Figure 18] FIG. 18 is a diagram showing an example of input of the initial condition function. [Figure 19] FIG. 19 is a diagram showing the passing of the initial condition function to the framework class. [Figure 20] FIG. 20 is a diagram showing an example of input of a boundary condition function. [Figure 21] FIG. 21 is a diagram showing the transfer of boundary condition functions to framework classes. [Figure 22] FIG. 22 is a diagram showing an example of input of a physical function. [Figure 23] FIG. 23 is a diagram showing the transfer of physics functions to framework classes. [Figure 24] FIG. 24 is a diagram illustrating an example of a simulation result of the physical quantity by the AMR lattice according to the first embodiment. [Figure 25] FIG. 25 is a diagram showing an example of a simulation result of physical quantities using a single lattice. [Figure 26] FIG. 26 is a diagram illustrating the transfer to the framework class in the second embodiment. [Figure 27] FIG. 27 is a diagram illustrating an example of a simulation result of the physical quantity by the AMR lattice according to the second embodiment. [Figure 28] FIG. 28 is a diagram showing an example of a simulation result of physical quantities using a single grid. DETAILED DESCRIPTION OF THE INVENTION

[0018] Below, embodiments of a physics calculation system, a physics calculation method, a physics calculation program, a server, and a user terminal according to the present invention will be described with reference to the drawings. Note that the present invention is not limited to these embodiments. In the following embodiments, the present invention can be generally applied to a physics calculation system, a physics calculation method, a physics calculation program, a server, and a user terminal that simulates changes in physical quantities in a spatial grid.

[0019] In addition, in the drawings, the same or corresponding elements are appropriately designated by the same reference numerals. It should be noted that the drawings are schematic, and the dimensional relationships and ratios of each element may differ from the actual situation. The dimensional relationships and ratios may also differ between the drawings.

[0020] (Embodiment) [Physics Calculation System Configuration] Figure 1 is a block diagram showing the configuration of a physics calculation system according to one embodiment of the present invention. As shown in Figure 1, the physics calculation system 1 according to this embodiment includes a server 10 and a user terminal 20 connected via a network N, and simulates changes in physical quantities in a spatial grid (hereinafter also referred to as a "mesh" or simply "grid").

[0021] The server 10 includes a communication unit 11, a control unit 12, and a storage unit 13.

[0022] The communication unit 11 includes, for example, a LAN (Local Area Network) interface board and a wireless communication circuit for wireless communication. The LAN interface board and the wireless communication circuit can be connected to a network N such as the Internet, which is a public communication network. The communication unit 11 is configured to be connected to the network N and to be able to communicate with other devices and the user terminal 20.

[0023] The control unit 12 includes, as hardware, a processor such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), and a main memory such as a RAM (Random Access Memory) or a ROM (Read Only Memory). The processor may be a DSP (Digital Signal Processor) or an FPGA (Field-Programmable Gate Array). The control unit 12 executes a physics calculation program stored in the memory unit 13 to perform a physics calculation method.

[0024] Specifically, the control unit 12 generates a derived class in response to a user's input to the initial condition function of the base class 131, passes the generated derived class to the framework class 132, executes the framework class 132 to generate or optimize a spatial grid, and stores the generated grid in the memory unit 13.

[0025] Furthermore, based on a program execution command transmitted from the user terminal 20, the control unit 12 generates derived classes in response to user inputs for the boundary condition functions and physical functions of the base class 131, passes the generated derived classes to the framework class 132, executes the framework class 132 to simulate changes in physical quantities in the spatial lattice, and outputs the calculation results to the user terminal 20 via the communication unit 11.

[0026] The storage unit 13 is configured with a storage medium selected from a volatile memory such as RAM, a non-volatile memory such as ROM, an erasable programmable ROM (EPROM), a hard disk drive (HDD), and removable media. The main memory may be included in the storage unit 13. The removable media is, for example, a universal serial bus (USB) memory or a disc storage medium such as a compact disc (CD), a digital versatile disc (DVD), or a Blu-ray (registered trademark) disc (BD). The storage unit 13 may also be configured with a computer-readable storage medium such as an externally attachable memory card.

[0027] The storage unit 13 can store an operating system (OS), various programs, various tables, various databases, and the like for executing the operations of the server 10. Here, the various programs include a physics calculation program that realizes the physics calculation method according to this embodiment. These various programs can also be recorded on computer-readable recording media such as a hard disk, flash memory, CD-ROM, DVD-ROM, or flexible disk, and widely distributed. The storage unit 13 may be provided in another server or user terminal 20 that can communicate via various networks. Alternatively, the storage unit 13 itself may be provided as a server on an independent network.

[0028] Specifically, the storage unit 13 stores a base class 131 and a framework class 132. Here, the base class 131 and the framework class 132 may be stored in the same storage unit 13 as shown in FIG. 1, or may be stored separately in multiple storage units 13.

[0029] The base class 131 defines a type in polymorphism. The base class 131 includes an initial condition function that represents the spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time. The base class 131 may also include a refinement judgment function used to determine mesh refinement in adaptive mesh refinement (AMR), a calculation condition function that sets calculation conditions (such as the size of the calculation mesh) for the framework class 132, etc.

[0030] The framework class 132 simulates changes in physical quantities in a spatial lattice using derived classes that inherit the type of the base class 131 .

[0031] The user terminal 20 includes an input unit 21, a communication unit 22, a control unit 23, and a storage unit 24.

[0032] The input unit 21 is configured using a user interface such as a keyboard and a mouse. The input unit 21 is configured so that a user can input predetermined information to the control unit 23 by operating the input unit 21. Specifically, the input unit 21 accepts user inputs for the initial condition function, subdivision determination function, boundary condition function, and physical function of the base class 131.

[0033] Like the communication unit 11, the communication unit 22 includes, for example, a LAN interface board and a wireless communication circuit for wireless communication. The LAN interface board and the wireless communication circuit are connectable to a network N such as the Internet, which is a public communication network. The communication unit 22 is configured to be connected to the network N and to be able to communicate with other devices and the server 10. When the control unit 12 of the server 10 outputs the simulated calculation results to the user terminal 20 via the communication unit 11, the results are received by the communication unit 22.

[0034] Similar to the control unit 12, the control unit 23 includes, as hardware, a processor such as a CPU, a DSP, an FPGA, or a GPU, and a main memory such as a RAM or a ROM. The control unit 23 executes various processes by executing programs stored in the memory unit 24.

[0035] Like the storage unit 13, the storage unit 24 is configured from a storage medium selected from a volatile memory such as RAM, a non-volatile memory such as ROM, an EPROM, a HDD, and a removable medium. Note that a main memory may be included in the storage unit 24. The storage unit 24 may also be configured using a computer-readable recording medium such as an externally attachable memory card.

[0036] The user terminal 20 may also include an output unit (not shown). When the output unit is included, the calculation results simulated by the server 10 using the control unit 12 are output to the output unit by the control unit 23 via the communication unit 22. The user can preset the format and output unit to which the calculation results are to be output. That is, the control unit 23 outputs the calculation results in a predetermined format that the user has preset for the control unit 23, to a predetermined output unit that the user has also preset for the control unit 23. Examples of the output unit include a display device such as a monitor, a printing device such as a printer, and a storage device such as a hard disk drive (HDD) or solid-state drive (SSD). For example, the user may instruct the control unit 12 via the control unit 23 to store the calculation results as electronic information in the storage unit 24.

[0037] The above-described physics calculation system 1 is merely an example, and the base class 131 or the framework class 132 may be stored in the storage unit 24, and some or all of the processing performed by the control unit 12 may be executed by the control unit 23. Furthermore, these processing may be executed by a single calculation device having the above-described functions, or by three or more calculation devices connected via a network N. The server 10 includes at least the above-described control unit 12. The storage unit 13 storing the base class 131 and / or the framework class 132 may be located inside the server 10, as shown in FIG. 1, or may be located outside the server 10, although not shown. When the storage unit 13 is located outside the server 10, the storage unit 13 communicates with the control unit 12 via a network or the like.

[0038] [Polymorphism] The physics calculation system 1 uses polymorphism to pass user-defined functions, including initial condition functions, subdivision determination functions, boundary condition functions, and physics functions, to the framework class 132 as objects.

[0039] There are two types of polymorphism: static polymorphism, which determines the derived class to be called at compile time, and dynamic polymorphism, which determines the derived class to be called at run time. In the present invention, it is preferable to use dynamic polymorphism and static polymorphism appropriately depending on the application.

[0040] In dynamic polymorphism, a derived class overrides (redefines) a pure virtual function defined in a base class 131. Here, a pure virtual function refers to a state in which there is no entity as a function and only the frame is declared. This makes it possible to treat the entity of the derived class as a base class as well. In other words, the derived class can be passed to the framework class 132 as the base class 131. On the other hand, when a function is called, it becomes possible to execute the content defined in the derived class. Dynamic polymorphism has a slower call speed, but allows for changes such as switching during program execution.

[0041] In the physics calculation system 1, the control unit 12 uses dynamic polymorphism to override (redefine) each pure virtual function in the base class 131, for example, in response to user input for the initial condition function and boundary condition function, thereby generating each derived class. For functions that are frequently modified or changed, such as the initial condition function and boundary condition function, compiling each time a modification or change is made is time-consuming and likely to cause problems. Therefore, it is desirable for the program to be able to be dynamically switched using flags or the like imported from a configuration file when the program is executed. From this perspective, it is preferable to use dynamic polymorphism for the initial condition function and boundary condition function.

[0042] In static polymorphism, a function with the same name as a function to be executed in the framework class 132 is defined in a derived class. By passing the derived class as a template argument to the framework class 132, the content of the function with the same name defined in the derived class is expanded inside the framework class 132 during compilation, and the content defined externally can essentially be executed inside the framework class 132. Static polymorphism has a fast calling speed, but does not allow changes such as switching during program execution.

[0043] In the physics calculation system 1, the control unit 12 uses static polymorphism to generate derived classes in response to user input for the physics functions of the base class 131, for example. Excessive use of dynamic polymorphism can lead to a decrease in execution performance. For this reason, it is preferable to use static polymorphism for functions that do not require switching at runtime, such as physics functions. Note that, depending on the programming language, the distinction between "dynamic" and "static" may not be made.

[0044] [Physical calculation method] Next, a physics calculation method will be described. The physics calculation method is realized by the physics calculation system executing a physics calculation program stored in the storage unit 13.

[0045] First, the process of generating an AMR grid will be described. Fig. 2 is a flowchart showing a mesh generation method according to an embodiment of the present invention. As shown in Fig. 2, the control unit 12 declares an AMR framework class (step S1).

[0046] Next, the control unit 12 declares an initial condition (step S2). Specifically, the control unit 12 generates a derived class in response to a user's input to the initial condition function of the base class 131, and transfers the generated derived class to the framework class 132. The control unit 12 also accepts a user's input of a subdivision determination function and transfers it to the framework class 132.

[0047] Then, the control unit 12 executes the initialization function execution subroutine (step S3). Specifically, the control unit 12 executes the initialization function execution subroutine in the framework class 132 to generate a spatial grid, and stores the spatial grid in the storage unit 13.

[0048] Next, the initialization function execution subroutine will be described. First, the control unit 12 declares the mesh structure and the pool structure (step S11).

[0049] Next, the control unit 12 uses the subdivision determination function received in step S2 to determine whether or not there is a grid to be subdivided (step S12).

[0050] If the control unit 12 determines that there is a grid to be subdivided (step S12: Yes), the control unit 12 sets the spatial distribution of the physical quantity as an initial condition in the physical quantity pool using the received initial condition function (step S13).

[0051] Furthermore, the control unit 12 subdivides all meshes that have been determined to be subdivided (step S14), and expands the physical quantity pool to store physical quantities in the meshes newly generated by the subdivision (step S15).

[0052] Thereafter, the process returns to step S12, and the processes of steps S12 to S15 are recursively executed until there are no more grids to be subdivided, and the generated subdivided meshes and the subdivided physical quantity pool are stored in the storage unit 13 (step S16).

[0053] By using the process described above, a user can generate an AMR grid simply by inputting an initial condition function of a type corresponding to the base class 131, so even users who are not familiar with physical simulations can easily use the AMR method.

[0054] Next, the process of optimizing the AMR grid will be described. FIG. 3 is a flowchart showing a mesh optimization method according to one embodiment of the present invention. As shown in FIG. 3, in step S23, the control unit 12 refines the mesh using the received initial condition function, and in step S24, the control unit 12 refines the physical quantity pool. The processes of steps S21, S22, and S25 may be similar to steps S11, S12, and S13, respectively, and therefore will not be described here. In this way, the physics calculation system 1 may refine the generated AMR grid and optimize it as appropriate.

[0055] By using the process described above, a user can appropriately optimize an AMR grid simply by inputting an initial condition function of a type corresponding to the base class 131, so even users who are not familiar with physical simulations can easily use the AMR method.

[0056] Next, a process for simulating changes in physical quantities in a spatial lattice will be described. Fig. 4 is a flowchart showing a method for simulating changes in physical quantities in a spatial lattice according to one embodiment of the present invention. As shown in Fig. 4, the control unit 12 declares boundary conditions required for constructing a stencil (a pool of physical quantities for referencing adjacent lattices) (step S31). Specifically, the control unit 12 generates a derived class in response to a user's input to a boundary condition function of the base class 131, and passes the generated derived class to the framework class 132.

[0057] Next, the control unit 12 declares the physical function (step S32). Specifically, the control unit 12 generates a derived class in response to a user's input for the physical function of the base class 131, and passes the generated derived class to the framework class 132.

[0058] Furthermore, the control unit 12 sets arguments (step S33). Specifically, the control unit 12 receives an input of argument settings from the user and passes them to the framework class 132.

[0059] Thereafter, the control unit 12 executes the GPU calculation execution subroutine (step S34). Specifically, the control unit 12 executes the GPU calculation execution subroutine in the framework class 132 to simulate changes in physical quantities in the spatial lattice, and outputs the calculation results to the user terminal 20 via the communication unit 11.

[0060] Next, the GPU calculation execution subroutine will be described. First, the control unit 12 reads out the subdivided mesh and the subdivided physical quantity pool from the storage unit 13 (step S41).

[0061] Next, the control unit 12 sets the boundary conditions using the received boundary condition functions (step S42).

[0062] Next, the control unit 12 sets the physical function using the received physical function (step S43).

[0063] Furthermore, the control unit 12 sets arguments to be used in the physical simulation using the received arguments (step S44).

[0064] Then, the control unit 12 performs special settings for performing GPU calculations (specifically, settings related to the number of parallel processes, memory usage, etc., which are written in CUDA, a programming language dedicated to GPUs) (step S45).

[0065] Thereafter, the control unit 12 launches the physical functions on the GPU and performs stencil construction (step S46).

[0066] Then, the control unit 12 calculates the time evolution equation of the physical quantity on the GPU according to the physical function (step S47).

[0067] Thereafter, the control unit 12 proceeds to the next step of calculation (step S48).

[0068] By the process described above, a user can execute a simulation of physical quantities in a spatial grid using a GPU simply by inputting boundary condition functions and physical functions of a type corresponding to the base class 131. Therefore, even a user who is not familiar with physical simulations can easily use a physical simulation using a GPU.

[0069] [Example of a physics calculation program] Next, a specific example of a physics calculation program will be described. In the following description, a case where the program is written in C++ will be shown as an example of the programming language. Therefore, if another programming language is used, the code will be written differently, but the concept of creating the code may be the same. As another programming language, Python (registered trademark) or Java (registered trademark), which are often used in numerical analysis, may also be used.

[0070] First, let's explain the initial condition function. Figure 5 shows the base class for the initial condition function. As shown in Figure 5, the InitialCondition class, which is the base class for the initial condition function on line 2, defines the calcCellCenterValue function, which is a function that calculates the initial condition, as a pure virtual function on line 5. As mentioned above, a pure virtual function refers to a state in which there is no entity as a function and only the frame is declared. Specifically, the calcCellCenterValue function is made a pure virtual function by adding the virtual modifier to the beginning of the function prototype declaration and substituting 0 into the function prototype declaration. Users must inherit this class and then re-implement the calcCellCenterValue function in the derived class. Furthermore, a base class cannot be declared as an instance (entity) as is; it must be inherited by the derived class.

[0071] Figure 6 is a diagram showing a derived class of the initial condition function. As shown in Figure 6, the derived class, DerivedInitialCondition class on line 2, inherits the base class, InitialCondition class, using the inheritance idiom ("class~InitialCondition" on line 2). Also, the calcCellCenterValue function, whose entity was not defined in the base class, is reimplemented on line 5. Specifically, the calculation content for the initial condition entered by the user is added to the " / / Enter specific initial condition calculation content..." section on line 6 in Figure 6. This allows the DerivedInitialCondition class to be treated as a class with the same type as the InitialCondition class. Meanwhile, when the function is called, the calcCellCenterValue function defined in the DerivedInitialCondition class is executed.

[0072] Figure 7 is a diagram showing grid generation using the initial condition function in the framework class. As shown in Figure 7, the AMRFramework class, which is the framework class on line 2, defines the setInitialCondition function on line 7, which can receive and register a pointer (address) of the InitialCondition class. Also, the init function, which calls the calcCellCenterValue function via the registered InitialCondition class pointer and executes mesh generation, is defined on line 12.

[0073] Figure 8 is a diagram showing how the initial condition function is passed to the framework class. Figure 8 also shows how it is actually used. First, the framework is defined on line 3, and the derived class of the initial condition function is defined on line 5. Then, on line 6, a pointer to the derived class is passed to the framework class. At this time, the pointer to the derived class can also be treated as a base class, so it can be passed as an argument. Then, on line 9, the computational mesh initialization function is called. At this time, within the framework class, the computational mesh is initialized based on the calcCellCenterValue function defined in the received initial condition function.

[0074] Next, we will explain the boundary condition function. The boundary condition function is used in the same way as the initial condition function. Figure 9 shows the base class for the boundary condition function. As shown in Figure 9, the BoundaryCondition class, which is the base class for the boundary condition function on line 2, defines the calcBoundaryCondition function, which is a function that calculates the boundary condition, as a pure virtual function on line 5. Here, the meaning and setting method of the pure virtual function are the same as those for the initial condition function described above and in Figure 5. The user must inherit this class and then re-implement the calcBoundaryCondition function in the derived class. Furthermore, the base class cannot be declared as an instance as is; it must always be inherited from the derived class.

[0075] Figure 10 is a diagram showing the derived classes of the boundary condition function. As shown in Figure 10, in the DerivedBoundaryCondition class, which is the derived class on line 2, the calcBoundaryCondition function, whose entity was not defined in the base class, is reimplemented on line 5. Specifically, the calculation content for the boundary condition entered by the user is added to the part on line 6 in Figure 10 that reads " / / Describe the specific initial condition calculation content...".

[0076] Fig. 11 is a diagram showing the registration of boundary condition functions in a framework class. As shown in Fig. 11, in the AMRFramework class, which is the framework class on the second line, the setBoundaryCondition function is defined on the seventh line, which can receive and register a pointer (address) of the BoundaryCondition class, a physical quantity pool to which the boundary condition is applied, and a boundary direction to which the boundary condition is applied.

[0077] Figure 12 is a diagram showing how boundary condition functions are passed to a framework class. Figure 12 also shows how to actually use it. The framework is defined on line 3, and the derived class of the boundary condition function is defined on line 5. Then, on line 7, a pointer to the derived class is passed to the framework class. At this time, the pointer to the derived class can be passed as an argument because it can also be treated as a base class. The boundary condition function registered in the framework class is automatically called when a stencil is constructed, allowing the boundary conditions to be calculated appropriately.

[0078] Next, we will explain physical functions. Physical functions are implemented using static polymorphism, so the implementation method is different from initial condition functions and boundary condition functions, which use dynamic polymorphism. Specifically, no pure virtual functions are defined in the base class, and user-defined functions (here, the run function) are defined for the first time in the derived class. This is because physical function classes are expanded (i.e., passed statically) within the runStencilFunc function, which will be described later, at compile time, so the derived class does not need to behave as the base class at runtime.

[0079] Figure 13 is a diagram showing the execution of physics functions in a framework class. As shown in Figure 13, the AMRFramework class on line 2 defines a runStencilFunc function on line 6 that can receive a physics function class X and arguments args of a run function, which is a member function of the physics function class, as template arguments and execute the function on a GPU. Here, within the runStencilFunc function, special settings are made for calculations on the GPU, and then the physics function is launched on the GPU (line 17). At this time, the run function of the physics function class is launched on the GPU (line 13), and the user must pass to this function a physics function class that has the run function as a member function.

[0080] FIG. 14 is a diagram showing the base class of a physics function. As shown in FIG. 14, the StencilKernel class, which is the base class of the physics function class on line 2, defines "only basic functions used for stencil construction and / or difference calculation." In this example, "only basic functions used for stencil construction and / or difference calculation" is written on line 4. Note that for simplicity, specific examples of the "basic functions used for stencil construction and / or difference calculation" are omitted. This class does not define a run function for performing physics simulation on the GPU, and therefore cannot be passed directly to the runStencilFunc function as a template argument. The user must create a derived class by inheriting this class and define the run function in the derived class.

[0081] Figure 15 is a diagram showing derived classes for physics functions. As shown in Figure 15, the DerivedStencilKernel class, which is a derived class of the physics function class on line 2, defines a run function that was not defined in the base class, StencilKernel class. Specifically, the calculation content for the physics function entered by the user is added to the part on line 6 in Figure 15, " / / Describe the specific calculation content...". This makes it possible to pass this class to the framework class as a template argument. Note that the run function can pass variables used in the calculation (there are no particular restrictions on the variable type or number) as arguments.

[0082] FIG. 16 is a diagram showing mesh initialization and physics function execution. FIG. 16 shows actual usage. First, a framework is defined on line 3. Then, on line 6, the previously defined DerivedStencilKernel class is passed as a template argument to the runStencilFunc function of the framework class. This causes the settings for GPU calculation and the execution of the calculation function to be performed within the runStencilFunc function. Note that if an argument is set in the DerivedStencilKernel class, the corresponding variable can be passed as an argument to the runStencilFunc function.

[0083] Example 1 Next, we will explain examples in which changes in physical quantities in a spatial lattice are actually simulated using the physics calculation system 1. Example 1 shows an example in which an AMR lattice set as an initial condition is used without being changed over time.

[0084] Fig. 17 is a diagram showing an example of base classes. As shown in Fig. 17, an InitialCondition class that is a base class of the initial condition function on line 2, a BoundaryCondition class that is a base class of the boundary condition function on line 9, and a StencilKernel class that is a base class of the physics function class on line 16 are defined.

[0085] Figure 18 shows an example of inputting an initial condition function. As shown in Figure 18, the UserdefinedIC class, which is a derived class on line 2, inherits the InitialCondition class, which is a base class, using the inheritance idiom. In addition, the calcCellCenterValue function, whose entity was not defined in the base class, is reimplemented by the user on lines 6-14.

[0086] Figure 19 is a diagram showing how the initial condition function is passed to the framework class. As shown in Figure 19, the framework is defined on line 4, and the derived class of the initial condition function is defined on line 6. Then, the derived class is passed to the framework class on line 7.

[0087] Fig. 20 is a diagram showing an example of input of a boundary condition function. As shown in Fig. 20, in the UserdefinedBC class, which is a derived class on the second line, the calcBoundaryCondition function, whose entity was not defined in the base class, is reimplemented on the fifth line.

[0088] Figure 21 is a diagram showing the transfer of a boundary condition function to a framework class. As shown in Figure 21, a derived class of the boundary condition function is defined on line 4. Then, on lines 5-8, the derived class is transferred to the framework class.

[0089] Fig. 22 is a diagram showing an example of input of a physical function. As shown in Fig. 22, in the UserDefinedDiffusionKernel class, which is a derived class of the physical function class on line 2, the run function, which was not defined in the StencilKernel class, which is the base class, is defined on lines 4-17.

[0090] 23 is a diagram showing the passing of a physical function to a framework class. As shown in FIG. 23, the derived class is passed to the framework class on line 9.

[0091] Fig. 24 is a diagram showing an example of a simulation result of a physical quantity using an AMR lattice according to Example 1. Fig. 24 shows the spatial distribution of the physical quantity at times t = 0, 1, 2, and 3 seconds. At time t = 0 seconds, the physical quantity is large in the spherical region. Then, with time, the physical quantity moves according to the physical function. At this time, at the edge of the initial spherical region, the change in the physical quantity is large, so the mesh is subdivided, allowing the time change of the physical quantity to be simulated with high resolution.

[0092] Fig. 25 shows an example of the simulation results of physical quantities using a single lattice as Comparative Example 1. In Comparative Example 1, the user created a new program for this calculation. Similar to Fig. 24, Fig. 25 shows the spatial distribution of physical quantities at times t = 0, 1, 2, and 3 seconds.

[0093] Comparing the results of Example 1 shown in Fig. 24 with the results of Comparative Example 1 shown in Fig. 25, it can be seen that both simulations were performed with approximately the same accuracy. However, if the calculation time required for the simulation to obtain the time from t = 0 sec to t = 3 sec in Fig. 25 is set to 1, the calculation time required for the simulation to obtain the time from t = 0 sec to t = 3 sec in Fig. 24 was approximately 0.2 times that of Example 1. This result shows that, in the present invention, the calculation time can be shortened while maintaining the accuracy of the simulation, even though the user's inputs are only the initial condition function, boundary condition function, and physical function.

[0094] According to the first embodiment described above, it is possible to simulate changes in physical quantities using an AMR lattice using the GPU of the physics calculation system 1. In this case, the user only needs to re-implement a predetermined function in a derived class, and there is no need to change the framework class, so even a user who is not familiar with physics simulation can easily use a physics simulation using a GPU.

[0095] Example 2 Example 2 shows an example in which an AMR grid set as an initial condition is optimized over time and used. FIG. 26 is a diagram showing transfer to a framework class in Example 2. As shown in FIG. 26, the framework is defined on line 3. Then, a derived class of the initial condition function is defined on line 5, and the derived class of the initial condition function is passed to the framework class on line 6. Next, a derived class of the boundary condition function is defined on line 8, and the derived class of the boundary condition function is passed to the framework class on lines 9-14. After that, the computational mesh initialization function is called on line 16. Furthermore, the derived class of the physics function is passed to the framework class on line 23.

[0096] FIG. 27 is a diagram showing an example of a simulation result of a physical quantity using an AMR lattice according to Example 2. FIG. 27 shows the spatial distribution of the physical quantity at times t=0, 1, 2, and 3 seconds. At time t=0 seconds, the physical quantity is large in a spherical region. Then, with time progression, the physical quantity moves according to a physical function. At this time, the region where the physical quantity changes greatly changes from the initial spherical region to a spiral region. Therefore, the region where the mesh is subdivided is optimized according to the region where the physical quantity changes greatly.

[0097] Fig. 28 shows an example of the simulation results of physical quantities using a single lattice as Comparative Example 2. In Comparative Example 2, the user created a new program for this calculation. As in Fig. 27, Fig. 28 shows the spatial distribution of physical quantities at times t = 0, 1, 2, and 3 seconds.

[0098] Comparing the results of Example 2 shown in Fig. 27 with the results of Comparative Example 2 shown in Fig. 28, it can be seen that both simulations were performed with approximately the same accuracy. However, if the calculation time required for the simulation to obtain the time from t = 0 to t = 3 sec in Fig. 28 is set to 1, the calculation time required for the simulation to obtain the time from t = 0 to t = 3 sec in Fig. 27 was approximately 0.1 times that of Example 2. This result also shows that, in the present invention, the calculation time can be shortened while maintaining the accuracy of the simulation, even though the user's inputs are only the initial condition function, boundary condition function, and physical function.

[0099] According to the second embodiment described above, even when the AMR lattice changes over time, it is possible to simulate changes in physical quantities using the AMR lattice by using the GPU of the physics calculation system 1. In this case, the user only needs to re-implement a predetermined function in the derived class, and there is no need to change the framework class, so even users who are not familiar with physics simulation can easily use physics simulation using the GPU.

[0100] Further advantages and modifications will readily occur to those skilled in the art. Thus, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described above. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents. [Explanation of symbols]

[0101] 1 Physics System 10 Servers 11 Communications Department 12 Control Unit 13 Storage section 20 User terminal 21 Input section 22 Communications Department 23 Control Unit 24 Memory section 131 Base Classes 132 Framework Classes

Claims

1. A physics calculation system that simulates a change in a physical quantity in a spatial lattice, a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time; a framework class that simulates a change in a physical quantity in the spatial lattice using a derived class that inherits the type of the base class; a storage unit that stores the generating the derived class in response to a user's input for the initial condition function of the base class, passing the generated derived class to the framework class, and executing the framework class to generate the spatial grid; a control unit that generates the derived classes in response to user inputs for the boundary condition functions and the physical functions of the base classes, transfers the generated derived classes to the framework classes, and executes the framework classes to simulate changes in physical quantities in the spatial lattice; A physics calculation system comprising:

2. The base class includes a refinement determination function used to determine the refinement of a grid in the adaptive refinement method, 2. The physics calculation system according to claim 1, wherein the control unit generates the derived classes in response to user inputs to the initial condition function and the subdivision determination function of the base class, passes the generated derived classes to the framework class, and executes the framework class to generate the spatial grid.

3. The physics calculation system according to claim 2 , wherein the control unit executes the framework class to optimize the spatial grid.

4. The control unit generating the derived classes using dynamic polymorphism in response to user inputs to the initial condition function, the refinement determination function, and the boundary condition function of the base class; The physics calculation system according to claim 2 , wherein the derived classes are generated using static polymorphism in response to a user's input to the physics functions of the base class.

5. A physics calculation system that simulates a change in a physical quantity in a spatial lattice, a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time; a framework class that simulates a change in a physical quantity in the spatial lattice using a derived class that inherits the type of the base class; Using generating the derived class in response to a user's input for the initial condition function of the base class, passing the generated derived class to the framework class, and executing the framework class to generate the spatial grid; A physics calculation method that generates the derived classes in accordance with user input for the boundary condition functions and the physical functions of the base classes, passes the generated derived classes to the framework class, and executes the framework class to simulate changes in physical quantities in the spatial lattice.

6. A physics calculation program used in a physics calculation system that simulates changes in physical quantities in a spatial lattice, a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time; a framework class that simulates a change in a physical quantity in the spatial lattice using a derived class that inherits the type of the base class; Using generating the derived class in response to a user's input for the initial condition function of the base class, passing the generated derived class to the framework class, and executing the framework class to generate the spatial grid; A physics calculation program that generates the derived classes in accordance with user input for the boundary condition functions and the physical functions of the base classes, passes the generated derived classes to the framework classes, and executes the framework classes to simulate changes in physical quantities in the spatial lattice.

7. A server included in a physics calculation system that simulates a change in a physical quantity in a spatial lattice, a base class that defines a type in polymorphism, the base class including an initial condition function that represents the spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies the condition that the physical quantity must satisfy at the boundary between the calculation domain and other domains, and a physical function that specifies the amount of change in the physical quantity per unit time; a framework class that simulates a change in a physical quantity in the spatial lattice using a derived class that inherits the type of the base class; from a storage device provided inside or outside the server, generating the derived class in response to a user's input for the initial condition function of the base class, passing the generated derived class to the framework class, and executing the framework class to generate the spatial grid; a server comprising a control unit that generates the derived classes in response to user input for the boundary condition functions and the physical functions of the base classes, passes the generated derived classes to the framework classes, and executes the framework classes to simulate changes in physical quantities in the spatial lattice.

8. A user terminal included in a physics calculation system that simulates a change in a physical quantity in a spatial lattice, an input unit that receives user inputs for the initial condition function, the boundary condition function, and the physical function of a base class that defines a type in polymorphism and includes an initial condition function that represents a spatial distribution of a physical quantity at the start of calculation, a boundary condition function that specifies a condition that the physical quantity satisfies at the boundary between a calculation domain and another domain, and a physical function that specifies a change amount of the physical quantity per unit time; a control unit that acquires a calculation result obtained by executing a framework class that simulates a change in a physical quantity in the spatial lattice using a derived class that inherits the type of the base class, and outputs the calculation result to a predetermined output unit that is set by the user in a predetermined format that is set in advance by the user; A user terminal comprising: