whding123 commited on
Commit
b946c68
·
verified ·
1 Parent(s): 6b2b187

angioflow_fix_batch2: UPF_P0277.00_ID1_cut1

Browse files
Files changed (30) hide show
  1. .gitattributes +7 -0
  2. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/branch_ranking.npy +3 -0
  3. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/branch_ranking_fallback.npy +3 -0
  4. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_centerline.npy +3 -0
  5. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction.ply +3 -0
  6. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction_fallback.ply +3 -0
  7. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/dome.ply +3 -0
  8. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/dome_sac.ply +0 -0
  9. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/done.txt +1 -0
  10. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/endpoints_manual.npy +3 -0
  11. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/forward_fusion_info.npz +3 -0
  12. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/forward_fusion_info_fallback.npz +3 -0
  13. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/fusion_info_extruded.npz +3 -0
  14. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/geomagic_processed.obj +0 -0
  15. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/ghd_surface.vtp +0 -0
  16. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/inlet_centroids.csv +0 -0
  17. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/jnl_transient +24 -0
  18. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_centerline.npy +3 -0
  19. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_reconstruction.ply +3 -0
  20. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_reconstruction_remeshed.obj +0 -0
  21. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.msh +3 -0
  22. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.vtu +3 -0
  23. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh_params.json +17 -0
  24. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/parabolic_vinlet_udf_full.c +200 -0
  25. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/preprocess_log.txt +88 -0
  26. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reconstruction.ply +3 -0
  27. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reg_mesh.obj +0 -0
  28. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reg_mesh_regularization.json +122 -0
  29. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/remesh_info.json +12 -0
  30. angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/udf_waveform_5cycles.txt +0 -0
.gitattributes CHANGED
@@ -303,3 +303,10 @@ angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/merged_reconstruction.ply filter=lfs
303
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/mesh.msh filter=lfs diff=lfs merge=lfs -text
304
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/mesh.vtu filter=lfs diff=lfs merge=lfs -text
305
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/reconstruction.ply filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
303
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/mesh.msh filter=lfs diff=lfs merge=lfs -text
304
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/mesh.vtu filter=lfs diff=lfs merge=lfs -text
305
  angioflow_fix_batch2/UPF_P0272.00_ID1_cut1/reconstruction.ply filter=lfs diff=lfs merge=lfs -text
