Method, system and device for large-scale parallel multi-material distance field volume fraction generation

CN122491158BActive Publication Date: 2026-09-11先进计算与关键软件(信创)海河实验室
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610967415.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-09-11
Estimated Expiration
2046-07-01

AI Technical Summary

Technical Problem

[0005]本发明旨在解决多材料体素化和多相流初始化中的材料重叠冲突、体积分数不守恒、薄层材料丢失以及大规模网格计算效率低的问题

Benefits of technology

1.本发明针对每一种材料分别建立与其STL几何对应的空间加速缓存,并分别计算独立SDF场。使每个材料的SDF查询均基于自身几何执行,避免多个材料误用同一静态缓存而导致相同的问题并为后续VOF子采样、单元状态识别、薄层风险判断和权重化冲突消解提供独立可靠的几何距离基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491158B_ABST
    Figure CN122491158B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of fluid mechanics simulation analysis, and specifically discloses a large-scale parallel multi-material distance field volume fraction generation method, system and equipment, the method comprising: obtaining a plurality of material geometric models and corresponding configuration parameters; generating a unified background Cartesian grid and dividing it into a plurality of MPI subdomains; constructing an independent spatial acceleration structure for each material, and calculating the signed distance field of each material in the corresponding MPI subdomain according to the configuration parameters; performing subsampling based on the signed distance field to obtain the original volume fraction of each material; identifying the cell state of the background grid cell and adjusting the original volume fraction; and merging the volume fraction calculation results of all MPI subdomains to obtain the multi-material distance field volume fraction result. The present application establishes an independent geometric spatial acceleration cache for each material, and calculates the SDF field of the material based on the corresponding cache, thereby avoiding confusion of the multi-material SDF field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fluid dynamics simulation and analysis technology, and in particular to a method, system and device for generating volume fractions of distance fields in a large-scale parallel multi-material system. Background Technology

[0002] In CFD (Computational Fluid Dynamics), multiphase flow, and multimaterial numerical simulations, it is often necessary to convert multiple material geometric models into volume fraction fields on a background mesh. SDF, or Signed Distance Field, can represent the closest distance from a point in space to a geometric boundary and its internal / external relationship; VOF, or Volume Fraction Method, can represent the proportion of a certain material or phase in the volume of a mesh cell.

[0003] Existing methods are typically geared towards single materials or single geometries. For single-material geometries, calculating the SDF independently and generating the VOF through subsampling can meet basic requirements. However, in multi-material engineering examples, there may be geometric overlaps, local intersections, tiny gaps, non-conformal boundaries, thin-layer structures, sharp-corner structures, and small-scale material regions between different material geometries. If the volume fraction of each material is calculated separately and then directly superimposed, it is easy to obtain non-physical results where the sum of the material volume fractions is greater than 1.

[0004] While simple proportional normalization can compress the total volume fraction to 1, it typically only considers the original sampling ratio of each material and cannot express material priority, geometric reliability, thin-layer protection requirements, and continuity between adjacent elements. This may lead to the weakening or elimination of thin-layer materials or low-volume-fraction but engineering-important material regions. In large-scale MPI (Message Passing Interface) parallel computing, material field discontinuities may also occur at the boundaries of adjacent subdomains due to ghost element processing, insufficient local neighborhood information, or repeated calculations. Summary of the Invention

[0005] This invention aims to address the problems of material overlap conflicts, volume fraction non-conservation, thin-layer material loss, and low computational efficiency of large-scale meshes in multi-material voxelization and multiphase flow initialization. To this end, this invention provides a large-scale parallel multi-material distance field volume fraction generation method, system, and device. For multi-material input scenarios, an independent geometric space acceleration cache is established for each material, and the SDF field of that material is calculated based on the corresponding cache, avoiding SDF field confusion among multiple materials.

[0006] This invention provides a large-scale parallel multi-material distance field volume fraction generation method, the technical solution of which is as follows: including: Obtain multiple material geometry models and their corresponding configuration parameters; A unified background Cartesian mesh is generated based on the joint spatial extent of multiple material geometry models, and the unified background Cartesian mesh is divided into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters. An independent space acceleration structure is constructed for each material, and the signed distance field of each material is calculated in the corresponding MPI subdomain according to the configuration parameters; Subsampling of background grid cells within the MPI subdomain is performed based on the signed distance field to obtain the original volume fraction of each material in each background grid cell. The cell state of each background grid cell is identified based on the original volume fraction of each material in each background grid cell. The original volume fraction of each material is adjusted based on the cell state to obtain the adjusted volume fraction of each material. The remaining volume is then supplemented using the background phase to obtain the volume fraction calculation result. The volume fraction calculation results of all MPI subdomains are combined to obtain the multi-material distance field volume fraction results.

[0007] Furthermore, based on the original volume fraction of each material, the total volume fraction (sumMaterial) and the number of non-zero materials (nonZeroCount) are calculated. Then, the cell state is identified, and the identification rules include: If nonZeroCount=0, then the cell state is background cell; If nonZeroCount=1, then the element state is a single material element; If nonZeroCount>1 and sumMaterial≤1, then the element state is a multi-material non-conflicting element; If nonZeroCount>1 and sumMaterial>1, then the element state is a multi-material overlapping conflict element.

