A method for adaptive modeling of a tokamak vacuum chamber conductor and related devices
Patent Information
- Application Number
- CN202610723359.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-08-18
AI Technical Summary
[0008]本发明所要解决的技术问题是现有的手动离散化建模效率低下,D型截面真空室近水平段建模时存在数值奇异性问题,同时角点特征被样条插值平滑化、均匀采样导致角点精度不足等,目的在于提供一种托卡马克真空室导体自适应建模方法及相关设备,解决了如何实现真空室导体的全自动化建模,在任意倾斜角度段的稳定建模,在任意多边形截面真空室的高精度自动化建模
[0036] Compared with existing technologies, this invention has the following advantages and beneficial effects: By detecting corner points in the original contour data before interpolation and determining the corner point positions based on the change in direction angle, corner point information is preserved in subsequent processing, thus avoiding the weakening or alteration of corner point features by spline interpolation. This allows the conductor discrete modeling to reflect the geometric features in the original contour. Sampling weights are calculated based on the corner arc length position, and sampling points are generated in the weighted arc length space. This makes the sampling points more densely distributed near corner points and relatively sparsely distributed in non-corner areas, thus enabling the discretization process to adapt to the geometric variations in different regions without changing the total number of conductor units. Corner point constraint processing is applied to the sampling points to align them with the corner points, ensuring accurate representation of corner points in the conductor discretization results and avoiding the impact of corner point position offsets on the calculation of conductor geometric parameters. Based on the inclination angle of the line connecting adjacent sampling points, different parallelogram conductor parameter representation methods are selected to match the geometric parameter calculation method of the conductor unit with the line segment direction, thus avoiding parameter calculation anomalies that may occur when using a single representation method in near-horizontal or near-vertical segments. A complete modeling workflow is constructed, encompassing data preprocessing, corner detection, adaptive sampling, and conductor element generation. This enables the vacuum chamber conductor modeling process to be completed automatically based on unified rules, thereby reducing manual intervention and improving the consistency of the modeling process. Duplicate points are removed and closure is processed on the input contour data, ensuring that subsequent arc length parameterization and sampling processes are based on standardized data, thus guaranteeing the continuity of the modeling workflow.
Smart Images