306
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction.ply filter=lfs diff=lfs merge=lfs -text
307
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction_fallback.ply filter=lfs diff=lfs merge=lfs -text
308
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/dome.ply filter=lfs diff=lfs merge=lfs -text
309
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_reconstruction.ply filter=lfs diff=lfs merge=lfs -text
310
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.msh filter=lfs diff=lfs merge=lfs -text
311
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.vtu filter=lfs diff=lfs merge=lfs -text
312
+ angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reconstruction.ply filter=lfs diff=lfs merge=lfs -text
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/branch_ranking.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28d4b63fdadd72ed19f8fad1638746569959d59ee50d3e10d67810fced9dc78f
3
+ size 136
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/branch_ranking_fallback.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28d4b63fdadd72ed19f8fad1638746569959d59ee50d3e10d67810fced9dc78f
3
+ size 136
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_centerline.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa1eecc97446fb0c1240ec3ce353f49fde4ddcf6c1f40b95d5e97f744ab6652d
3
+ size 22493
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9792797464076f5d23f7b09fabd3c533e1977242f447b0ab2aa8a2b2270a6b31
3
+ size 367789
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/clipped_reconstruction_fallback.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76d85ea85fd917ea8485735ad1cc85baa3dcd862dee8b0fd4c635e901c056b29
3
+ size 382466
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/dome.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8432d1d77301a4a76b43e0970df33d287613bec7d6a0a71a132b95a6422c81ee
3
+ size 354160
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/dome_sac.ply ADDED
Binary file (73.6 kB). View file
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/done.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ done
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/endpoints_manual.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:804ea7a55f14c19d1cb45bf8cb1d3faa6a1fd6f4b1faeca9ee8d6c9eb94d1d4d
3
+ size 612
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/forward_fusion_info.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f5ec5c4632d4a251239542850c69e46d9125af76435704a1e1d36ec42f979a
3
+ size 7014
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/forward_fusion_info_fallback.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:768f7f29572951884231296f9f7711c6f571c024a5ae6ee5858508d1584f5e80
3
+ size 29804
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/fusion_info_extruded.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f1850e1db20e63c6ca48e3614fa66eb46ba3931f74164872b533bcd6254822f
3
+ size 7158
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/geomagic_processed.obj ADDED
The diff for this file is too large to render. See raw diff
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/ghd_surface.vtp ADDED
The diff for this file is too large to render. See raw diff
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/inlet_centroids.csv ADDED
The diff for this file is too large to render. See raw diff
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/jnl_transient ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /file/read-case mesh.msh
2
+ /mesh/scale 0.001 0.001 0.001
3
+ /define/models/unsteady-2nd-order? yes
4
+ /define/models/viscous/laminar yes
5
+ /define/materials/change-create air blood yes constant 1050 no no yes carreau shear-rate-dependent 3.313 0.3568 0.056 0.00345 no no no yes
6
+ /define/boundary-conditions/zone-type 4 velocity-inlet
7
+ /define/boundary-conditions/zone-type 5 pressure-outlet
8
+ /define/user-defined/use-built-in-compiler? yes
9
+ /define/user-defined/compiled-functions compile libudf yes parabolic_vinlet_udf_full.c "" ""
10
+ /define/user-defined/compiled-functions load libudf
11
+ /define/boundary-conditions/set/velocity-inlet surface4 () vmag yes yes udf inlet_x_velocity_transient::libudf quit
12
+ /solve/set/p-v-coupling 24
13
+ /solve/set/p-v-controls 2000000 0.5 0.5
14
+ /solve/monitors/residual/convergence-criteria 0.0001 0.0001 0.0001 0.0001
15
+ /solve/initialize/compute-defaults velocity-inlet surface4
16
+ /solve/initialize/initialize-flow
17
+ /file/transient-export/ensight-gold-transient ensight_files () * () absolute-pressure dynamic-pressure x-velocity y-velocity z-velocity wall-shear x-wall-shear y-wall-shear z-wall-shear dx-velocity-dx dy-velocity-dy dz-velocity-dz dx-velocity-dy dy-velocity-dx dx-velocity-dz dz-velocity-dx dy-velocity-dz dz-velocity-dy dp-dx dp-dy dp-dz dp-dt viscosity-lam x-coordinate y-coordinate z-coordinate quit no yes export-1 time-step 10 yes
18
+ /file/autosave/data-frequency 10
19
+ /solve/set/time-step 0.001
20
+ /solve/dual-time-iterate 1600 100
21
+ /file/write-case mesh_new.cas yes
22
+ /file/write-data mesh_new.dat yes
23
+ exit
24
+ yes
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_centerline.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f52a92e1bc043989fe5c5334bcf89cbdeb31ec6885728d27a1e118bec00027f2
3
+ size 16001
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_reconstruction.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:413dbd2ee17e4d8b7a8768c8a048833f6dcd3e33451291f0ed1db1c4a6d127b6
3
+ size 345999
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/merged_reconstruction_remeshed.obj ADDED
The diff for this file is too large to render. See raw diff
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.msh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5cec7ec4ace26c9ac6f9811be30b55ca14fa8af8d28e5da02de78f74d4e5d20
3
+ size 234121740
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh.vtu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:356e477956a19d6ed69f3b9bc99d5c5848048d36eab8c449d46591692df388fc
3
+ size 51162787
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/mesh_params.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "preset": "legacy",
3
+ "params": {
4
+ "base_edge": 0.13,
5
+ "ref_volume": 320.0,
6
+ "ref_area": 320.0,
7
+ "vol_exponent": 0.3,
8
+ "area_exponent": 0.5,
9
+ "max_edge": 1.0
10
+ },
11
+ "inflation": true,
12
+ "surface": "ghd_surface.vtp",
13
+ "volume": 25.11591069701418,
14
+ "area": 291.4658378391009,
15
+ "edge": 0.13,
16
+ "n_volume_cells": 3014110
17
+ }
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/parabolic_vinlet_udf_full.c ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ vprofile_transient_parabolic.c
3
+ UDF for specifying steady-state velocity profile boundary condition
4
+
5
+ AUTHOR Wenhao Ding
6
+ DATE 22.03.2024
7
+
8
+ Instruction:
9
+ define VINREF, the maximum velocity at the center
10
+ define FIXED_TIME_STEP and make sure MAX_PCD_SIZE is larger than int(total_time/FIXED_TIME_STEP)
11
+ define filename (txt for the waveform, this txt file must be in the same directory as this script)
12
+ */
13
+
14
+ #include "udf.h"
15
+ #include <math.h>
16
+ #include <stdio.h>
17
+
18
+ #define PI 3.14159265358979323846
19
+ #define VINREF 1.3158 /* ref inlet v */
20
+ #define VIN 0 /* ref inlet v */
21
+ #define MAX_PCD_SIZE 400001 /* Least PCD number the waveform file has cannot exceed point number in txt 574578 41160*/
22
+ #define MAX_LOG_SIZE 600
23
+ #define FIXED_TIME_STEP 0.00001 /* Fixed time step during transient simulation*/
24
+ #define MAX_POINTS 6000 /* Maximum point number on the inlet*/
25
+ #define ND_ND 3
26
+ /* static double* Q_array[MAX_PCD_SIZE]; */
27
+
28
+
29
+ typedef struct {
30
+ double x;
31
+ double y;
32
+ double z;
33
+ } Vector3D;
34
+
35
+ double dot_product(Vector3D v1, Vector3D v2) {
36
+ return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z;
37
+ }
38
+
39
+ Vector3D cross_product(Vector3D v1, Vector3D v2) {
40
+ Vector3D cross_v;
41
+
42
+ cross_v.x = v1.y * v2.z - v1.z * v2.y;
43
+ cross_v.y = v1.z * v2.x - v1.x * v2.z;
44
+ cross_v.z = v1.x * v2.y - v1.y * v2.x;
45
+
46
+ return cross_v;
47
+ }
48
+
49
+ double get_norm(Vector3D result) {
50
+ return sqrt(pow(result.x, 2) + pow(result.y, 2) + pow(result.z, 2));
51
+ }
52
+
53
+ double getDegAngle(Vector3D v1, Vector3D v2) {
54
+ Vector3D v_cross = cross_product(v1, v2);
55
+ double radian_angle = atan2(get_norm(v_cross), dot_product(v1, v2));
56
+ if (v_cross.z < 0) {
57
+ radian_angle = 2 * PI - radian_angle;
58
+ }
59
+ return radian_angle;
60
+ }
61
+
62
+
63
+
64
+ DEFINE_PROFILE(inlet_x_velocity_transient, thread, position)
65
+ {
66
+ /*Domain* d;*/
67
+ /*d = Get_Domain(1);*/
68
+ /*Thread* tr = Lookup_Thread(d, 5);*/
69
+ real x[ND_ND]; /* ND_ND=3 for 3D */
70
+ real curr_x, curr_y, curr_z;
71
+ face_t f;
72
+ /* real current_time; */
73
+ FILE* rfile; /* declare a FILE pointer */
74
+ rfile = fopen("udf_waveform_5cycles.txt", "r+");
75
+ double Q_array[MAX_PCD_SIZE];
76
+ int i = 0;
77
+ for (i = 0; i < MAX_PCD_SIZE; i++) {
78
+ fscanf(rfile, "%lf", &Q_array[i]); /* that supposes one value per line */
79
+ }fclose(rfile);
80
+ /* load from csv file */
81
+ double centroids[MAX_POINTS][ND_ND];
82
+ int num_points_inlet = 0;
83
+ FILE* file;
84
+ char line[256];
85
+ file = fopen("inlet_centroids.csv", "r");
86
+ if (file == NULL)
87
+ {
88
+ Message("Error: Cannot open file %s\n", "inlet_centroids.csv");
89
+ return;
90
+ }
91
+ fgets(line, sizeof(line), file);
92
+ num_points_inlet = 0;
93
+ while (fgets(line, sizeof(line), file) && num_points_inlet < MAX_POINTS)
94
+ {
95
+ sscanf(line, "%lf,%lf,%lf", &centroids[num_points_inlet][0], &centroids[num_points_inlet][1], &centroids[num_points_inlet][2]);
96
+ num_points_inlet++;
97
+ }
98
+ fclose(file);
99
+ /* record average coordinates on the inlet (center) */
100
+ double center_x = 0.0, center_y = 0.0, center_z = 0.0;
101
+ for (i = 0; i < num_points_inlet; i++)
102
+ {
103
+ center_x += centroids[i][0];
104
+ center_y += centroids[i][1];
105
+ center_z += centroids[i][2];
106
+ }
107
+
108
+ if (num_points_inlet > 0)
109
+ {
110
+ center_x /= num_points_inlet;
111
+ center_y /= num_points_inlet;
112
+ center_z /= num_points_inlet;
113
+ }
114
+ /*Message("Average centroid coordinates: x=%lf, y=%lf, z=%lf\n", center_x, center_y, center_z);*/
115
+ /* get 12 clock tick */
116
+ double tick_x = 0.0, tick_y = 0.0, tick_z = 0.0;
117
+ double tick_radius = 0.0;
118
+ double tick_radius_record = 0.0;
119
+ for (i = 0; i < num_points_inlet; i++)
120
+ {
121
+ tick_radius = sqrt(pow((centroids[i][0] - center_x), 2) + pow((centroids[i][1] - center_y), 2) + pow((centroids[i][2] - center_z), 2));
122
+ if (tick_radius > tick_radius_record) {
123
+ tick_x = x[0];
124
+ tick_y = x[1];
125
+ tick_z = x[2];
126
+ }
127
+ tick_radius_record = tick_radius;
128
+ }
129
+
130
+ /* start spinning and record maximum radius for every sector */
131
+ int num_sector = 30;
132
+ double angle = 0.0;
133
+ int id_sector = 0;
134
+ double current_radius = 0.0;
135
+ /* tick & tock vector for cross and dot production */
136
+ Vector3D v_tick;
137
+ v_tick.x = tick_x - center_x;
138
+ v_tick.y = tick_y - center_y;
139
+ v_tick.z = tick_z - center_z;
140
+ Vector3D v_tock;
141
+ double radius_list[num_sector];
142
+ for (i = 0; i < num_sector; ++i) {
143
+ radius_list[i] = 0.0;
144
+ }
145
+ /* loop and fill radius_list */
146
+ for (i = 0; i < num_points_inlet; i++)
147
+ {
148
+ v_tock.x = centroids[i][0] - center_x;
149
+ v_tock.y = centroids[i][1] - center_y;
150
+ v_tock.z = centroids[i][2] - center_z;
151
+ angle = getDegAngle(v_tick, v_tock);
152
+ id_sector = floor((angle + PI) / (2 * PI / num_sector));
153
+ if (id_sector < 0) {
154
+ id_sector = 0;
155
+ }
156
+ if (id_sector >= num_sector) {
157
+ id_sector = num_sector - 1;
158
+ }
159
+ current_radius = sqrt(pow(v_tock.x, 2) + pow(v_tock.y, 2) + pow(v_tock.z, 2));
160
+ if (current_radius > radius_list[id_sector]) {
161
+ radius_list[id_sector] = current_radius;
162
+ }
163
+ }
164
+
165
+ /* clean radius list and check (sometimes there are no nodes in the sector) */
166
+ for (i = 0; i < num_sector; ++i) {
167
+ if (radius_list[i] == 0.0) {
168
+ radius_list[i] = tick_radius_record;
169
+ }
170
+ }
171
+
172
+ /* assign parabolic profile */
173
+ begin_f_loop(f, thread)
174
+ {
175
+ F_CENTROID(x, f, thread);
176
+ /* current_time = CURRENT_TIME */
177
+ int current_time_id = (int)floor(CURRENT_TIME / FIXED_TIME_STEP);
178
+ double current_Q_ratio = Q_array[current_time_id];
179
+ curr_x = x[0]; /* x[0] is x coordinate */
180
+ curr_y = x[1]; /* x[1] is y coordinate */
181
+ curr_z = x[2]; /* x[2] is z coordinate */
182
+
183
+ v_tock.x = x[0] - center_x;
184
+ v_tock.y = x[1] - center_y;
185
+ v_tock.z = x[2] - center_z;
186
+ angle = getDegAngle(v_tick, v_tock);
187
+ id_sector = floor((angle + PI) / (2 * PI / num_sector));
188
+ if (id_sector < 0) {
189
+ id_sector = 0;
190
+ }
191
+ if (id_sector >= num_sector) {
192
+ id_sector = num_sector - 1;
193
+ }
194
+ current_radius = radius_list[id_sector];
195
+
196
+ /* write inlet velocity profile - need to centre the x,y,z coords and divide by Rref^2 */
197
+ F_PROFILE(f, thread, position) = current_Q_ratio * VINREF * (1 + VIN) * (1 - (pow((curr_x - center_x), 2) + pow((curr_y - center_y), 2) + pow((curr_z - center_z), 2)) / (current_radius * current_radius));
198
+ }
199
+ end_f_loop(f, thread)
200
+ }
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/preprocess_log.txt ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ============================================================
3
+ Session started: 2026-04-22 11:18:35
4
+ ============================================================
5
+
6
+ ════════════════════════════════════════════════════════════
7
+ Processing: UPF_P0277.00_ID1_cut1
8
+ ════════════════════════════════════════════════════════════
9
+
10
+ ── Step 1: Centerline extraction ──
11
+ Reading PLY surface file.
12
+ Cleaning surface.
13
+ Triangulating surface.
14
+ Computing centerlines.
15
+ Computing centerlines...
16
+ Centerlines [accept / redo / skip] (default=accept):
17
+ ── Step 2: Vessel clipping ──
18
+
19
+ Current cut distances (how far from aneurysm to cut each branch):
20
+ Branch 0 (downstream): 4.0 mm (branch total: 62.2 mm)
21
+ Branch 1 (downstream): 4.0 mm (branch total: 13.1 mm)
22
+ Accept these cut distances? (Y/n): Dome protection: dome_sac.ply, 1854 vertices protected (dist < 0.50 mm)
23
+ Clipping: 69496 vertices removed, 1854 dome-protected
24
+
25
+ ────────────────────────────────────────────────────────
26
+ Cut cross-section equivalent diameters (2 openings):
27
+ ────────────────────────────────────────────────────────
28
+ Opening 0: D_eq = 2.894 mm ← outlet (branch 1)
29
+ Opening 1: D_eq = 3.340 mm ← inlet (branch 0)
30
+ ────────────────────────────────────────────────────────
31
+ Suggested extension length: ~4× diameter for single outlet.
32
+ ────────────────────────────────────────────────────────
33
+
34
+ Accept clipping? (Y/n):
35
+ ── Step 3: Vessel extension ──
36
+
37
+ Extension modes:
38
+ centerline = use original centerline only
39
+ straight = straight extension from opening
40
+ centerline+straight = original centerline a mm + straight b mm
41
+
42
+ Branch 0 (upstream, CL=58.1mm) mode [centerline]: centerline part a [2.0mm]: straight part b [2.0mm]: Branch 1 (downstream, CL=9.0mm) mode [centerline]: centerline part a [2.0mm]: straight part b [2.0mm]: Branch 0: centerline+straight, centerline=5.91 mm, straight=5.00 mm
43
+ Branch 1: centerline+straight, centerline=3.90 mm, straight=6.00 mm
44
+ Accept vessel extension? (Y/n): Saved: F:\NUS\labwork\paper3\aneux\PostTr\AneuX\UPF_P0277.00_ID1_cut1\merged_reconstruction.ply
45
+ Saved: branch_ranking.npy → [0, 1]
46
+
47
+ ── Step 4: Fallback clipping (side-wall sac isolation) ──
48
+ Clipping the ORIGINAL reconstruction mesh at the parent vessel.
49
+
50
+ Parent centerline: upstream branch 0 → neck → downstream branch 1
51
+ Upstream arc (neck → inlet): 62.2 mm
52
+ Downstream arc (neck → outlet): 13.1 mm
53
+
54
+ Keep upstream (toward inlet) [6.0 mm]: Keep downstream (toward outlet) [6.0 mm]: Single centerline: 757 pts, neck at index 624, upstream=0, downstream=1
55
+ Upstream cut: index 563, arc from neck = 6.1 mm
56
+ Downstream cut: index 685, arc from neck = 6.1 mm
57
+ Dome protection: dome_sac.ply, 1854 vertices protected (dist < 0.50 mm)
58
+ After scalar clip: 15422 vertices
59
+ Kept component 0 (closest to centroid), removed 1 disconnected parts
60
+ Saved fallback-clipped mesh → F:\NUS\labwork\paper3\aneux\PostTr\AneuX\UPF_P0277.00_ID1_cut1\clipped_reconstruction_fallback.ply
61
+ Accept fallback clipping? (Y/n):
62
+ Fallback clipping rejected.
63
+ Choose next action:
64
+ 1 = re-try Step 4 with different keep lengths
65
+ 2 = go back to Step 3 (re-do extension)
66
+ Action [1/2, default=1]:
67
+ Parent centerline: upstream branch 0 → neck → downstream branch 1
68
+ Upstream arc (neck → inlet): 62.2 mm
69
+ Downstream arc (neck → outlet): 13.1 mm
70
+
71
+ Keep upstream (toward inlet) [6.0 mm]: Keep downstream (toward outlet) [6.0 mm]: Single centerline: 757 pts, neck at index 624, upstream=0, downstream=1
72
+ Upstream cut: index 583, arc from neck = 4.1 mm
73
+ Downstream cut: index 665, arc from neck = 4.1 mm
74
+ Dome protection: dome_sac.ply, 1854 vertices protected (dist < 0.50 mm)
75
+ After scalar clip: 11337 vertices
76
+ Kept component 0 (closest to centroid), removed 2 disconnected parts
77
+ Saved fallback-clipped mesh → F:\NUS\labwork\paper3\aneux\PostTr\AneuX\UPF_P0277.00_ID1_cut1\clipped_reconstruction_fallback.ply
78
+ Accept fallback clipping? (Y/n): Fallback clipping accepted → clipped_reconstruction_fallback.ply
79
+ Saved: forward_fusion_info_fallback.npz (2 branches)
80
+ Saved: branch_ranking_fallback.npy → [0, 1]
81
+
82
+ ── Step 5: Final review ──
83
+ Accept final mesh? (Y/n): Accept final mesh? (Y/n):
84
+ Branch ordering (2 branches):
85
+ Branch 0 = inlet (upstream)
86
+ Branch 1 = outlet
87
+ (Inlet = endpoint 0 from registration, auto-detected as upstream)
88
+ ✓ UPF_P0277.00_ID1_cut1 complete.
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reconstruction.ply ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b431ed862724b49c0b048f0918a42961b49de3ec2435053f891db0c202c9655
3
+ size 3885210
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reg_mesh.obj ADDED
The diff for this file is too large to render. See raw diff
 
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/reg_mesh_regularization.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "input": "/media/yaplab2/wd8tb/wenhao/angioflow/cfd/angioflow_fix/UPF_P0277.00_ID1_cut1/merged_reconstruction_remeshed.obj",
3
+ "tolerance": 0.25,
4
+ "mode": "millimetre",
5
+ "dome_sac_mm": null,
6
+ "stopping": null,
7
+ "snap_levels": null,
8
+ "assessment": {
9
+ "needs_regularization": true,
10
+ "worst_target_excess_sd": 1.0894317379190415,
11
+ "tolerance_sd": 0.25,
12
+ "signed_excess_sd": {
13
+ "0.3": 1.0894317379190415,
14
+ "0.5": -0.9752637942223337,
15
+ "0.8": -1.5629855537504942,
16
+ "1.0": -1.4290091128005769,
17
+ "1.2": -1.2392302441729637,
18
+ "1.6": -0.9633708910385598
19
+ },
20
+ "verdict": "rougher_than_reference",
21
+ "guard_scale": 1.6,
22
+ "guard_below_band": 1.0334388527014824,
23
+ "target_scales": [
24
+ 0.3,
25
+ 0.5,
26
+ 0.8,
27
+ 1.0,
28
+ 1.2
29
+ ],
30
+ "measured_at_edge": 0.13194732076851365,
31
+ "edge_after_measurement_remesh": 0.11000302956631224,
32
+ "remesher": "auto",
33
+ "n_seeds": 4000,
34
+ "elapsed_s": 165.47
35
+ },
36
+ "forward": {
37
+ "status": "overshoot_limited",
38
+ "converged": false,
39
+ "guard_scale_below_reference_at_input": true,
40
+ "smoother": "mcf",
41
+ "remesher": "auto",
42
+ "sigma_step_mm": 0.08,
43
+ "tolerance_sd": 0.25,
44
+ "time_budget_s": null,
45
+ "overshoot_limit_sd": -1.0,
46
+ "guard_tolerance_sd": 1.0,
47
+ "target_scales": [
48
+ 0.3,
49
+ 0.5,
50
+ 0.8,
51
+ 1.0,
52
+ 1.2
53
+ ],
54
+ "guard_scale": 1.6,
55
+ "rounds": 0,
56
+ "total_sigma_mm": 0.0,
57
+ "target_edge": 0.13194732076851365,
58
+ "export_edge": null,
59
+ "metrics_measured_at_edge": 0.13194732076851365,
60
+ "n_vertices_in": 20846,
61
+ "n_vertices_out": 28428,
62
+ "n_seeds_used": 4000,
63
+ "elapsed_s": 193.43,
64
+ "edge_out": 0.11000302956631224,
65
+ "quality_out": 0.98297565784025,
66
+ "smoothing_displacement_mm": 0.0,
67
+ "surface_deviation_vs_original_max_mm": 4.7693635827235235e-06,
68
+ "surface_deviation_vs_original_mean_mm": 9.186015303761688e-07,
69
+ "patch_truncation_fraction": {
70
+ "0.3": 0.0,
71
+ "0.5": 0.0,
72
+ "0.8": 0.0,
73
+ "1.0": 0.0,
74
+ "1.2": 0.0,
75
+ "1.6": 0.0
76
+ },
77
+ "signed_excess_before": {
78
+ "0.3": 1.0894317379190415,
79
+ "0.5": -0.9752637942223337,
80
+ "0.8": -1.5629855537504942,
81
+ "1.0": -1.4290091128005769,
82
+ "1.2": -1.2392302441729637,
83
+ "1.6": -0.9633708910385598
84
+ },
85
+ "signed_excess_after": {
86
+ "0.3": 1.0894317379190415,
87
+ "0.5": -0.9752637942223337,
88
+ "0.8": -1.5629855537504942,
89
+ "1.0": -1.4290091128005769,
90
+ "1.2": -1.2392302441729637,
91
+ "1.6": -0.9633708910385598
92
+ },
93
+ "below_band_after": {
94
+ "0.3": 0.0,
95
+ "0.5": 0.47726680266375116,
96
+ "0.8": 1.1385447567317815,
97
+ "1.0": 1.1022178415680706,
98
+ "1.2": 1.0489656637518365,
99
+ "1.6": 1.0334388527014824
100
+ },
101
+ "input_inspection": {
102
+ "n_vertices": 20846,
103
+ "n_faces": 41537,
104
+ "bbox_diagonal": 23.616643161800553,
105
+ "watertight": false,
106
+ "n_components": 1,
107
+ "n_degenerate_faces": 0,
108
+ "edge_mean": 0.12963148696368162,
109
+ "edge_cv": 0.11776580510024089,
110
+ "n_boundary_vertices": 155,
111
+ "warnings": []
112
+ },
113
+ "reference_cases": 315
114
+ },
115
+ "cap_shift_mm": [
116
+ 0.009602338835445113,
117
+ 0.027267772147317654
118
+ ],
119
+ "action": "rejected",
120
+ "surface_used": "/media/yaplab2/wd8tb/wenhao/angioflow/cfd/angioflow_fix/UPF_P0277.00_ID1_cut1/merged_reconstruction_remeshed.obj",
121
+ "reason": "regularized surface not used: no smoothing round completed (regularizer status overshoot_limited)"
122
+ }
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/remesh_info.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source": "merged_reconstruction.ply",
3
+ "method": "mesh_regularizer.remesh(backend='pymeshlab', calibrate=True)",
4
+ "target_edge_mm": 0.132,
5
+ "edge_median_mm": 0.12971342758168639,
6
+ "edge_max_mm": 0.23438854186230854,
7
+ "area_before": 296.82277927410576,
8
+ "area_after": 296.6241512782593,
9
+ "openings": 2,
10
+ "opening_centroid_shift_mm": 0.03794611565132498,
11
+ "made_by": "angioflow/debugging/remesh_aneux_merged.py"
12
+ }
angioflow_fix_batch2/UPF_P0277.00_ID1_cut1/udf_waveform_5cycles.txt ADDED
The diff for this file is too large to render. See raw diff