[0008] Furthermore, for multi-material overlapping conflict elements, the allocation weight of each material is calculated based on the original volume fraction factor, material priority factor, SDF distance factor, subsampling confidence factor, thin-layer protection factor, and adjacent element continuity factor. The calculation formula is as follows: in, Assign weights to the i-th material. Let i be the original volume fraction factor of the i-th material. Let i be the material priority factor for the i-th material. Let SDF distance factor be the i-th material. Let be the subsampling confidence factor for the i-th material. Let be the thin-layer protection factor of the i-th material. Let be the continuity factor between adjacent units of the i-th material; The adjusted volume fraction is calculated based on the allocation weights of each material. The calculation formula is as follows: in, Let be the adjusted volume fraction of the i-th material.

[0009] Furthermore, when there is a total material content, the adjusted volume fraction is calculated using the following formula: Where occupied is the total amount of material occupied.

[0010] Furthermore, if the material satisfies any of the following rules, the element state of the background mesh element is identified as a thin-layer risk element, and the material is identified as a thin-layer risk material. The rules include: (1) The material exhibits SDF sign variation within the background grid cells; (2) The original volume fraction of the material is lower than the thin layer threshold, and the material exists continuously in adjacent background grid cells; (3) The thin-film protection switch for the material is configured to be on; For thin-layer risk materials, increase their corresponding thin-layer protection factor or set their minimum retention volume fraction; Configuration parameters include thin-layer threshold, thin-layer protection switch, and minimum retention volume fraction.

[0011] Furthermore, if setting a minimum retention volume fraction results in the sum of the adjusted volume fractions of all materials exceeding 1 or the total material occupancy, then the adjusted volume fraction of non-thin-layer risk materials will be proportionally reduced.

[0012] Furthermore, volume fraction consistency correction is performed on the boundary background mesh cells of adjacent MPI subdomains to correct the volume fraction calculation results of each MPI subdomain.

[0013] Furthermore, spatial acceleration structures are used to support nearest distance queries from points to material geometry surfaces, including combinations of one or more of BVH, AABB Tree, KD-tree, and Octree. When computing the signed distance field, an independent spatial acceleration cache is allocated for each spatial acceleration structure.

[0014] This invention also provides a large-scale parallel multi-material distance field volume fraction generation system, the technical solution of which is as follows: including: The data acquisition module is used to acquire multiple material geometric models and their corresponding configuration parameters; The MPI subdomain partitioning module is used to generate a unified background Cartesian mesh based on the joint spatial extent of multiple material geometry models, and to partition the unified background Cartesian mesh into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters. The signed distance field calculation module is used to construct an independent spatial acceleration structure for each material and calculate the signed distance field of each material in the corresponding MPI subdomain according to the configuration parameters. The volume fraction calculation module is used to subsample the background grid cells in the MPI subdomain based on the signed distance field to obtain the original volume fraction of each material in each background grid cell. The volume fraction conflict resolution module is used to identify the cell state of each background grid cell based on the original volume fraction of each material in each background grid cell, adjust the original volume fraction of each material based on the cell state to obtain the adjusted volume fraction of each material, and use the background phase to make up the remaining volume to obtain the volume fraction calculation result. The results output module is used to merge the volume fraction calculation results of all MPI subdomains to obtain the multi-material distance field volume fraction results.

[0015] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for generating a large-scale parallel multi-material distance field volume fraction.

[0016] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. This invention establishes a spatial acceleration cache corresponding to the STL geometry of each material and calculates an independent SDF field for each material. This ensures that the SDF query for each material is performed based on its own geometry, avoiding the problem of multiple materials misusing the same static cache and providing an independent and reliable geometric distance basis for subsequent VOF subsampling, cell state identification, thin-layer risk assessment, and weighted conflict resolution.

[0017] 2. This invention classifies and identifies background mesh elements based on the sum of material volume fractions and the number of non-zero materials, and selects different volume fraction correction strategies for different element states. For multi-material overlapping conflict elements, this invention constructs a multi-factor allocation weight and redistributes the volume fraction of each material according to the allocation weight. The allocation weight mechanism comprehensively considers the original volume fraction, material priority, SDF distance, subsampling confidence, thin-layer protection, and neighborhood continuity, making the volume fraction allocation in conflict elements more consistent with geometric relationships and engineering priorities.

[0018] 3. This invention utilizes SDF sign variation, thin-layer protection switch, thin-layer threshold, and neighborhood continuity to identify thin-layer risk units and materials, and increases the allocation weight of thin-layer risk materials or sets a minimum retention volume fraction during conflict resolution. For thin plates, coatings, sharp corners, and small-scale structures, this mechanism can reduce the probability of them being weakened or erased during normalization due to their small original sampled volume fraction, thereby improving the retention ability of thin-layer structures in the multi-material volume fraction field.

[0019] 4. After resolving volume fraction conflicts, this invention performs nonnegativity trimming and unit sum error closed-loop correction, as well as re-verification. This step is not a simple one-time normalization, but rather a closed-loop correction of local errors that may arise during weighted conflict resolution, thin-layer protection, and background phase completion, thereby ensuring that the volume fractions of all material phases and background phases within each background grid cell meet the requirements of nonnegativity and unit sum conservation.

[0020] 5. This invention improves the continuity of multi-material volume fraction fields near the boundary, thin-layer preservation capability, and parallel output consistency when cross-subdomain neighborhood information is required by the MPI subdomain boundary consistency correction mechanism.

