Method and system for storing and calling historical data of fractional order model
By constructing an external file system with direct binary access and historical variable index labels, the problem of low data storage and retrieval efficiency of historical data in fractional-order models is solved, achieving efficient storage and retrieval and improving computational efficiency.
Patent Information
- Application Number
- CN202610450675.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-08
- Publication Date
- 2026-05-05
- Estimated Expiration
- 2046-04-08
AI Technical Summary
In existing technologies, the historical data storage and retrieval efficiency of fractional-order models is low, the memory array solution has storage space limitations, and the TXT text reading and writing solution has low storage density and low computational efficiency.
A binary direct access file system based on a user external data management subroutine is constructed. By establishing historical variable index labels, efficient storage and retrieval of historical data of fractional-order models are achieved. Multidimensional tensor data mapping and indexing algorithms are adopted to optimize storage space and computational efficiency.
By directly accessing the file system via binary, storage space utilization is improved, hard disk resource usage is reduced, and computational efficiency is increased, improving model computation efficiency by about 10%.
Smart Images

Figure CN121979849A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of finite element analysis technology, and in particular to a method and system for storing and retrieving historical data of fractional-order models. Background Technology
[0002] In fields such as geotechnical engineering, biomechanics, and mechanics of materials, media exhibit significant time memory effects and rheological properties. Fractional calculus theory, due to its ability to effectively describe the history dependence of a system, can be used to form fractional constitutive models involving mechanics, seepage, and other aspects, thus enabling the application of fractional constitutive models to finite element analysis.
[0003] When applying fractional constitutive models to finite element analysis, the calculation of fractional derivatives is history-dependent. To calculate physical quantities at the current time step, a weighted convolution integral needs to be performed on all historical state variables from the initial time step to the current time step.
[0004] Currently, ABAQUS is the primary platform for implementing fractional-order models. Historical variable storage and retrieval methods for fractional-order models developed based on ABAQUS include memory arrays and TXT text reading / writing. The memory array approach stores historical data in the COMMON area of the Fortran language. While this approach offers extremely high read / write speeds for simple models, it is limited to 2GB of storage space, making it unsuitable for long-term simulations of complex models.
[0005] The TXT text read / write solution removes the limitation of data storage space by writing historical data into TXT text files. However, this solution has low storage density. To ensure the integrity of double-precision floating-point numbers, the text file needs to use a long character format to record values, resulting in a file size much larger than the actual data volume, thus wasting disk resources. Furthermore, reading and writing text files and performing loop calculations require frequent file opening and closing, wasting computer resources and reducing computational efficiency. Summary of the Invention
[0006] In view of this, embodiments of this application provide a method and system for storing and retrieving historical data of fractional-order models to solve the problem of low efficiency in storing and retrieving historical data of fractional-order models.
[0007] According to a first aspect of this application, a method for storing and retrieving historical data of a fractional-order model is provided, the method comprising: An external file system is constructed, which is a binary direct-access file system based on the user's external data management subroutine; the external file system is used to store historical data during the fractional-order model analysis process. Obtain the multidimensional tensor data of the fractional-order model, the multidimensional tensor data including the cell number associated with the fractional-order model, Gaussian integration points, and time dimension information; the time dimension information includes the increment step; Based on the multidimensional tensor data, establish historical variable index labels for the fractional-order model; When the current analysis data is obtained, the write address of the current analysis data in the external file system is calculated based on the historical variable index label, and the current analysis data is written to the external file system according to the write address. The current analysis data includes the physical quantity of the current increment step. When starting the history loop, the read address corresponding to each time dimension in the past is calculated in reverse according to the historical variable index label, and historical data is fetched from the external file system to a temporary variable according to the read address.
[0008] In some embodiments, the method further includes: Based on fractional calculus theory, a fractional model is established, which includes a fractional constitutive model. The target variable is determined based on the fractional-order model, and the target variable is a state variable that needs to be stored and called during the writing of user-defined unit program code; Obtain modeling parameters, including material parameters, fractional derivative operators, time steps, weighting functions, and fractional order; Based on the modeling parameters and the target variable, establish the control equations corresponding to the fractional-order model.
[0009] In some embodiments, establishing historical variable index labels for the fractional-order model based on the multidimensional tensor data includes: Define a global file creation module, which is used to set the file path, record length and global index parameters; Use the global file creation module to set globally shared constant parameters, including file-related parameters and model dimension parameters; The record length for file storage is set according to the constant parameters and the multidimensional tensor data.
[0010] In some embodiments, establishing historical variable index labels for the fractional-order model based on the multidimensional tensor data includes: Obtain the scale parameters of the fractional-order model, including the number of Gaussian integral points per unit and the preset maximum number of time analysis steps; Read the cell number, the Gaussian integration point, and the time step number from the multidimensional tensor data; The physical storage address of the current analysis data in the external file system is calculated based on the scale parameter, the cell number, the Gaussian integral point, and the time step number.
[0011] In some embodiments, the physical storage address is calculated according to the following formula:
[0012] in, Physical storage address; E Number the units; The number of Gaussian integral points per unit; Set the maximum number of time analysis steps; P These are the Gaussian integration points; T Number the time step.
[0013] In some embodiments, the method further includes: An analysis and control module is constructed by writing subroutines for a user external data management interface in a formula translation language. The user external data management interface is connected to the external file system. The analysis and control module controls the calling process of the subroutines through flag variables. When the flag variable is a preset starting value, a file connection channel is established according to the scale parameter of the fractional-order model. The file connection channel is a channel used to transfer binary files between the external file system and memory. When the flag variable is at a preset end value, the file connection channel is closed, and the system resources used by the fractional-order model during the analysis process are released.
[0014] In some embodiments, calculating the write address of the current analysis data in the external file system based on the historical variable index tags includes: Read the material parameters of the fractional-order model; The state variables are calculated based on the material parameters and the variable values at the unit Gaussian integration points. The state variables include the physical quantities of the current increment step. The write address is calculated using the indexing algorithm corresponding to the historical variable index label, and the write address is used to write the status variable to the external file system.
[0015] In some embodiments, the process of reversely calculating the read addresses corresponding to each past time dimension based on the historical variable index tags, and retrieving historical data from the external file system to temporary variables according to the read addresses, includes: The indexing algorithm corresponding to the historical variable index label is used to reverse calculate the read address corresponding to each past time step; Historical data is retrieved from the external file system based on the read address; The historical data is convolved and summed using a weighting function to obtain the fractional derivative of the state variable at the current moment. Substituting the fractional derivatives into the residual matrix and stiffness matrix established based on the governing equations, the current analysis data is obtained through a finite element solver.
[0016] In some embodiments, the method further includes: The user-written program is obtained, which includes a first program, a second program, a third program, and a fourth program; the first program is used for parameter reading and geometric calculation; the second program is used for writing the state variables at the current time point; the third program is used for calculating the fractional derivatives of the state variables; and the fourth program is used for performing matrix assembly. Write user-defined element subroutines according to the standard format described in the finite element analysis application help documentation. The user-defined element subroutines include a user-defined element code writing area. Add the user-written program to the user-defined unit code writing area.
[0017] According to a second aspect of this application, a historical data storage and retrieval system for fractional-order models is provided, the system comprising: The external file module is used to construct an external file system, which is a binary direct-access file system based on the user's external data management subroutine; the external file system is used to store historical data during the fractional-order model analysis process. The data acquisition module is used to acquire the multidimensional tensor data of the fractional-order model. The multidimensional tensor data includes the cell number associated with the fractional-order model, Gaussian integration points, and time dimension information. The time dimension information includes the increment step. The index label module is used to establish historical variable index labels for the fractional-order model based on the multidimensional tensor data; The data writing module is used to calculate the write address of the current analysis data in the external file system based on the historical variable index label when the current analysis data is obtained, and to write the current analysis data to the external file system according to the write address. The current analysis data includes the physical quantity of the current increment step. The data reading module is used to calculate the reading address corresponding to each time dimension in the past based on the historical variable index label when the historical loop is started, and to retrieve historical data from the external file system to a temporary variable according to the reading address.
[0018] According to a third aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described fractional-order model historical data storage and retrieval method.
[0019] According to a fourth aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method for storing and retrieving historical data of a fractional-order model.
[0020] By employing the above technical solutions, embodiments of this application provide a method and system for storing and retrieving historical data for fractional-order models. The method, after constructing an external file system with direct binary access, establishes historical variable index tags based on the unit numbers, Gaussian integral points, and time dimension information associated with the fractional-order model. When current analysis data is obtained, the write address of the current analysis data in the external file system is calculated based on the historical variable index tags, and the current analysis data is written to the external file system. When starting the historical loop, the read addresses corresponding to each past time dimension are calculated in reverse based on the historical variable index tags, and historical data is retrieved from the external file system to temporary variables. This method utilizes binary storage, ensuring that double-precision floating-point numbers strictly occupy 8 bytes, improving storage space utilization, and enhances computational efficiency by establishing storage and read paths with the external file system.
[0021] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram of the method for storing and calling historical data of a fractional-order model provided in this application embodiment; Figure 2 This is a schematic diagram of the historical data storage and retrieval process provided in the embodiments of this application; Figure 3 This is a schematic diagram showing the comparison of data file sizes provided in the embodiments of this application; Figure 4 This is a schematic diagram of the UEL subroutine writing process provided in the embodiments of this application; Figure 5 A schematic diagram showing the comparison of computation time provided in the embodiments of this application; Figure 6 A schematic diagram of the historical data storage and retrieval system structure for a fractional-order model provided in this application embodiment. Detailed Implementation
[0023] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0024] In this embodiment, the method for storing and retrieving historical data of fractional-order models can be applied to finite element analysis platforms such as ABAQUS. ABAQUS is a finite element simulation application that allows the development of fractional-order models using user-defined constitutive models (UMAT), user-defined material subroutines for heat transfer (UMATHT), or user-defined element (UEL) subroutines.
[0025] In some embodiments of this application, the ABAQUS platform is used as an example to illustrate the retrieval of historical data. It should be understood that the described historical data retrieval process can also be applied to the finite element analysis process of other platforms, and will not be shown one by one.
[0026] For example, if the software does not contain the constitutive model or governing equations the user desires, the ABAQUS platform can provide subroutine interfaces such as UMAT, UMATHT, and UEL to construct the constitutive model or governing equations. Therefore, users can use the format specified by the ABAQUS platform to write the corresponding subroutine code in Fortran, and then calculate the constitutive model or governing equations on the ABAQUS platform.
[0027] Historical data storage and retrieval for fractional-order models can be achieved through joint calls to UMAT or UEL in ABAQUS and the User External Database (UEXTERNALDB) subroutine.
[0028] The fractional-order model is a mathematical model applied to the finite element analysis process. By extending the order of differentiation or integration from integers to arbitrary real numbers and introducing nonlocal or memory inheritance properties, the model can more closely resemble measured data when characterizing complex, multi-scale, and history-dependent physical processes.
[0029] For example, the finite element analysis process can be numerically implemented using fractional-order models. In the secondary development of finite element analysis applications such as ABAQUS, fractional-order seepage models and fractional-order viscoelastic models can be constructed. These fractional-order models require access to full historical data during finite element analysis, ensuring that historical data is retained for each calculation.
[0030] A fractional-order model is a mathematical model obtained by substituting a fractional-order constitutive model into the governing equations. For example, using the UEL subroutine in ABAQUS, and defining the form of the constitutive model and governing equations within this subroutine, the constitutive model can be expressed as:
[0031] in, q Indicates volumetric flow rate density; Represents the fractional permeability coefficient; Indicates the specific weight of the fluid; Represents the fractional derivative operator; Indicates the length of the time step; Indicates the fractional order; This represents the pressure gradient of the pore fluid.
[0032] The control method can be represented as:
[0033] in, Indicates the water storage coefficient; p Indicates pore water pressure; t Indicates time; q Indicates the pore water flow velocity; This represents a quality source item.
[0034] By substituting the constitutive model into the governing equations, the resulting mathematical model is a fractional-order model. Taking the seepage model as an example, the construction of the fractional-order model can be completed in ABAQUS using the UMATHT subroutine. The mechanical constitutive model can also be completed in ABAQUS using the UMAT subroutine. Within this subroutine, the form of the constitutive model can be defined, while the governing equations can use the default form built into ABAQUS.
[0035] Fractional constitutive models can be applied to fields such as geotechnical engineering, biomechanics, and mechanics of materials. In these fields, the media analyzed by the finite element method exhibit significant time memory effects and rheological properties. Therefore, based on the effective description of the historical dependence of the system by fractional calculus theory, fractional constitutive models involving mechanics, seepage, and other aspects can be formed, thus applying these fractional constitutive models to the finite element analysis process.
[0036] Fractional-order constitutive models are a class of constitutive frameworks that can characterize medium memory, power-law relaxation or creep, and multi-timescale behavior with a small number of parameters by replacing integer derivatives or integrals in differential or integral constitutive relations with fractional operators of arbitrary order.
[0037] When applying fractional constitutive models to finite element analysis, the calculation of fractional derivatives relies on complete historical data. This requires performing weighted convolution integrals on all historical state variables from the initial time step to the current time step when calculating physical quantities at the current time step. To meet the need for storing and retrieving complete historical data, a file system needs to be constructed to store and retrieve historical variables during the finite element analysis process.
[0038] In some embodiments, a memory array can be used to store and retrieve historical variables. This is done by storing historical data in the COMMON area of Fortran's computer runtime RAM. While this approach offers extremely high read and write speeds for simple models, it suffers from storage space limitations. For example, if the COMMON area of Fortran's computer runtime RAM has a storage space of 2GB, the total amount of historical variables stored and retrieved cannot exceed 2GB, making the memory array unsuitable for long-term simulations of complex models.
[0039] In some embodiments, historical variables can also be stored and retrieved using TXT text reading and writing. TXT text reading and writing removes the limitation of data storage space by writing historical data to a TXT text file. However, TXT text reading and writing has low storage density. To ensure the numerical integrity of double-precision floating-point numbers, the text file needs to use a long character format to record values, resulting in a file size much larger than the actual data volume, wasting disk resources. Furthermore, reading and writing text files and performing loop calculations require frequent file opening and closing, wasting computer resources and reducing computational efficiency.
[0040] It is evident that the processing efficiency of fractional-order models is low due to limitations in the storage and retrieval methods of historical data. To address this issue, some embodiments of this application provide a method for storing and retrieving historical data for fractional-order models. This method, implemented on finite element analysis platforms such as ABAQUS, overcomes memory limitations by jointly calling user-defined elements or user-defined constitutive models and the User External Database (UEXTERNALDB) interface subroutine. This optimizes storage space and computational efficiency, and utilizes binary direct file access to meet the storage and retrieval requirements of all historical variables in numerical models. This achieves high-density storage of historical model data and improves model computational efficiency.
[0041] The method can be applied to electronic devices with data processing capabilities. These electronic devices include, but are not limited to, computers, servers, mobile terminals, smart wearable devices, and industrial control machines. For ease of description, this application embodiment uses an electronic device as the execution subject of the method. It should be understood that the method can also be applied to other types of execution subjects, which are not illustrated in this application embodiment. Figure 1 As shown, the method includes: S101. Build an external file system.
[0042] To meet the storage and retrieval requirements of the fractional-order model for historical data, an external file system can be constructed first. This external file system is a binary direct-access file system based on the User External Data Management (UEXTERNALDB) subroutine, and it is used to store historical data during the fractional-order model analysis process.
[0043] For example, when constructing a binary direct access file system, an unformatted, direct access binary file system, i.e., an external file system, can be built using the Fortran language within the secondary development environment of finite element analysis applications such as ABAQUS. This external file system stores data as a binary bitstream, allowing double-precision floating-point numbers to occupy only a fixed 8 bytes of space. Therefore, compared to the data storage method of TXT text format, the external file system based on binary direct access can compress the size of historical data files.
[0044] An external file system can be constructed together with a fractional-order model; that is, in some embodiments, a fractional-order model can be established based on fractional-order calculus theory while constructing the external file system. The fractional-order model includes a fractional-order constitutive model.
[0045] Next, the target variable is determined based on the fractional-order model, and the modeling parameters are obtained. The target variable is a state variable that needs to be stored and retrieved during the writing of the user-defined unit program code; the modeling parameters include material parameters, fractional-order derivative operators, time steps, weighting functions, and fractional order.
[0046] For example, a fractional constitutive model of the target object can be established based on the fractional calculus theory defined by Grunwald–Letnikov (GL). Taking the fractional seepage model as an example, the fractional seepage model can be expressed as:
[0047] in, q Indicates volumetric flow rate density; Represents the fractional permeability coefficient; Indicates the specific weight of the fluid; Represents the fractional derivative operator; Indicates the length of the time step; Indicates the fractional order; This represents the pressure gradient of the pore fluid.
[0048] Accordingly, the discretization scheme for the fractional-order seepage model is as follows:
[0049] in, Represents the fractional derivative operator; Represents the pore fluid pressure gradient; It represents the fractional derivative of pore flow velocity or seepage velocity with respect to time; Indicates pore flow velocity or seepage velocity; Indicates time; Indicates the length of the time step; Indicates the fractional order; Indicates the first j Weighting functions for each time step.
[0050] From the discrete format derivation, we can determine that the state variable that needs to be stored and called during the UEL program code writing process is the pore fluid pressure gradient. Then, based on the modeling parameters and target variables, the governing equations corresponding to the fractional-order model are established.
[0051] For example, the governing equations for a fractional-order seepage model can be expressed as:
[0052] in, Indicates the water storage coefficient; p Indicates pore water pressure; t Indicates time;q Indicates the pore water flow velocity; This represents a quality source item.
[0053] S102. Obtain the multidimensional tensor data of the fractional-order model.
[0054] After constructing the external file system and the fractional-order model, a mapping relationship can be established between the external file system and the fractional-order model to store the data generated during the fractional-order model analysis process to the external file system, or to obtain the relevant analysis data of the fractional-order model from the external file system.
[0055] The mapping relationship established between external files and fractional-order models can flatten multidimensional tensor data into one-dimensional linear data for storage. Therefore, when establishing the mapping relationship, the multidimensional tensor data of the fractional-order model can be obtained first. This multidimensional tensor data includes the cell numbers associated with the fractional-order model, Gaussian integration points, and time dimension information. The time dimension information can include the increment step, i.e., the time step in the time dimension.
[0056] For example, in order to manage massive historical data of the entire model and the entire timeline in a single external binary file, a linear algorithm can be established to map cell numbers, Gaussian integral points and time dimensions (incremental steps) to unique file record addresses, and to create labels for historical data, namely model historical variable index labels.
[0057] S103. Establish historical variable index labels for fractional-order models based on multidimensional tensor data.
[0058] After obtaining multidimensional tensor data, historical variable index labels for fractional-order models can be established based on the multidimensional tensor data.
[0059] To establish historical variable index labels, an indexing algorithm can be preset. In some embodiments, historical variable index labels for a fractional-order model can be established based on the indexing algorithm. To do this, the scale parameters of the fractional-order model can be obtained first, wherein the scale parameters include the number of Gaussian integral points per unit and the preset maximum number of time analysis steps.
[0060] Next, the cell number, Gaussian integration point, and time step number are read from the multidimensional tensor data. Based on the scale parameter, cell number, Gaussian integration point, and time step number, the physical storage address of the current analysis data in the external file system is calculated. The physical storage address is obtained using the following formula:
[0061] in, Physical storage address; E Number the units; The number of Gaussian integral points per unit; Set the maximum number of time analysis steps; P These are the Gaussian integration points; T Number the time step.
[0062] For example, let the number of Gaussian integration points of the model unit be... The numerical model presets a maximum number of time analysis steps. For any _th E Unit No., No. P Integral point number 1, the first T The physical storage address of historical variables at each time step in the external file system can be calculated using the formula described above. By using historical variable index labels, a mapping relationship can be established between external files and fractional-order models, thereby flattening multidimensional tensor data into one-dimensional linear storage. This allows the program to calculate results at any given time without traversing the file, directly using the calculated data. Instantly locate and read data.
[0063] like Figure 2 As shown, in some embodiments, when establishing historical variable index labels for a fractional-order model based on multidimensional tensor data, global parameters can also be defined, i.e., a global file creation module can be defined, wherein the global file creation module is used to set the file path, record length and global index parameters.
[0064] Then, the global file creation module is used to set globally shared constant parameters, including file-related parameters and model dimension parameters. The record length for file storage is then set based on the constant parameters and multidimensional tensor data.
[0065] For example, a global file creation module (MODULE) can be defined in Fortran to set file paths, record lengths, and global index parameters. For instance, a global file creation module can be represented as: Module Mode lName; Implicit None; Integer, Parameter: File_Unit= ;Character (Len=60), Parameter: Filename= ;Integer, Parameter: Max_Elem= ;Integer, Parameter: N_Int= ;Integer, Parameter: Max_Inc= ;Integer, Parameter: Record_Len= ;EndModuleModelName.
[0066] Here, Model Name represents the module name, which can be set by the user for easy calling in subsequent UEL code; File_Unit is the file unit number; Filename defines the absolute path and file name of the external storage file; Max_Elem is the number of units in the numerical model; N_Int is the number of Gaussian integration points in the numerical model unit; Max_Inc is the maximum number of analysis steps in the numerical model; and Record_Len is the record length (in bytes) for storing data.
[0067] In the comparison of the same model, in order to ensure the numerical integrity of double-precision floating-point numbers, that is, to retain about 16 significant digits, the text storage scheme (TXT) must use long character format to record, and its record length (RECORD_LEN) needs to be set to 50 or higher to meet the calculation requirements, while the binary direct access scheme only needs to set the record length to 4, compressing the size of the historical data file.
[0068] After establishing the mapping relationship between the fractional-order model and the external file, historical data can be stored and retrieved based on the mapping relationship corresponding to the historical variable index labels during the finite element analysis process, thereby completing the finite element analysis solution.
[0069] During the ABAQUS solution process, data storage and retrieval control can be performed based on UEL and UEXTERNALDB subroutines. Therefore, in some embodiments, an analysis control module can be constructed by writing a subroutine for a user external data management interface in a formula translation language. This user external data management interface connects to an external file system; the analysis control module controls the subroutine calling process through flag variables.
[0070] When the flag variable is at its preset start value, a file connection channel can be established based on the scale parameters of the fractional-order model. The file connection channel is used to transfer binary files between the external file system and memory. For example, by establishing an external file connection, a direct access (Direct Access) unformatted file is opened, and the I / O channel is prepared. When the flag variable is at its preset end value, the file connection channel is closed, and the system resources used by the fractional-order model during the analysis process are released.
[0071] For example, subroutines can be built based on the UEXTERNALDB interface. That is, UEXTERNALDB subroutines can be written in the Fortran environment to establish file connections before the numerical model analysis begins and release resources after the analysis ends, realizing a one-time opening and closing of the file and avoiding frequent opening and closing caused by cyclic calculations.
[0072] For example, the UEXTERNALDB interface subroutine may include: Subroutine Uexternaldb(...); UseModel Name; Include 'Aba_Param.Inc'; Dimension Time(2); If (Lop.Eq.0) Then Open(Unit=File_Unit, File=Filename, Status='Unknown', &Access='Direct', Form='Unformatted', Recl=Record_Len, &Action='Readwrite', Iostat=Ios); End If; If (Lop.Eq.3) Then Close(File_Unit); End If; Return; End Subroutine Uexternaldb.
[0073] In this phase, LOP=0 represents the initialization phase, which involves pre-allocating or linking external binary files based on the model size parameters before the analysis begins, establishing a channel between the file and memory. LOP=3 represents the termination phase, which involves forcibly closing file handles and releasing system resources after the numerical analysis is fully completed, ensuring that the data is written completely and the file is not corrupted.
[0074] As can be seen, by using the UEXTERNALDB interface to implement global management of external files, it is possible to establish an external file channel before the analysis starts (LOP=0) and forcibly close the file handle after the analysis ends (LOP=3), thereby enabling the storage and retrieval of historical data.
[0075] S104. When the current analysis data is obtained, calculate the write address of the current analysis data in the external file system based on the historical variable index label, and write the current analysis data to the external file system according to the write address.
[0076] After establishing historical variable index tags, data can be stored and retrieved based on these tags. For the data storage process, upon obtaining the current analysis data, the write address of the current analysis data in the external file system can be calculated based on the historical variable index tags, and data writing can be performed according to the write address to write the current analysis data, including the physical quantities of the current increment step, to the external file system.
[0077] For example, data storage can be implemented through UEL or UMAT subroutines. Then, for the current state variable writing process, after calculating the physical quantities of the current incremental step, such as the pore water pressure gradient, the indexing algorithm described in the above embodiment can be used to calculate the write address of the current data in the external file, and the data can be directly written to the external file system through the WRITE statement.
[0078] In some embodiments, when calculating the write address of the current analysis data in the external file system based on the historical variable index tags, the material parameters of the fractional-order model can be read first, and then the state variables can be calculated based on the material parameters and the variable values at the Gaussian integration points of the elements. The state variables include the physical quantities of the current increment step. Then, the indexing algorithm corresponding to the historical variable index tags is used to calculate the write address for writing the state variables to the external file system.
[0079] For example, when storing data, the global parameter module can be invoked based on the Use Model Name command. Then, according to the indexing algorithm, the data address is calculated using the indexing algorithm in each Gaussian integral calculation loop of UEL. The corresponding command code is: REC_ID = (JELEM-1) N_INT MAX_INC+(K-1) MAX_INC+KINC.
[0080] For the state variable writing process at the current time point, the pore fluid pressure gradient (DPDx, DPDy, DPDz) of the current incremental step can be calculated, and the calculated REC_ID can be directly written to the external file. That is, execute IF (KINC.GT.0) THEN PX_STORE(1) = DPDX; PX_STORE(2) = DPDY; PX_STORE(3) = DPDZ; WRITE(FILE_UNIT, REC = REC_ID) PX_STORE; END IF.
[0081] Where KINC is the time step count; PX_STORE is the temporary storage matrix for pore fluid pressure gradient; DPDX, DPDY, and DPDZ are the gradients of pore fluid pressure in the x, y, and z directions, respectively; and K is the Gaussian integration point count.
[0082] S105. When starting the history loop, calculate the read address corresponding to each time dimension in the past based on the historical variable index label, and retrieve historical data from the external file system to the temporary variable according to the read address.
[0083] Similarly, for the process of accessing historical data, a historical loop can be started, and the indexing algorithm described in the above embodiments can be used to reverse-calculate the read addresses corresponding to each past time step. Then, the historical data is directly fetched from the external file into a temporary variable using a READ statement, and convolutional accumulation is performed using a weighting function.
[0084] In some embodiments, when retrieving historical data, the indexing algorithm corresponding to the historical variable index label can be used to reverse calculate the read address corresponding to each time step in the past, and historical data can be retrieved from the external file system based on the read address.
[0085] Then, the historical data is convolved and summed using a weighting function to obtain the fractional derivative of the state variable at the current moment. The fractional derivative is then substituted into the residual matrix and stiffness matrix established based on the governing equations, and the current analysis data is obtained through a finite element solver.
[0086] For example, in the process of historical data backtracking and convolution integration, historical data can be directly retrieved from the storage medium of the external file system using a circular index, and then accumulated using a weight function to calculate the fractional derivative of the state variable. The corresponding command code is: PX_EQ=0.0D0; IF (KINC.GT.0) THEN DO KK=1,KINC; KK_STEP=KINC+1–KK; READ_ID=(JELEM-1) N_INT MAX_INC+(K-1) MAX_INC+KK_STEP;PX_EQ(1)=PX_EQ(1)+G_GLOBAL(KK) PX_READ(1) / DTIME ALPHA; END DO; END IF.
[0087] Where PX_EQ is the equivalent pore fluid pressure gradient, corresponding to the fractional-order seepage model mentioned above. JELEM is a user-defined cell number; G_GLOBAL corresponds to the weight function. ω DTIME represents the time progression; ALPHA represents the fractional order. Then, matrix assembly is performed, and the equivalent term PX_EQ obtained from the convolution calculation, such as the equivalent pore fluid pressure gradient, is substituted into the residual vector or constitutive relation to complete the finite element solution.
[0088] By applying the technical solutions of the above embodiments, the historical data storage and retrieval of the fractional-order model described in the above embodiments can improve storage space utilization, that is, by using binary storage, double-precision floating-point numbers strictly occupy 8 bytes. Compared with the TXT text storage solution, it can avoid the use of long character formats for recording numerical precision. Figure 3 As shown, under the same accuracy requirements, the historical data file generated by the method is only 30% to 40% the size of the TXT text solution, saving hard disk storage resources.
[0089] In some embodiments, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, some embodiments of this application also provide a method for storing and retrieving historical data of a fractional-order model. The difference between this method and the above embodiments is that it can be based on UEL to write subroutines to implement the finite element analysis process. For example... Figure 4 As shown, the method includes: S201. Obtain the user-written program; S202. Write user-defined element subroutines according to the standard format described in the finite element analysis application help document; S203. Add the user-written program to the user-defined unit code writing area.
[0090] When constructing a UEL subroutine, it can respond to user interaction and obtain user-written programs. These user-written programs include a first program, a second program, a third program, and a fourth program. The first program is used for parameter reading and geometric calculations; the second program is used for writing the state variables at the current time point; the third program is used for calculating the fractional derivatives of the state variables; and the fourth program is used for performing matrix assembly.
[0091] After obtaining the user-written program, you can write the user-defined element (UEL) subroutine according to the standard format described in the finite element analysis application help documentation. The UEL subroutine includes a user-defined element code writing area. Then, add the user-written program to the user-defined element code writing area to obtain the UEL subroutine result, which is used to control the finite element analysis process.
[0092] For example, UEL subroutines can be written according to the standard format described in the ABAQUS help documentation. The content of the subroutine includes: SUBROUTINE UEL (...); INCLUDE 'ABA_PARAM.INC'; DIMENSION...; User code lines RETURN; END. Among them, in User code linesThe areas for writing UEL code can include a first program, a second program, a third program, and a fourth program.
[0093] The first program is used for parameter reading and geometric calculation, that is, reading material parameters to calculate the residual matrix and stiffness matrix. The second program is used to write the state variables at the current time point, that is, by calculating physical quantities such as the current pore water pressure gradient at the current incremental step, and using the indexing algorithm shown in the above embodiment to calculate the write address, and directly write it to the .dat file on the external hard disk.
[0094] The third program is used to calculate the fractional derivatives of the state variables. It uses an indexing algorithm to reverse-calculate the read addresses corresponding to each past time step, directly retrieves historical data from external files, and performs convolutional summation using a weighting function to obtain the fractional derivative value or viscoelastic stress term at the current moment. The fourth program is used for matrix assembly. By substituting the equivalent mechanical or seepage terms obtained from the convolution calculation into the element stiffness matrix and residual vector, the finite element solution is completed.
[0095] By applying the technical solutions of the above embodiments, the historical data storage and retrieval method for fractional-order models described in the above embodiments can establish a storage and retrieval path with external files by introducing the UEXTERNALDB subroutine, eliminating redundant file status detection and repeated open or close operations for TXT text in the high-frequency loop of the UEL unit. Furthermore, by using a binary direct access format to store data, the complex format conversion and parsing process between floating-point numbers and ASCII characters in the text scheme is avoided, improving computational efficiency. Figure 5 As shown in the comparative experiment, the method described can improve the overall computational efficiency of the model by about 10%.
[0096] In some embodiments, as a specific implementation of the fractional-order model historical data storage and retrieval method described in the above embodiments, some embodiments of this application also provide a fractional-order model historical data storage and retrieval system, such as... Figure 6 As shown, the system includes: The external file module is used to construct an external file system, which is a binary direct-access file system based on the user's external data management subroutine; the external file system is used to store historical data during the fractional-order model analysis process. The data acquisition module is used to acquire the multidimensional tensor data of the fractional-order model. The multidimensional tensor data includes the cell number associated with the fractional-order model, Gaussian integration points, and time dimension information. The time dimension information includes the increment step. The index label module is used to establish historical variable index labels for the fractional-order model based on the multidimensional tensor data; The data writing module is used to calculate the write address of the current analysis data in the external file system based on the historical variable index label when the current analysis data is obtained, and to write the current analysis data to the external file system according to the write address. The current analysis data includes the physical quantity of the current increment step. The data reading module is used to calculate the reading address corresponding to each time dimension in the past based on the historical variable index label when the historical loop is started, and to retrieve historical data from the external file system to a temporary variable according to the reading address.
[0097] By applying the technical solutions of the above embodiments, this application provides a historical data storage and retrieval system for fractional-order models. After constructing an external file system with direct binary access, the system establishes historical variable index tags based on the unit numbers, Gaussian integral points, and time dimension information associated with the fractional-order model. When current analysis data is obtained, the system calculates the write address of the current analysis data in the external file system based on the historical variable index tags and writes the current analysis data to the external file system. When starting a historical loop, the system reverses the calculation based on the historical variable index tags to obtain the read addresses corresponding to each past time dimension and retrieves historical data from the external file system to temporary variables. The system can use binary storage, ensuring that double-precision floating-point numbers strictly occupy 8 bytes, improving storage space utilization, and improves computational efficiency by establishing storage and read paths with the external file system.
[0098] It should be noted that other corresponding descriptions of the functional units involved in the fractional-order model historical data storage and retrieval system provided in this application embodiment can be found in the corresponding descriptions in the fractional-order model historical data storage and retrieval method provided in the above embodiment, and will not be repeated here.
[0099] This application also provides a computer device, specifically a personal computer, server, network device, etc. The computer device includes a bus, processor, memory, and communication interface, and may also include input / output interfaces and a display device. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores location information. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.
[0100] Those skilled in the art will understand that the structure of the computer device described above is only a partial structure related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components, or combine certain components, or have different component arrangements.
[0101] In one embodiment, a computer-readable storage medium is also provided, which may be non-volatile or volatile, and a computer program is stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0102] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0104] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0105] Any references to memory, database, or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc.
[0106] Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can take many forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0107] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, graphics processors, digital signal processors, programmable logic devices, etc., and are not limited to these.
[0108] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application.
Claims
1. A method for storing and retrieving historical data in a fractional-order model, characterized in that, The method includes: An external file system is constructed, which is a binary direct-access file system based on the user's external data management subroutine; the external file system is used to store historical data during the fractional-order model analysis process. Obtain the multidimensional tensor data of the fractional-order model, the multidimensional tensor data including the cell number associated with the fractional-order model, Gaussian integration points, and time dimension information; the time dimension information includes the increment step; Based on the multidimensional tensor data, establish historical variable index labels for the fractional-order model; When the current analysis data is obtained, the write address of the current analysis data in the external file system is calculated based on the historical variable index label, and the current analysis data is written to the external file system according to the write address. The current analysis data includes the physical quantity of the current increment step. When starting the history loop, the read address corresponding to each time dimension in the past is calculated in reverse according to the historical variable index label, and historical data is fetched from the external file system to a temporary variable according to the read address.
2. The method according to claim 1, characterized in that, The method further includes: Based on fractional calculus theory, a fractional model is established, which includes a fractional constitutive model. The target variable is determined based on the fractional-order model, and the target variable is a state variable that needs to be stored and called during the writing of user-defined unit program code; Obtain modeling parameters, including material parameters, fractional derivative operators, time steps, weighting functions, and fractional order; Based on the modeling parameters and the target variable, establish the control equations corresponding to the fractional-order model.
3. The method according to claim 1, characterized in that, Based on the multidimensional tensor data, historical variable index labels for the fractional-order model are established, including: Define a global file creation module, which is used to set the file path, record length and global index parameters; Use the global file creation module to set globally shared constant parameters, including file-related parameters and model dimension parameters; The record length for file storage is set according to the constant parameters and the multidimensional tensor data.
4. The method according to claim 1, characterized in that, Based on the multidimensional tensor data, historical variable index labels for the fractional-order model are established, including: Obtain the scale parameters of the fractional-order model, including the number of Gaussian integral points per unit and the preset maximum number of time analysis steps; Read the cell number, the Gaussian integration point, and the time step number from the multidimensional tensor data; The physical storage address of the current analysis data in the external file system is calculated based on the scale parameter, the cell number, the Gaussian integral point, and the time step number.
5. The method according to claim 4, characterized in that, The physical storage address is calculated using the following formula: in, Physical storage address; E Number the units; The number of Gaussian integral points per unit; Set the maximum number of time analysis steps; P These are the Gaussian integration points; T Number the time step.
6. The method according to claim 1, characterized in that, The method further includes: An analysis and control module is constructed by writing subroutines for a user external data management interface in a formula translation language. The user external data management interface is connected to the external file system. The analysis and control module controls the calling process of the subroutines through flag variables. When the flag variable is a preset starting value, a file connection channel is established according to the scale parameter of the fractional-order model. The file connection channel is a channel used to transfer binary files between the external file system and memory. When the flag variable is at a preset end value, the file connection channel is closed, and the system resources used by the fractional-order model during the analysis process are released.
7. The method according to claim 1, characterized in that, The write address of the current analysis data in the external file system is calculated based on the historical variable index tags, including: Read the material parameters of the fractional-order model; The state variables are calculated based on the material parameters and the variable values at the unit Gaussian integration points. The state variables include the physical quantities of the current increment step. The write address is calculated using the indexing algorithm corresponding to the historical variable index label, and the write address is used to write the status variable to the external file system.
8. The method according to claim 7, characterized in that, The process includes: calculating the read addresses corresponding to each time dimension in the past based on the historical variable index labels, and retrieving historical data from the external file system to temporary variables according to the read addresses; and including: The indexing algorithm corresponding to the historical variable index label is used to reverse calculate the read address corresponding to each past time step; Historical data is retrieved from the external file system based on the read address; The historical data is convolved and summed using a weighting function to obtain the fractional derivative of the state variable at the current moment. Substituting the fractional derivatives into the residual matrix and stiffness matrix established based on the governing equations, the current analysis data is obtained through a finite element solver.
9. The method according to claim 1, characterized in that, The method further includes: The user-written program is obtained, which includes a first program, a second program, a third program, and a fourth program; the first program is used for parameter reading and geometric calculation; the second program is used for writing the state variables at the current time point; the third program is used for calculating the fractional derivatives of the state variables; and the fourth program is used for performing matrix assembly. Write user-defined element subroutines according to the standard format described in the finite element analysis application help documentation. The user-defined element subroutines include a user-defined element code writing area. Add the user-written program to the user-defined unit code writing area.
10. A system for storing and retrieving historical data of a fractional-order model, characterized in that, The system includes: The external file module is used to construct an external file system, which is a binary direct-access file system based on the user's external data management subroutine; the external file system is used to store historical data during the fractional-order model analysis process. The data acquisition module is used to acquire the multidimensional tensor data of the fractional-order model. The multidimensional tensor data includes the cell number associated with the fractional-order model, Gaussian integration points, and time dimension information. The time dimension information includes the increment step. The index label module is used to establish historical variable index labels for the fractional-order model based on the multidimensional tensor data; The data writing module is used to calculate the write address of the current analysis data in the external file system based on the historical variable index label when the current analysis data is obtained, and to write the current analysis data to the external file system according to the write address. The current analysis data includes the physical quantity of the current increment step. The data reading module is used to calculate the reading address corresponding to each time dimension in the past based on the historical variable index label when the historical loop is started, and to retrieve historical data from the external file system to a temporary variable according to the reading address.
Citation Information
Patent Citations
Establishing method for process control historical data file structure and data read-write method
CN102043795A
Seismic wave detection method and system, electronic equipment and storage medium
CN119199959A
System and method for material constitutive modeling
US20170329879A1