Figure CN122595565A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modeling and simulation of nuclear fusion tokamak devices, specifically to an adaptive modeling method for conductors in a tokamak vacuum chamber and related equipment. Background Technology
[0002] The tokamak is currently the most promising magnetic confinement device for achieving controlled nuclear fusion power generation. Its vacuum chamber, as the container for plasma, plays a crucial role in plasma control and electromagnetic field calculations. In research involving tokamak equilibrium calculations, plasma response analysis, and plasma control, it is typically necessary to accurately model the vacuum chamber conductors. This involves discretizing the continuous vacuum chamber walls into a finite number of conductor elements and characterizing the geometric features of each conductor element using a parallelogram cross-section model.
[0003] In existing technologies, vacuum chamber conductor modeling methods mainly include manual discretization modeling and automated modeling methods for conventional D-shaped cross-sections. Automated modeling methods typically include: acquiring contour data points of the vacuum chamber cross-section, performing spline interpolation on the contour for smoothing, uniform sampling based on arc length, and constructing parallelogram conductor elements based on adjacent sampling points; each conductor element is typically described by parameters such as center coordinates (R, Z), radial dimension dR, vertical dimension dZ, and tilt angle AC.
[0004] However, the aforementioned existing technologies still have the following problems:
[0005] (1) Low modeling efficiency. Manual discretization modeling requires determining the geometric parameters of each conductor unit one by one. For vacuum chambers containing straight segments, circular arc segments and complex transition structures, a large number of conductor units are usually involved, and the modeling process is quite labor-intensive. In the design of plasma control systems, the conductor discretization scheme needs to be adjusted multiple times based on simulation results, resulting in many repetitive operations and affecting modeling efficiency.
[0006] (2) Numerical instability exists in the modeling of near-horizontal segments. When using polar coordinates or parametric curves to describe the contour, the tangent direction corresponding to the near-horizontal segment is close to the horizontal direction. If the angle is used as the discretization parameter, the arc length corresponding to the change of adjacent angles is large, which can easily lead to uneven distribution of sampling points. At the same time, the curvature of the near-horizontal segment is small but the rate of change may be large. Traditional equal angle or equal arc length sampling is difficult to take into account the geometric characteristics of different regions, which can easily generate discretization errors in local areas. In addition, the automatically generated conductor unit may have a large aspect ratio in this region, which affects the stability of subsequent electromagnetic calculations.
[0007] (3) Non-D-shaped cross sections are difficult to model effectively and automatically. Compared with conventional D-shaped cross sections, non-D-shaped cross sections may contain elliptical arcs, spline curves, multi-segment variable curvature structures, and local concave and convex features, which are difficult to describe using a unified parametric model. Existing methods usually use spline interpolation to smooth the contour before sampling, which can easily weaken the sharp corners in the original contour, thus affecting subsequent feature recognition. At the same time, the sampling method based on uniform arc length cannot effectively characterize the corner area, resulting in a deviation between the conductor's discretized contour and the original contour, affecting the accuracy of electromagnetic calculations. Summary of the Invention
[0008] The technical problems to be solved by this invention are the low efficiency of existing manual discretization modeling, the numerical singularity problem in the modeling of the near-horizontal section of the D-shaped cross-section vacuum chamber, and the insufficient accuracy of corner points due to spline interpolation smoothing and uniform sampling. The purpose is to provide an adaptive modeling method and related equipment for the conductor of a tokamak vacuum chamber, which solves the problems of how to achieve fully automated modeling of the conductor of the vacuum chamber, stable modeling in any tilt angle segment, and high-precision automated modeling of vacuum chambers with arbitrary polygonal cross-sections.
[0009] This invention is achieved through the following technical solution:
[0010] An adaptive modeling method for conductors in a tokamak vacuum chamber includes:
[0011] Obtain the discrete contour data point coordinate sequence of the cross section of the tokamak vacuum chamber, preprocess the discrete contour data, filter out duplicate points or data points with a distance less than a preset threshold based on the distance between adjacent data points, and perform contour closure processing.
[0012] Based on the preprocessed discrete contour data, without interpolation, corner point detection is performed by calculating the change in the direction angle of adjacent line segments, the set of corner points is determined and the corresponding arc length position is recorded.
[0013] The discrete contour data is processed by arc length parameterization to obtain a monotonically increasing arc length sequence, and the arc length parameters corresponding to each corner point are obtained.
[0014] Based on the arc length position of the corner point, the arc length distance from each sampling segment to the nearest corner point is calculated, and the weight of each sampling segment is determined according to the arc length distance to generate a weighted arc length distribution for sampling;
[0015] Target sampling points are generated based on the weighted arc length distribution, and the target sampling points are mapped onto the original contour through interpolation to obtain an adaptive sampling point sequence. Corner point constraints are then applied to the sampling points.
[0016] Based on the adaptive sampling point sequence, piecewise linear interpolation is used to determine the coordinates of each sampling point;
[0017] Conductor units are constructed based on adjacent sampling points, and the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit are determined by selecting between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points.
[0018] Organize the geometric parameters of all conductor elements into a conductor data matrix for electromagnetic simulation and output it.
[0019] Furthermore, the preprocessing of the discrete contour data includes: calculating the Euclidean distance between adjacent data points, and filtering out duplicate points or data points with a distance less than the minimum distance threshold based on a preset minimum distance threshold; performing closure detection on the filtered data point sequence, and copying the first point to the end of the sequence to form a closed contour when the first and last data points do not overlap.
[0020] Furthermore, the corner detection includes: for each internal data point, calculating the direction angle of the two line segments formed by it, the previous data point, and the next data point, and calculating the change between the two direction angles; normalizing the change in direction angle to a preset range, and marking the corresponding data point as a corner point when the change is greater than a preset corner detection threshold; and performing the same direction angle change calculation on the first and last connection points to handle the periodic boundary of the closed contour.
[0021] Furthermore, the arc length parameterization process includes: calculating the cumulative arc length of each data point based on the distance between adjacent data points, and constructing an arc length sequence; when there are adjacent data points in the arc length sequence that do not satisfy strict monotonically increasing, the subsequent arc length values are corrected by superimposing a preset small positive number to obtain a strictly monotonically increasing arc length sequence, and the arc length position corresponding to each corner point is determined accordingly.
[0022] Furthermore, the calculation of sampling weights based on the arc length position of corner points includes: performing dense and uniform sampling on the contour to obtain a dense arc length sequence; for each sampling segment, calculating the arc length distance from the midpoint of the sampling segment to the nearest corner point, and selecting the minimum distance according to the ring distance under the condition of a closed contour; and determining the weight of the corresponding sampling segment based on the arc length distance using a preset weight function.
[0023] Furthermore, the conductor unit construction includes: determining the tilt angle and length of the connecting line segment based on adjacent sampling points, and calculating the absolute value of the tilt angle relative to the horizontal direction; when the absolute value is less than a preset angle threshold, determining the radial dimension and tilt angle using a conductor parameter representation method based on the horizontal projection of the line segment; when the absolute value is greater than or equal to the angle threshold, determining the vertical dimension and tilt angle using a conductor parameter representation method based on the vertical projection of the line segment.
[0024] Furthermore, the adaptive sampling point generation includes: generating target sampling points in a weighted arc length space, and mapping the target sampling points to the original arc length space through interpolation; performing corner constraint processing on the mapped sampling point sequence; when the arc length distance between any corner point and the nearest sampling point is greater than a preset threshold, adjusting the nearest sampling point to the corresponding corner point position, and sorting the sampling points according to the arc length.
[0025] The present invention also provides an adaptive modeling system for conductors in a tokamak vacuum chamber, for implementing the aforementioned adaptive modeling method for conductors in a tokamak vacuum chamber, comprising:
[0026] The data acquisition and preprocessing module is used to acquire the discrete contour data point coordinate sequence of the tokamak vacuum chamber cross section, calculate the distance between adjacent data points, filter out duplicate points or data points with a distance less than the preset minimum distance threshold according to the preset minimum distance threshold, and perform closure processing on the contour data.
[0027] The corner detection module is used to calculate the change in direction angle based on the direction angle of adjacent line segments without interpolation, determine the set of corner points according to the preset corner detection threshold, and record the arc length position of the corresponding corner points.
[0028] The arc length parameterization module is used to calculate the cumulative arc length based on the distance between adjacent data points, construct the arc length sequence, and correct the arc length sequence when it does not meet the monotonically increasing condition, so as to obtain a monotonically increasing arc length sequence.
[0029] The weight calculation module is used to calculate the arc distance from the midpoint of each sampling segment to the nearest corner point based on the arc length position of the corner point, and determine the sampling weight according to the arc distance through a preset weight function;
[0030] An adaptive sampling module is used to generate target sampling points based on the sampling weights, map the target sampling points onto the original contour to obtain an adaptive sampling point sequence, and perform corner constraint processing and sorting on the sampling points;
[0031] The coordinate calculation module is used to calculate the coordinates of each sampling point based on the adaptive sampling point sequence using piecewise linear interpolation;
[0032] The conductor modeling module is used to construct conductor units based on adjacent sampling points, and selects between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points to determine the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit.
[0033] The data output module is used to organize the geometric parameters of each conductor unit into a conductor data matrix and output it for electromagnetic simulation calculations.
[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the adaptive modeling method for conductors of a tokamak vacuum chamber as described above.
[0035] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the adaptive modeling method for conductors in a tokamak vacuum chamber as described above.
[0036] Compared with existing technologies, this invention has the following advantages and beneficial effects: By detecting corner points in the original contour data before interpolation and determining the corner point positions based on the change in direction angle, corner point information is preserved in subsequent processing, thus avoiding the weakening or alteration of corner point features by spline interpolation. This allows the conductor discrete modeling to reflect the geometric features in the original contour. Sampling weights are calculated based on the corner arc length position, and sampling points are generated in the weighted arc length space. This makes the sampling points more densely distributed near corner points and relatively sparsely distributed in non-corner areas, thus enabling the discretization process to adapt to the geometric variations in different regions without changing the total number of conductor units. Corner point constraint processing is applied to the sampling points to align them with the corner points, ensuring accurate representation of corner points in the conductor discretization results and avoiding the impact of corner point position offsets on the calculation of conductor geometric parameters. Based on the inclination angle of the line connecting adjacent sampling points, different parallelogram conductor parameter representation methods are selected to match the geometric parameter calculation method of the conductor unit with the line segment direction, thus avoiding parameter calculation anomalies that may occur when using a single representation method in near-horizontal or near-vertical segments. A complete modeling workflow is constructed, encompassing data preprocessing, corner detection, adaptive sampling, and conductor element generation. This enables the vacuum chamber conductor modeling process to be completed automatically based on unified rules, thereby reducing manual intervention and improving the consistency of the modeling process. Duplicate points are removed and closure is processed on the input contour data, ensuring that subsequent arc length parameterization and sampling processes are based on standardized data, thus guaranteeing the continuity of the modeling workflow. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0038] Figure 1 Flowchart illustrating the specific implementation of the adaptive modeling method for conductors in a tokamak vacuum chamber;
[0039] Figure 2 This is a schematic diagram showing corner detection of a non-D-type vacuum chamber profile before interpolation processing.
[0040] Figure 3 This is a schematic diagram of the sampling weight distribution calculated based on the arc length of the corner point;
[0041] Figure 4 This is a schematic diagram of the sampling point distribution obtained using the uniform arc length sampling method;
[0042] Figure 5 This is a schematic diagram of the sampling point distribution obtained using an adaptive sampling method;
[0043] Figure 6 A schematic diagram of the modeling results for a D-type vacuum chamber conductor;
[0044] Figure 7 A schematic diagram of the modeling results for a non-D-type vacuum chamber conductor. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0046] Example 1
[0047] An adaptive modeling method for conductors in a tokamak vacuum chamber, such as Figure 1 As shown, it specifically includes:
[0048] Obtain the discrete contour data point coordinate sequence of the cross section of the tokamak vacuum chamber, preprocess the discrete contour data, filter out duplicate points or data points with a distance less than a preset threshold based on the distance between adjacent data points, and perform contour closure processing.
[0049] Based on the preprocessed discrete contour data, without interpolation, corner point detection is performed by calculating the change in the direction angle of adjacent line segments, the set of corner points is determined and the corresponding arc length position is recorded.
[0050] The discrete contour data is processed by arc length parameterization to obtain a monotonically increasing arc length sequence, and the arc length parameters corresponding to each corner point are obtained.
[0051] Based on the arc length position of the corner point, the arc length distance from each sampling segment to the nearest corner point is calculated, and the weight of each sampling segment is determined according to the arc length distance to generate a weighted arc length distribution for sampling;
[0052] Target sampling points are generated based on the weighted arc length distribution, and the target sampling points are mapped onto the original contour through interpolation to obtain an adaptive sampling point sequence. Corner point constraints are then applied to the sampling points.
[0053] Based on the adaptive sampling point sequence, piecewise linear interpolation is used to determine the coordinates of each sampling point;
[0054] Conductor units are constructed based on adjacent sampling points, and the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit are determined by selecting between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points.
[0055] Organize the geometric parameters of all conductor elements into a conductor data matrix for electromagnetic simulation and output it.
[0056] In this embodiment, the preprocessing of discrete contour data includes: calculating the Euclidean distance between adjacent data points, and filtering out duplicate points or data points with a distance less than the minimum distance threshold based on a preset minimum distance threshold; performing closure detection on the filtered data point sequence, and copying the first point to the end of the sequence to form a closed contour when the first and last data points do not overlap.
[0057] Specifically, obtain the discrete data point coordinate sequence of the vacuum chamber cross-sectional profile. Preprocess the data:
[0058] Calculate the Euclidean distance between adjacent data points:
[0059]
[0060] Set minimum distance threshold Filter and retain those that meet the requirements Data points, eliminating duplicate and overly close points;
[0061] Check if the outline is closed. If the first and last points do not coincide, add a closing point to ensure that the outline forms a closed curve.
[0062] In this embodiment, the corner detection includes: for each internal data point, calculating the direction angles of the two line segments formed by the point, the preceding data point, and the following data point, and calculating the change between the two direction angles; normalizing the change in direction angles to a preset range, and marking the corresponding data point as a corner point when the change is greater than a preset corner detection threshold; simultaneously performing the same direction angle change calculation on the first and last connection points to handle the periodic boundaries of the closed contour. Specifically, corner detection includes:
[0063] For each internal data point Calculate the direction angles of the adjacent line segments before and after it:
[0064]
[0065]
[0066] Calculate the change in orientation angle and normalize it to... Interval:
[0067]
[0068] Set corner detection threshold ,when At that time, the point Mark as corner point;
[0069] Perform the same angle change detection on the connection points at the beginning and end to handle the periodic boundary conditions of the closed contour;
[0070] Record the set of all detected corner indexes .
[0071] Figure 2 The results of corner detection on raw contour data without interpolation are shown. The contour is composed of multiple discrete data points. By calculating the change in the direction angle of the adjacent line segments before and after each data point, corners are identified at positions where the change in direction angle exceeds a preset corner detection threshold. The corners correspond to geometric corners in the contour.
[0072] In this embodiment, the arc length parameterization process includes: calculating the cumulative arc length of each data point based on the distance between adjacent data points, and constructing an arc length sequence; when there are adjacent data points in the arc length sequence that do not satisfy strict monotonically increasing, subsequent arc length values are corrected by superimposing a preset small positive number to obtain a strictly monotonically increasing arc length sequence, and the arc length position corresponding to each corner point is determined accordingly. Specifically,
[0073] Calculate the cumulative arc length of the original data points:
[0074]
[0075] To ensure that the arc length sequence is strictly monotonically increasing, for any In this case, add a small increment. ( (for extremely small positive numbers)
[0076] Calculate the total arc length And obtain the arc length position corresponding to each corner point. .
[0077] In this embodiment, the calculation of sampling weights based on the arc length position of corner points includes: performing dense and uniform sampling on the contour to obtain a dense arc length sequence; for each sampling segment, calculating the arc length distance from the midpoint of the sampling segment to the nearest corner point, and selecting the minimum distance according to the circular distance under the condition of a closed contour; and determining the weight of the corresponding sampling segment based on the arc length distance using a preset weight function. Specifically,
[0078] Set the number of basic conductors and corner encryption multiplier ;
[0079] Calculate the radius of influence of the corner point:
[0080]
[0081] Perform dense and uniform sampling on the contour Dense arc length sequence is obtained ;
[0082] For each densely sampled segment, calculate the distance from its midpoint to the nearest corner point (considering the annular distance of the closed contour).
[0083]
[0084] Segment weights are calculated based on corner distances, using a Gaussian weight distribution (preset weight function):
[0085] when
[0086] when
[0087] Figure 3 The results of sampling weight distribution based on the arc length position of the corner point are shown, where larger weight values correspond to the region near the corner point and smaller weight values correspond to the region far from the corner point, thus forming a non-uniformly distributed weighted sampling structure in the arc length space.
[0088] In this embodiment, the adaptive sampling point generation includes: generating target sampling points in a weighted arc length space, and mapping the target sampling points to the original arc length space through interpolation; performing corner constraint processing on the mapped sampling point sequence, and when the arc length distance between any corner point and the nearest sampling point is greater than a preset threshold, adjusting the nearest sampling point to the corresponding corner point position, and sorting the sampling points according to arc length. Specifically,
[0089] Calculate the weighted arc length increment and cumulative weighted arc length, and generate in the weighted arc length space. One target sampling point;
[0090]
[0091]
[0092] By interpolating, the target sampling points are mapped back to the actual arc length space, resulting in an adaptive sampling arc length sequence. ;
[0093] Forced corner constraint: For each corner point, check the distance to the nearest sampling point; if it exceeds the allowable threshold... If so, then move the sampling point to the corner position;
[0094] Reorder the sampling points according to arc length.
[0095] Figure 4 The distribution of sampling points obtained using a uniform arc length sampling method is shown, where the sampling points are arranged at equal intervals along the contour of the vacuum chamber according to the arc length, and the sampling density of each region remains consistent.
[0096] Figure 5 The diagram illustrates the distribution of sampling points after adaptive sampling using the method of this invention. The sampling points are adjusted based on the weights calculated according to the arc length of the corner points, so that the sampling points are more densely distributed in the vicinity of the corner points and relatively evenly distributed in other areas. Each sampling point is determined by the mapping relationship between the weighted arc length and the actual arc length.
[0097] Among them Figure 4 In the uniform arc length sampling method shown, the sampling points are distributed at equal intervals according to the arc length, without distinguishing and processing regions with geometric feature changes in the contour; Figure 5 In the adaptive sampling method shown, the sampling point distribution is adjusted based on the arc length position of the corner point, forming a higher sampling density in the area near the corner point, and the sampling point is made consistent with the corner point position through corner point constraints, so that the sampling point distribution corresponds to the contour geometric features.
[0098] In this embodiment, the conductor unit construction includes: determining the tilt angle and length of the connecting line segment based on adjacent sampling points, and calculating the absolute value of the tilt angle relative to the horizontal direction; when the absolute value is less than a preset angle threshold, determining the radial dimension and tilt angle using a conductor parameter representation method based on the horizontal projection of the line segment; when the absolute value is greater than or equal to the angle threshold, determining the vertical dimension and tilt angle using a conductor parameter representation method based on the vertical projection of the line segment. Specifically,
[0099] For each pair of adjacent sampling points Construct conductor units and adaptively select different parallelogram representations based on the tilt angle of the connecting line segments.
[0100] Calculate the angle of inclination of the line segment:
[0101]
[0102] Calculate the length of the line segment:
[0103]
[0104] Calculate the absolute angle relative to the horizontal direction:
[0105]
[0106] when When the angle is less than the threshold angle (near horizontal segment), the first parallelogram representation method is used. In this case:
[0107] Conductor center: , ;
[0108] Radial dimension: (Horizontal projection of the segment length);
[0109] Vertical dimension: (Vacuum chamber wall thickness);
[0110] Tilt angle: (Spend), .
[0111] when When d is greater than or equal to the preset angle threshold (nearly perpendicular segment), the second parallelogram representation method is used:
[0112] The conductor center calculation is the same as above;
[0113] Radial dimension: (Vacuum chamber wall thickness);
[0114] Vertical dimension: (Vertical projection of the segment length);
[0115] Tilt angle: , (Spend).
[0116] Finally, the geometric parameters of all conductor units are organized into a standard vacuum chamber data matrix with dimensions of [dimension number missing]. The matrix, with each column representing a conductor unit, has 6 rows: coordinate, coordinate, , , , .
[0117] exist Figure 2-5 middle, Figure 2The outline of the medium vacuum chamber is represented by a light blue broken line, and the corner points are represented by solid red dots. Figure 3 The weights of the mid-sampling segments are represented by cyan bars, and the corresponding positions of the corner points are represented by red vertical dashed lines; Figure 4 The outline of the medium vacuum chamber is represented by a light blue broken line, and uniform sampling points are represented by red solid dots. Figure 5 The outline of the medium vacuum chamber is represented by a light blue broken line, adaptive sampling points are represented by solid green dots, and corner points are marked with hollow red squares. It should be noted that the above colors are only used to help distinguish different elements; the identification of each element is based on its shape and positional relationship.
[0118] Compared with existing technologies, this invention achieves fully automated modeling of vacuum chambers, significantly improving modeling efficiency. By establishing a complete automated modeling process, from data preprocessing, corner detection, adaptive sampling to conductor construction, no manual intervention is required, resulting in a significant improvement in modeling efficiency. By employing a dual-representation adaptive switching mechanism, the appropriate parallelogram representation is automatically selected based on the line segment tilt angle, avoiding the division-by-zero problem in near-horizontal segments and achieving stable modeling of segments at any angle. Through corner detection before interpolation and an adaptive densification strategy based on corner distance, the sampling density is automatically increased near corners, ensuring that key geometric features are accurately captured. A Gaussian weight distribution is used to achieve a smooth transition from the densified region to the normal density region, avoiding abrupt changes in the sampling point distribution. A data preprocessing module is added to automatically detect and eliminate duplicate and overly close points, ensuring that the arc length sequence is strictly monotonically increasing. This method can stably process vacuum chamber contour data from various sources, including CAD exported data and measured data, improving the robustness and engineering applicability of the method. Furthermore, this method is not only applicable to traditional D-type vacuum chamber cross-sections, but can also be directly applied to modeling vacuum chamber cross-sections of arbitrary shapes such as rectangles and polygons, without modifying the core algorithm, only requiring adjustment of the data input method.
[0119] like Figure 6 As shown, this embodiment performs conductor modeling for a type D vacuum chamber of a tokamak device, and its main parameters are:
[0120] Large radius R0 = 2.88 m
[0121] Small radius a = 0.86 m
[0122] Wall thickness width = 0.018 m
[0123] The modeling process includes the following steps:
[0124] (1) Data input
[0125] Load the cross-sectional profile data of the vacuum chamber, which contains the coordinates of 101 discrete points, arranged in the order of the profile.
[0126] (2) Data preprocessing
[0127] Calculate the Euclidean distance between adjacent data points, identify and delete two duplicate points to obtain a valid data point sequence; at the same time, perform a closure check on the first and last points to ensure that the contour forms a closed curve.
[0128] (3) Corner detection
[0129] Corner detection is performed based on the change in the direction angle of adjacent line segments. The corner detection threshold θc = 20° is set. The detection result is that no corner is identified, indicating that the D-shaped contour is a smooth curve structure.
[0130] (4) Arc length parameterization
[0131] The cumulative arc length was calculated based on the distance between adjacent points, resulting in a total arc length L = 16.89 m, and a monotonically increasing arc length sequence was constructed.
[0132] (5) Adaptive weight calculation and sampling
[0133] Set the number of basic conductors Nbase = 60, and generate 60 sampling points in the arc length space. Since no corner points are detected, the sampling points are evenly distributed according to the arc length.
[0134] (6) Construction of conductor units
[0135] Conductor units are constructed based on adjacent sampling points, and the conductor representation method is selected according to the tilt angle of each segment, wherein:
[0136] The 41 conductor units are represented using a near-vertical segment representation (AC2).
[0137] The 19 conductor units are represented using a near-horizontal segment (AC) notation.
[0138] (7) Output of results
[0139] The geometric parameters of the conductor unit are organized into a 6×60-dimensional data matrix.
[0140] like Figure 7 As shown, this embodiment also models a non-D-type vacuum chamber with a stepped structure, and its main parameters are:
[0141] Large radius R0 = 1.90 m
[0142] Wall thickness width = 0.012 m
[0143] The modeling process includes the following steps:
[0144] (1) Data input
[0145] Load the vacuum chamber profile data, which contains 120 discrete points and the profile includes multiple right-angle corners.
[0146] (2) Data preprocessing
[0147] Calculate the distance between adjacent points and delete 8 duplicate points, retain 102 valid data points, and complete the closure process.
[0148] (3) Corner detection
[0149] Detection was performed based on changes in orientation angle. A threshold of θc = 20° was set, and a total of 14 corner points were detected, corresponding to the positions of right-angled structures in the contour, such as... Figure 1 As shown.
[0150] (4) Arc length parameterization
[0151] The cumulative arc length was calculated, and the total arc length L = 8.93 m was obtained. The arc length parameter space was then established.
[0152] (5) Adaptive weight calculation
[0153] Set the base conductor quantity Nbase = 60 and the encryption factor γ = 10;
[0154] Based on the arc distance from each sampling segment to the corner point, the weight distribution is calculated, forming a dense sampling region near the corner point, such as... Figure 2 As shown.
[0155] (6) Adaptive sampling
[0156] Sixty sampling points are generated in the weighted arc length space and mapped to the actual contour;
[0157] Apply corner constraints to the sampling points to align them with the corner points, such as... Figure 4 As shown.
[0158] (7) Construction of conductor unit
[0159] The conductor representation method is selected based on the geometric characteristics of the vacuum chamber:
[0160] Horizontal segments are represented using the AC notation.
[0161] Vertical segments are represented using the AC2 notation.
[0162] Different representation methods are switched using tilt angle thresholds.
[0163] (8) Output of results
[0164] Generate a 6×60 dimensional conductor data matrix.
[0165] It can be seen that in the D-type vacuum chamber profile, since the profile is a continuous smooth curve and no corner points are detected, the adaptive sampling results are basically consistent with the uniform arc length sampling results, and the generated conductor units can cover the complete profile structure.
[0166] In a non-D-shaped vacuum chamber profile, since the profile contains multiple right-angle corners, when uniform arc length sampling is used, the sampling points are sparsely distributed in the corner area, and the corner position is approximately represented by adjacent sampling points. When using the method of the present invention, the sampling points are more concentrated in the area near the corner by corner detection and adaptive sampling based on the arc length distance of the corner, and the sampling points are aligned with the corner position by corner constraint.
[0167] Meanwhile, during the construction of the conductor unit, different geometric parameter representations are used for line segments with different tilt angles to match the construction process of the conductor unit with the local geometric direction of the contour.
[0168] In summary, the method of this invention can complete discrete modeling of conductors under different types of vacuum chamber contours. For complex contours containing corners, the distribution of sampling points and the construction method of conductor units are consistent with the contour features.
[0169] Example 2
[0170] An adaptive modeling system for conductors in a tokamak vacuum chamber, used to implement the adaptive modeling method for conductors in a tokamak vacuum chamber of Example 1, is characterized by comprising:
[0171] The data acquisition and preprocessing module is used to acquire the discrete contour data point coordinate sequence of the tokamak vacuum chamber cross section, calculate the distance between adjacent data points, filter out duplicate points or data points with a distance less than the preset minimum distance threshold according to the preset minimum distance threshold, and perform closure processing on the contour data.
[0172] The corner detection module is used to calculate the change in direction angle based on the direction angle of adjacent line segments without interpolation, determine the set of corner points according to the preset corner detection threshold, and record the arc length position of the corresponding corner points.
[0173] The arc length parameterization module is used to calculate the cumulative arc length based on the distance between adjacent data points, construct the arc length sequence, and correct the arc length sequence when it does not meet the monotonically increasing condition, so as to obtain a monotonically increasing arc length sequence.
[0174] The weight calculation module is used to calculate the arc distance from the midpoint of each sampling segment to the nearest corner point based on the arc length position of the corner point, and determine the sampling weight according to the arc distance through a preset weight function;
[0175] An adaptive sampling module is used to generate target sampling points based on the sampling weights, map the target sampling points onto the original contour to obtain an adaptive sampling point sequence, and perform corner constraint processing and sorting on the sampling points;
[0176] The coordinate calculation module is used to calculate the coordinates of each sampling point based on the adaptive sampling point sequence using piecewise linear interpolation;
[0177] The conductor modeling module is used to construct conductor units based on adjacent sampling points, and selects between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points to determine the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit.
[0178] The data output module is used to organize the geometric parameters of each conductor unit into a conductor data matrix and output it for electromagnetic simulation calculations.
[0179] In the specific implementation, the data acquisition and preprocessing module, corner detection module, arc length parameterization module, weight calculation module, adaptive sampling module, coordinate calculation module, conductor modeling module, and data output module are connected sequentially according to the data processing flow. The output result of the previous module is used as the input data of the next module, and data is transmitted between the modules through a data interface.
[0180] Specifically, the data acquisition and preprocessing module outputs preprocessed contour data to the corner detection module; the corner detection module outputs a set of corner points and their corresponding arc length positions to the arc length parameterization module and the weight calculation module; the arc length parameterization module outputs an arc length sequence to the weight calculation module and the adaptive sampling module; the weight calculation module outputs sampling weights to the adaptive sampling module; the adaptive sampling module outputs an adaptive sampling point sequence to the coordinate calculation module; the coordinate calculation module outputs the sampling point coordinates to the conductor modeling module; and the conductor modeling module outputs the conductor unit geometric parameters to the data output module.
[0181] Example 3
[0182] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the adaptive modeling method for conductors of a tokamak vacuum chamber as described in Example 1.
[0183] Example 4
[0184] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the adaptive modeling method for conductors in a tokamak vacuum chamber as described in Example 1.
[0185] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0186] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0187] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0188] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0189] Those skilled in the art will understand that all or part of the steps in the above facts and methods can be implemented by a program instructing related hardware. The program or the program described therein can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: at this time, the corresponding method steps are introduced. The storage medium can be ROM / RAM, magnetic disk, optical disk, etc.
[0190] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of adaptive modeling of a tokamak vacuum chamber conductor, characterized in that, include: Obtain the discrete contour data point coordinate sequence of the cross section of the tokamak vacuum chamber, preprocess the discrete contour data, filter out duplicate points or data points with a distance less than a preset threshold based on the distance between adjacent data points, and perform contour closure processing. Based on the preprocessed discrete contour data, without interpolation, corner point detection is performed by calculating the change in the direction angle of adjacent line segments, the set of corner points is determined and the corresponding arc length position is recorded. The discrete contour data is processed by arc length parameterization to obtain a monotonically increasing arc length sequence, and the arc length parameters corresponding to each corner point are obtained. Based on the arc length position of the corner point, the arc length distance from each sampling segment to the nearest corner point is calculated, and the weight of each sampling segment is determined according to the arc length distance to generate a weighted arc length distribution for sampling; Target sampling points are generated based on the weighted arc length distribution, and the target sampling points are mapped onto the original contour through interpolation to obtain an adaptive sampling point sequence. Corner point constraints are then applied to the sampling points. Based on the adaptive sampling point sequence, piecewise linear interpolation is used to determine the coordinates of each sampling point; Conductor units are constructed based on adjacent sampling points, and the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit are determined by selecting between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points. Organize the geometric parameters of all conductor elements into a conductor data matrix for electromagnetic simulation and output it.
2. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The preprocessing of discrete contour data includes: calculating the Euclidean distance between adjacent data points, and filtering out duplicate points or data points with a distance less than the minimum distance threshold based on a preset minimum distance threshold; performing closure detection on the filtered data point sequence, and copying the first point to the end of the sequence to form a closed contour when the first and last data points do not overlap.
3. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The corner detection includes: for each internal data point, calculating the direction angle of the two line segments formed by it, the previous data point, and the next data point, and calculating the change between the two direction angles; normalizing the change in direction angle to a preset range, and marking the corresponding data point as a corner point when the change is greater than a preset corner detection threshold; and performing the same direction angle change calculation on the first and last connection points to handle the periodic boundary of the closed contour.
4. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The arc length parameterization process includes: calculating the cumulative arc length of each data point based on the distance between adjacent data points, and constructing an arc length sequence; when there are adjacent data points in the arc length sequence that do not satisfy strict monotonically increasing, the subsequent arc length values are corrected by superimposing a preset small positive number to obtain a strictly monotonically increasing arc length sequence, and the arc length position corresponding to each corner point is determined accordingly.
5. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The calculation of sampling weights based on the arc length position of corner points includes: performing dense and uniform sampling on the contour to obtain a dense arc length sequence; for each sampling segment, calculating the arc length distance from the midpoint of the sampling segment to the nearest corner point, and selecting the minimum distance according to the ring distance under the condition of a closed contour; and determining the weight of the corresponding sampling segment based on the arc length distance through a preset weight function.
6. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The conductor unit construction includes: determining the tilt angle and length of the connecting line segment based on adjacent sampling points, and calculating the absolute value of the tilt angle relative to the horizontal direction; when the absolute value is less than a preset angle threshold, determining the radial dimension and tilt angle using a conductor parameter representation method based on the horizontal projection of the line segment; when the absolute value is greater than or equal to the angle threshold, determining the vertical dimension and tilt angle using a conductor parameter representation method based on the vertical projection of the line segment.
7. The adaptive modeling method for conductors in a tokamak vacuum chamber according to claim 1, characterized in that, The adaptive sampling point generation includes: generating target sampling points in a weighted arc length space, and mapping the target sampling points to the original arc length space through interpolation; performing corner constraint processing on the mapped sampling point sequence; when the arc length distance between any corner point and the nearest sampling point is greater than a preset threshold, adjusting the nearest sampling point to the corresponding corner point position, and sorting the sampling points according to the arc length.
8. A tokamak vacuum chamber conductor adaptive modeling system, used to implement the tokamak vacuum chamber conductor adaptive modeling method according to claims 1-7, characterized in that, include: The data acquisition and preprocessing module is used to acquire the discrete contour data point coordinate sequence of the tokamak vacuum chamber cross section, calculate the distance between adjacent data points, filter out duplicate points or data points with a distance less than the preset minimum distance threshold according to the preset minimum distance threshold, and perform closure processing on the contour data. The corner detection module is used to calculate the change in direction angle based on the direction angle of adjacent line segments without interpolation, determine the set of corner points according to the preset corner detection threshold, and record the arc length position of the corresponding corner points. The arc length parameterization module is used to calculate the cumulative arc length based on the distance between adjacent data points, construct the arc length sequence, and correct the arc length sequence when it does not meet the monotonically increasing condition, so as to obtain a monotonically increasing arc length sequence. The weight calculation module is used to calculate the arc distance from the midpoint of each sampling segment to the nearest corner point based on the arc length position of the corner point, and determine the sampling weight according to the arc distance through a preset weight function; An adaptive sampling module is used to generate target sampling points based on the sampling weights, map the target sampling points onto the original contour to obtain an adaptive sampling point sequence, and perform corner constraint processing and sorting on the sampling points; The coordinate calculation module is used to calculate the coordinates of each sampling point based on the adaptive sampling point sequence using piecewise linear interpolation; The conductor modeling module is used to construct conductor units based on adjacent sampling points, and selects between at least two parallelogram conductor geometric parameter representation methods according to the tilt angle of the line connecting adjacent sampling points to determine the center coordinates, radial dimension, vertical dimension and tilt angle of the conductor unit. The data output module is used to organize the geometric parameters of each conductor unit into a conductor data matrix and output it for electromagnetic simulation calculations.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the adaptive modeling method for conductors of a tokamak vacuum chamber as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the adaptive modeling method for conductors in a tokamak vacuum chamber as described in any one of claims 1 to 7.