[0021] 6. This invention supports the unified generation of SDF and VOF fields from multiple material geometry models and can effectively handle the overlap, intersection, and non-conformity issues between material geometries; it supports MPI 3D parallel partitioning, suitable for background mesh scales of tens of millions or hundreds of millions; it can output parallel VTK structure mesh files and physical boundary patch files, which facilitates subsequent CFD solver initialization and post-processing visualization.

[0022] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart of the method provided by the present invention.

[0025] Figure 2 This is a schematic diagram of the independent space acceleration structure for each material provided by the present invention.

[0026] Figure 3 This is a schematic diagram of thin-layer risk unit protection provided by the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but should not be used to limit the scope of this invention.

[0028] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0029] The following is combined with Figures 1 to 3 The present invention will be further described in detail below, including a method, system, and device for generating large-scale parallel multi-material distance field volume fractions: In this embodiment, as Figure 1 As shown, a method for generating volume fractions of range fields in a large-scale parallel multi-material system is provided, comprising the following steps: S1: Obtain multiple material geometry models and their corresponding configuration parameters.

[0030] Material geometry models include STL triangular patch models, OBJ patch models, PLY patch models, VTKPolyData patch models, or closed geometry models represented by sets of triangles.

[0031] This embodiment reads configuration parameters through a configuration file. The configuration parameters include material number, material name, material priority, thin-layer protection parameters, background mesh parameters, and MPI parallel partitioning parameters.

[0032] Material priority, thin-layer protection parameters, and conflict resolution parameters are used for the subsequent volume fraction allocation and conservation correction of multi-material overlapping conflict units. A higher material priority value indicates a higher retention weight in overlapping conflict resolution. Thin-layer protection parameters include thin-layer threshold, thin-layer protection switch, and / or the minimum retention volume fraction of thin-layer risk materials.

[0033] The configuration parameters can be passed in via JSON files, XML files, YAML files, databases, graphical interfaces, or command-line parameters.

[0034] S2: Generate a unified background Cartesian mesh based on the joint spatial extent of multiple material geometry models, and divide the unified background Cartesian mesh into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters.

[0035] The specific process includes: calculating the spatial bounding box of each material's geometric model; finding the union of the spatial bounding boxes of all materials to obtain a joint bounding box; expanding the joint bounding box according to a preset bounding box expansion ratio (paddingRatio) to generate a computational domain containing all materials and background regions, resulting in a unified background Cartesian mesh; dividing the background mesh into units based on the background mesh parameters; then calculating the initial number of mesh points according to the MPI parallel partitioning parameters; and correcting the initial number of mesh points to ensure that the scale of each local subdomain is consistent after MPI 3D partitioning, so that the number of global units is divisible by the number of partitions in the corresponding direction, thus completing the MPI subdomain partitioning.

[0036] The above operations enable the background mesh to cover the joint space of multiple materials and be uniformly divided by the MPI process, providing a unified spatial basis for subsequent SDF, VOF and parallel output.

[0037] A unified background Cartesian mesh is used to divide the process into multiple MPI subdomains according to partX×partY×partZ. Each process number corresponds to one MPI subdomain. Adjacent MPI subdomains share boundary points, but only the outer boundary MPI subdomain outputs physical boundary patches. partX represents the number of partitions in the X-axis direction, partY represents the number of partitions in the Y-axis direction, and partZ represents the number of partitions in the Z-axis direction. Let the total number of MPI processes be mpiSize, then mpiSize = partX×partY×partZ. For any process, the one-dimensional process number is mapped to a three-dimensional subdomain number.

[0038] Each MPI process determines the corresponding MPI subdomain based on the 3D subdomain number and generates local coordinates based on the global index. Adjacent MPI subdomains have consistent coordinates at shared boundary points, thus ensuring that the parallel structured mesh can be correctly stitched together during post-processing.

[0039] S3: Construct an independent space acceleration structure for each material and calculate the signed distance field (SDF) for each material in the corresponding MPI subdomain according to the configuration parameters.

[0040] In this embodiment, an independent spatial acceleration structure is constructed for each material to improve the efficiency of calculating the nearest distance from a point to the material's geometric surface during the SDF query process.

[0041] The spatial acceleration structure is used to support nearest distance queries from points to the material's geometric surface, including combinations of one or more of BVH, AABBTree, KD-tree, and Octtree. Multiple materials can be used to construct the same spatial acceleration structure, or different spatial acceleration structures can be constructed.

[0042] In this embodiment, each material corresponds to an independent spatial acceleration cache. When calculating SDF, the spatial acceleration structure of the corresponding material is called according to the material number, so as to avoid multiple materials misusing the same spatial acceleration structure and causing different materials to have the same SDF field.

[0043] The SDF calculation process includes: calculating the shortest distance from the background mesh point to the current material geometry; determining whether the background mesh point is inside or outside the material by using ray parity judgment, normal judgment, or geometry inside / outside judgment methods, and obtaining the inside / outside sign; generating the signed distance value of the current material based on the shortest distance and the inside / outside sign; and summing all the signed distance values ​​to obtain the SDF.

[0044] like Figure 2 As shown, there are three materials: material B, material C, and material S. Independent caches (independent cache B, independent cache C, and independent cache S) are allocated to each of the three materials, and independent spatial acceleration structures (BVH / AABB Tree B, BVH / AABB Tree C, and BVH / AABB Tree S) are created. These spatial acceleration structures are combinations of BVH and AABB Trees. Independent queries are performed on each of the three spatial acceleration structures to obtain the corresponding SDFs (Sdf_B, Sdf_C, and Sdf_S) for the three materials.

[0045] Taking the BVH structure as an example, firstly, based on the STL triangular facet set of the current material, the computational axes of each triangular facet are aligned with the bounding box. Then, nodes are recursively partitioned according to the spatial distribution of the triangular facets, forming a hierarchical bounding box tree. During SDF queries, starting from the BVH root node, pruning is performed based on the distance from the query point to the node's bounding box, skipping nodes that cannot possibly contain the nearest triangle, and only visiting leaf nodes that may contain the nearest triangle. This reduces the number of triangular facet traversals and improves the SDF computation efficiency for large-scale mesh points. For each material, its spatial acceleration structure corresponds one-to-one with the material's geometric data.

[0046] In multi-material scenarios, different materials have independent STL geometry files, triangular facet sets, and spatial locations. Therefore, each material should use a spatial acceleration structure corresponding to its own geometry data. This embodiment binds the spatial acceleration cache to the material runtime object.

[0047] In another implementation, the cache index can be constructed using the material number, material geometry data pointer, STL file identifier, and number of triangular facets. When performing an SDF query for a specific material, the cache index is first checked to see if a corresponding spatial acceleration structure already exists. If it does, the material cache is reused directly; otherwise, a new spatial acceleration structure is created based on the material's triangular facet set and written to the cache table. This ensures that each material's SDF query uses its corresponding geometry acceleration structure.

[0048] The above mechanism ensures that the SDF of different materials is calculated independently by their respective spatial acceleration structures. By using independent spatial acceleration structures for each material, this embodiment avoids both the computational overhead caused by repeatedly constructing acceleration structures and the SDF confusion caused by erroneous reuse of geometric caches between different materials, thereby improving the correctness, stability, and scalability of the multi-material SDF-VOF volume fraction generation process.

[0049] S4: Subsample the background grid cells within the MPI subdomain based on the signed distance field to obtain the original volume fraction of each material in each background grid cell.

[0050] The original volume fraction is obtained by subsampling from background grid cells, including the following steps: arranging multiple subsampling points in each background grid cell; determining whether the subsampling point is located inside the corresponding material based on the sign of the SDF of each material at each subsampling point; counting the number of subsampling points located inside each material; and taking the ratio of the number of subsampling points located inside the current material to the total number of subsampling points as the original volume fraction of the material.

[0051] In this embodiment, sub-sampling points are arranged within each background grid cell. If the number of sub-sampling points in one direction is S, then the total number of sub-sampling points within each background grid cell is S. 3 When S=4, each background grid cell contains 64 sub-sampling points.

[0052] For each material, this embodiment counts the number of internal sub-sampling points based on the sign of the corresponding material's SDF at the sub-sampling point, and obtains the original volume fraction of that material in the current cell. Since each material is calculated independently, the sum of the original volume fractions of multiple materials may be less than, equal to, or greater than 1.

[0053] S5: Based on the original volume fraction of each material in each background grid cell, the cell state of each background grid cell is identified, and the original volume fraction of each material is adjusted based on the cell state to obtain the adjusted volume fraction of each material. The remaining volume is then supplemented using the background phase to obtain the volume fraction calculation result.

[0054] The unit states include background units, single-material units, multi-material non-conflicting units, and multi-material overlapping conflicting units.

[0055] For each background mesh cell, calculate the sum of material volume fractions (sumMaterial) and the number of non-zero materials (nonZeroCount) based on the original volume fractions of each material within it, and then identify the cell state. The identification rules include: If nonZeroCount=0, then the cell state is background cell; If nonZeroCount=1, then the element state is a single material element; If nonZeroCount>1 and sumMaterial≤1, then the element state is a multi-material non-conflicting element; If nonZeroCount>1 and sumMaterial>1, then the element state is a multi-material overlapping conflict element.

[0056] For background elements, single-material elements, and multi-material non-conflicting elements, the original volume fraction of each material is kept unchanged, i.e., the original volume fraction is used as the adjusted volume fraction; and the remaining volume is supplemented by the background phase. =1-sumMaterial, The background phase volume fraction.

[0057] In multi-material overlapping conflict cells, the sum of the original volume fractions of multiple materials exceeds the cell volume. This embodiment involves a conflict resolution mechanism. The allocation weight of each material is calculated based on material geometry information, engineering priority, sampling reliability, thin-layer protection requirements, and adjacent cell continuity. Then, the original volume fractions are adjusted to resolve multi-material volume fraction conflicts. Specifically, the allocation weight of each material is calculated based on the original volume fraction factor, material priority factor, SDF distance factor, sub-sampling confidence factor, thin-layer protection factor, and adjacent cell continuity factor. The calculation formula is as follows: in, Assign weights to the i-th material. Let i be the original volume fraction factor of the i-th material. Let i be the material priority factor for the i-th material. Let SDF distance factor be the i-th material. Let be the subsampling confidence factor for the i-th material. Let be the thin-layer protection factor of the i-th material. is the continuity factor between adjacent units of the i-th material.

[0058] The original volume fraction factor reflects the original proportion of the current material's original volume fraction within the background mesh cells, and is calculated based on the original volume fraction of each material. , Let be the original volume fraction of the i-th material.

[0059] The material priority factor is determined by the material priority in the configuration file and is used to increase the retention tendency of high-priority materials in the event of geometric overlap or material competition.

[0060] The SDF distance factor is determined based on the absolute SDF value from the center point, vertex, or sub-sampling point of the current background mesh cell to the material interface, and is used to increase the weighting of the material in the internal region of the material.

[0061] The subsampling confidence factor is determined based on the distribution of subsampling points within the current material, the number of sampling points, and the spatial connectivity of the sampling points. It is used to reduce erroneous material allocation caused by discrete sampling errors.

[0062] The formula for calculating the subsampling confidence factor is: Among them, the confidence level of the number of samples for: Spatial connectivity confidence for: Sampling point distribution reliability for: and: in, For the first The number of material samples identified as internal sub-sampling points within the current cell. To minimize the number of reliable sampling points, For the first The number of sampling points in the maximum connected component of a material's internal sub-sampling points. For the first The number of isolated sampling points in the sub-sampling points within a material. The first confidence level weight is used. The second confidence level weight is... Third confidence weight. Indicates will Limited to Within the range. To take the smaller value.

[0063] An isolated sampling point refers to a sampling point within the sub-sampling grid of the current cell that is determined to be inside the material and has no other adjacent internal sub-sampling points under a preset adjacency relationship. The preset adjacency relationship can be 6-adjacency, 18-adjacency, or 26-adjacency, with 6-adjacency being preferred. When using 6-adjacency, if an internal sub-sampling point has no other internal sub-sampling points in any of the six directions (up / down, left / right, front / back), then that point is counted. For example, when At that time, there are a total of Number of sub-sampling points. If the first... The materials have a total of Given a set of internal sub-sampling points, where four points form a connected region and one point is not adjacent to any of the other internal points, then... , At this point, the spatial connectivity confidence level reflects whether internal points form a continuous region, while the sampling point distribution confidence level reflects the proportion of isolated noise points.

[0064] When the number of sampling points inside the material is large, the internal sub-sampling points form a large connected region, and the number of isolated sampling points is small. Increase; conversely, when the material consists of only a small number of discrete sampling points, or when the internal sub-sampling points are spatially scattered, Decrease.

[0065] The thin-layer protection factor is used to increase the retention weight of thin-layer risk materials. The default value is 1.

[0066] Adjacent cell continuity factor, used to determine the continuity of adjacent cells based on the current cell. Surrounding materials The spatial distribution state corrects the material allocation weights. Let the set of neighboring elements of the current element be... It can use 6 adjacencies, 18 adjacencies, or 26 adjacencies.

[0067] Define the material existence indicator function : in, The adjacent cells of the current cell, For materials In adjacent units The original volume fraction in The material has a threshold value. A scaling factor exists in the neighborhood. for: in, for The number of elements in the data.

[0068] Neighborhood average volume fraction for: The neighborhood similarity factor is: in, The neighborhood similarity threshold, This represents the original volume fraction of material i within the current cell C. To take the larger value.

[0069] Define the dominant material consistency function for: in, In order to make Take the material number with the maximum value, where j is the material traversal index.

[0070] Dominant material consistency factor for: .

[0071] The neighborhood continuity evaluation value is obtained by combining the proportion of neighborhood presence, neighborhood similarity, and consistency of dominant materials. : in, For each neighborhood, there is a proportional weight. For neighborhood similarity weights, The dominant material consistency weight is determined, and the following conditions are met: .

[0072] To avoid completely suppressing real small-scale or thin-layer materials, a continuity lower limit is set. The final continuity factor between adjacent units is: in, Let i be the continuity factor of material i in the adjacent elements of the current element C. It is acceptable When materials When a high proportion of a material appears in adjacent cells, its volume fraction is close to the neighborhood average, and the dominant material remains consistent within the neighborhood, this indicates a high probability of a high proportion of a material in adjacent cells. Increase. When the material It only occurs when the current unit appears in isolation, or when its distribution differs significantly from that of its neighboring unit. Decrease.

[0073] The adjusted volume fraction is calculated based on the allocation weights of each material. The calculation formula is as follows: in, Let be the adjusted volume fraction of the i-th material.

[0074] In another implementation, when it is necessary to retain a portion of the background phase in a multi-material overlapping conflict cell, the total material occupied is determined based on the original sampling results, SDF symbol distribution, or preset rules; then, the adjusted volume fraction is calculated based on the total material occupied and the allocation weight of each material, using the following formula: The background phase volume fraction is =1-occupied.

[0075] Unlike ordinary proportional normalization methods that only scale the volume fractions of each material, this embodiment introduces allocation weights. This allows the volume fraction allocation of overlapping and conflicting multi-material units to comprehensively reflect material priority, geometric distance reliability, subsampling reliability, thin-layer protection requirements, and the continuity of adjacent units. This better aligns with material geometry and engineering specifications, and reduces the risk of thin-layer materials or important materials with low volume fractions being weakened or eliminated during normalization. Therefore, this embodiment can generate multi-material volume fraction fields that satisfy conservation constraints and have good geometry preservation capabilities when multi-material geometries overlap, intersect, or compete for sampling.

[0076] Thin layers, sharp corners, small-scale components, or locally narrow regions may occupy only a few sampling points when the background mesh resolution is coarse. When adjusting the original volume fraction, such materials are easily suppressed or even completely eliminated by high-volume-fraction materials in multi-material overlapping conflict cells. This embodiment sets up a thin-layer protection mechanism to protect them through thin-layer risk cells.

[0077] The cell state also includes thin-layer risk cells. Thin-layer risk cells are determined independently; for example, the cell state of a background mesh cell can be both a multi-material overlapping conflict cell and a thin-layer risk cell.

[0078] If a material satisfies any of the following rules, the element state of the background mesh element is identified as a thin-layer risk element, and the material is identified as a thin-layer risk material. The rules include: (1) The material exhibits SDF sign changes (positive and negative signs change) within the background grid cells. (2) The original volume fraction of the material is lower than the thin layer threshold, and the material exists continuously in adjacent background grid cells; (3) The thin-film protection switch of the material is configured to be on.

[0079] For thin-layer risk materials, this embodiment increases their corresponding thin-layer protection factor (e.g., increases it to twice the original value) or sets a minimum retention volume fraction. If setting the minimum retention volume fraction causes the sum of the adjusted volume fractions of all materials to exceed 1 or the total material occupancy, then the adjusted volume fractions of non-thin-layer risk materials are proportionally reduced.

[0080] like Figure 3 As shown, material B is a thin-layer risk material. When thin-layer material B passes through the background cell, even if the original volume fraction obtained by sampling is small, it can be identified and protected based on the SDF sign change, thin-layer threshold and neighborhood continuity. The original volume fraction of material B is preserved to avoid the thin layer from disappearing.

[0081] The adjusted volume fraction and background phase volume fraction are subjected to nonnegative clipping and unit sum error closed-loop correction so that the sum of the volume fractions of all material phases and the background phase in each background grid cell is 1, thus obtaining the volume fraction calculation result.

[0082] The specific process includes: Nonnegative clipping: Nonnegative clipping is performed on the adjusted volume fractions of all materials and the background phase volume fraction using an interval clipping method, ensuring that all volume fractions fall within the [0,1] interval. A value of 0 is used when the volume fraction is less than 0, a value of 1 is used when the volume fraction is greater than 1, and the original value is retained when the volume fraction falls within the [0,1] interval.

[0083] Unit and error closed-loop correction: Calculate the sum of errors R for all volume fractions and correct based on the calculation results. The calculation formula is as follows: Where R represents the deviation of the current total volume fraction from 1. When |R| is less than or equal to the preset total volume fraction tolerance, the current cell is considered to have met the unit and conservation conditions, and no further correction is performed. When |R| is greater than the preset total volume fraction tolerance, residual allocation is performed based on the cell state and allocation weights. Specifically: If R>0, it means that the total volume fraction of the current unit is less than 1. The remaining volume fraction will be added to the background phase or added to each material phase according to the allocation weight.

[0084] If R < 0, it means that the total volume fraction of the current unit is greater than 1, and the excess volume fraction is deducted from the background phase; when the background phase is insufficient to bear the entire deduction, the remaining volume fraction is deducted from the dominant material phase, or the remaining volume fraction is deducted from each material phase according to the allocation weight.

[0085] Choose any of the following rules to determine the dominant material phase: (1) the material with the largest volume fraction in the current cell; (2) the material with the highest material priority in the current cell; (3) the material with the largest assigned weight in the current cell; (4) the material with the highest continuity with adjacent cells in the current cell.

[0086] After each correction is completed, nonnegative clipping is performed on all material phases and background phases again, and the total error of all volume fractions is recalculated until |R| is less than or equal to the preset total volume fraction tolerance, or the maximum number of iterations is reached.

[0087] Each MPI process calculates the volume fraction of all background mesh cells within its corresponding MPI subdomain. Multiple MPI processes perform the calculations in parallel.

[0088] S6: Perform volume fraction consistency correction on the boundary background mesh cells of adjacent MPI subdomains to correct the volume fraction calculation results of each MPI subdomain.

[0089] In the preceding steps (steps S3-S5), each MPI process independently performs SDF query and VOF subsampling calculations based on the corresponding MPI subdomain and global material geometry data. The calculation of the original volume fraction of each material does not depend on ghost elements. Each MPI process only calculates and outputs the multi-material volume fraction for its own background mesh elements. In this step, when performing MPI subdomain boundary consistency correction, ghost elements are created for the boundary background mesh elements, and ghost element information is exchanged. Ghost elements are not used as the actual output elements owned by the current process, but rather as auxiliary neighborhood data for adjacent subdomains.

[0090] The specific process includes: each MPI process first identifies the boundary background grid cells from the background grid cells. If there are adjacent MPI subdomains, it exchanges ghost cell information with the adjacent MPI process. The fields of the ghost cell information include the adjusted volume fraction of each material, the background phase volume fraction, the cell state, the sampling confidence factor, the thin layer protection factor, and the adjacent cell continuity factor.

[0091] The difference between the boundary background mesh cell and the ghost cell information is judged. If the difference between the adjusted volume fractions of the two is less than the preset tolerance, the volume fraction calculation result of the boundary background mesh cell remains unchanged; if the difference exceeds the preset tolerance, the volume fraction field is corrected.

[0092] Let the boundary background grid cell of the current process be... The corresponding ghost unit passed in by the adjacent process is The quantity of materials is The background is recorded as the first Phase. Based on the adjusted volume fraction, the volume fraction difference between the boundary background mesh elements and the ghost elements is calculated for each phase (material phase and background phase), and the maximum value is taken as the maximum difference. At the same time, the sum of the differences in each phase is taken as the overall difference. If the following conditions are met: ,and ,in, If the volume fraction tolerance for adjacent cells is set, then the volume fraction fields of the boundary background mesh cells and the ghost cells are considered to be consistent, and the volume fraction calculation results of the boundary background mesh cells remain unchanged. If any of the above conditions are not met, then an inconsistency is determined between the two, and field correction is performed.

[0093] Adjacent unit volume fraction tolerance The number of VOF subsamples is determined in this embodiment as follows: in, This represents the number of samples taken in one direction. The total number of sub-sampling points. This indicates that a discrete sampling error within half a sampling point is allowed. Used to filter floating-point errors Used to limit the upper limit of tolerance.

[0094] Field correction can be performed using ownership unit adjudication or confidence-weighted fusion. When the boundary background mesh cell and the ghost cell correspond to the same global cell number, the calculation result of the preset ownership process shall prevail. in, The corrected volume fraction for the boundary background mesh cells. This indicates the corresponding unit in the ownership process. The ownership process can be determined based on the global unit number or the MPI process number, for example, taking the smaller number of two adjacent processes as the ownership process.

[0095] When the boundary background mesh element and the ghost element are adjacent interface elements, a confidence-weighted fusion method is used. Let the combined confidence levels of the elements on both sides be... and , The overall confidence level of the boundary background grid cells, The overall confidence level for the Ghost unit. Overall confidence level. The calculation formula is: in, The subsampling confidence factor for unit C. This is the thin-layer protection factor for unit C.

[0096] The corrected volume fraction is: in, To prevent small quantities with a denominator of zero, it is preferable to take .

[0097] Perform unit and error closed-loop correction on the volume fraction calculation results of the corrected boundary background mesh cells (see step S5 for details).

[0098] MPI subdomain boundary consistency correction can be handled by a single MPI process to ensure the determinism and repeatability of parallel computation results.

[0099] This embodiment improves the continuity of multi-material volume fraction fields near the boundary, thin-layer preservation capability, and parallel output consistency by using the MPI subdomain boundary consistency correction mechanism when cross-subdomain neighborhood information is required.

[0100] S7: Combine the volume fraction calculation results of all MPI subdomains to obtain the multi-material distance field volume fraction results.

[0101] Each MPI process outputs volume fraction calculation results (local structured mesh result file), while the main process outputs a parallel index file, yielding multi-material distance field volume fraction results. These multi-material distance field volume fraction results include multi-material SDF point fields, multi-material VOF element fields, background phase volume fraction fields, and parallel result files.

[0102] This embodiment also provides a large-scale parallel multi-material distance field volume fraction generation system, which adopts the following technical solution: including: The data acquisition module is used to acquire multiple material geometric models and their corresponding configuration parameters; The MPI subdomain partitioning module is used to generate a unified background Cartesian mesh based on the joint spatial extent of multiple material geometry models, and to partition the unified background Cartesian mesh into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters. The signed distance field calculation module is used to construct an independent spatial acceleration structure for each material and calculate the signed distance field of each material in the corresponding MPI subdomain according to the configuration parameters. The volume fraction calculation module is used to subsample the background grid cells in the MPI subdomain based on the signed distance field to obtain the original volume fraction of each material in each background grid cell. The volume fraction conflict resolution module is used to identify the cell state of each background grid cell based on the original volume fraction of each material in each background grid cell, adjust the original volume fraction of each material based on the cell state to obtain the adjusted volume fraction of each material, and use the background phase to make up the remaining volume to obtain the volume fraction calculation result; and perform non-negativity clipping and unit sum error closed-loop correction; and perform volume fraction consistency correction on the boundary background grid cells of adjacent MPI subdomains to correct the volume fraction calculation results of each MPI subdomain; The results output module is used to merge the volume fraction calculation results of all MPI subdomains to obtain the multi-material distance field volume fraction results.

[0103] This embodiment also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-described large-scale parallel multi-material distance field volume fraction generation method.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A parallel multi-material distance field volume fraction generation method, characterized by, include: Obtain multiple material geometry models and their corresponding configuration parameters; A unified background Cartesian mesh is generated based on the joint spatial extent of multiple material geometry models, and the unified background Cartesian mesh is divided into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters. An independent space acceleration structure is constructed for each material, and the signed distance field of each material is calculated in the corresponding MPI subdomain according to the configuration parameters; Subsampling of background grid cells within the MPI subdomain is performed based on the signed distance field to obtain the original volume fraction of each material in each background grid cell. The cell state of each background grid cell is identified based on the original volume fraction of each material in each background grid cell. The original volume fraction of each material is adjusted based on the cell state to obtain the adjusted volume fraction of each material. The remaining volume is then supplemented using the background phase to obtain the volume fraction calculation result. The total volume fraction of materials (sumMaterial) and the number of non-zero materials (nonZeroCount) are calculated based on the original volume fraction of each material. The unit state is identified based on the identification rules. The unit state includes background unit, single material unit, multi-material non-conflicting unit, and multi-material overlapping and conflicting unit. For background elements, single-material elements, and multi-material non-conflicting elements, the original volume fraction is used as the adjusted volume fraction; For multi-material overlapping conflict elements, the allocation weight of each material is calculated based on the original volume fraction factor, material priority factor, SDF distance factor, subsampling confidence factor, thin layer protection factor and adjacent element continuity factor, and the adjusted volume fraction is calculated based on the allocation weight of each material. The volume fraction calculation results of all MPI subdomains are combined to obtain the multi-material distance field volume fraction results.

2. A parallel multi-material distance field volume fraction generation method according to claim 1, wherein, The identification rules include: If nonZeroCount=0, then the cell state is background cell; If nonZeroCount=1, then the element state is a single material element; If nonZeroCount>1 and sumMaterial≤1, then the element state is a multi-material non-conflicting element; If nonZeroCount>1 and sumMaterial>1, then the element state is a multi-material overlapping conflict element.

3. A parallel multi-material distance field volume fraction generation method according to claim 2, wherein, For overlapping conflicting elements made of multiple materials, the formula for calculating the weight allocation of each material is as follows: wherein, is a weight assigned to the i-th material, is an original volume fraction factor for the i-th material, is a material priority factor for the i-th material, is an SDF distance factor for the i-th material, is a subsampling confidence factor for the i-th material, is a thin layer protection factor for the i-th material, is a neighboring cell continuity factor for the i-th material; The adjusted formula for calculating the volume fraction is: in, Let be the adjusted volume fraction of the i-th material.

4. The method for generating volume fraction of a parallel multi-material distance field as described in claim 3, characterized in that, When a total material percentage exists, the formula for calculating the adjusted volume fraction is: Where occupied is the total amount of material occupied.

5. The method for generating volume fraction of a parallel multi-material distance field as described in claim 3, characterized in that, If a material satisfies any of the following rules, the element state of the background mesh element is further identified as a thin-layer risk element in addition to the above element states, and the material is identified as a thin-layer risk material. The rules include: (1) The material exhibits SDF sign variation within the background grid cells; (2) The original volume fraction of the material is lower than the thin layer threshold, and the material exists continuously in adjacent background grid cells; (3) The thin-film protection switch for the material is configured to be on; For thin-layer risk materials, increase their corresponding thin-layer protection factor or set their minimum retention volume fraction; Configuration parameters include thin-layer threshold, thin-layer protection switch, and minimum retention volume fraction.

6. The method for generating volume fraction of a parallel multi-material distance field as described in claim 5, characterized in that, If setting a minimum retention volume fraction results in the sum of the adjusted volume fractions of all materials exceeding 1 or the total material occupancy, then the adjusted volume fraction of non-thin-layer risk materials will be proportionally reduced.

7. The method for generating volume fraction of a parallel multi-material distance field as described in claim 1, characterized in that, Volume fraction consistency correction is performed on the boundary background mesh cells of adjacent MPI subdomains to correct the volume fraction calculation results of each MPI subdomain.

8. The method for generating volume fraction of a parallel multi-material distance field as described in claim 1, characterized in that, Spatial acceleration structures are used to support nearest distance queries from points to material geometry surfaces, including combinations of one or more of BVH, AABB Tree, KD-tree, and Octtree; When computing the signed distance field, an independent spatial acceleration cache is allocated for each spatial acceleration structure.

9. A parallel multi-material distance field volume fraction generation system, characterized in that, A method for generating a parallel multi-material range field volume fraction as described in any one of claims 1 to 8, comprising: The data acquisition module is used to acquire multiple material geometric models and their corresponding configuration parameters; The MPI subdomain partitioning module is used to generate a unified background Cartesian mesh based on the joint spatial extent of multiple material geometry models, and to partition the unified background Cartesian mesh into multiple MPI subdomains according to the MPI parallel partitioning parameters in the configuration parameters. The signed distance field calculation module is used to construct an independent spatial acceleration structure for each material and calculate the signed distance field of each material in the corresponding MPI subdomain according to the configuration parameters. The volume fraction calculation module is used to subsample the background grid cells in the MPI subdomain based on the signed distance field to obtain the original volume fraction of each material in each background grid cell. The volume fraction conflict resolution module is used to identify the cell state of each background grid cell based on the original volume fraction of each material in each background grid cell, adjust the original volume fraction of each material based on the cell state to obtain the adjusted volume fraction of each material, and use the background phase to make up the remaining volume to obtain the volume fraction calculation result. The total volume fraction of materials (sumMaterial) and the number of non-zero materials (nonZeroCount) are calculated based on the original volume fraction of each material. The unit state is identified based on the identification rules. The unit state includes background unit, single material unit, multi-material non-conflicting unit, and multi-material overlapping and conflicting unit. For background elements, single-material elements, and multi-material non-conflicting elements, the original volume fraction is used as the adjusted volume fraction; For multi-material overlapping conflict elements, the allocation weight of each material is calculated based on the original volume fraction factor, material priority factor, SDF distance factor, subsampling confidence factor, thin layer protection factor and adjacent element continuity factor, and the adjusted volume fraction is calculated based on the allocation weight of each material. The results output module is used to merge the volume fraction calculation results of all MPI subdomains to obtain the multi-material distance field volume fraction results.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements a method for generating a parallel multi-material distance field volume fraction according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • CFD-DEM processing method and system for particles in any shape based on improved immersion boundary and directed distance field

    CN119047285A

  • Multiphase flow numerical simulation method and device in engineering numerical simulation scene, equipment and medium

    CN120745327A