whding123 commited on
Commit
e3e38ab
·
verified ·
1 Parent(s): 28c3b07

Add sdfgnnRzJL_aneurysm1

Browse files
.gitattributes CHANGED
@@ -7454,3 +7454,10 @@ cfd_data/sAZ6eNswyc_aneurysm1/wall_mesh_registration.pt filter=lfs diff=lfs merg
7454
  cfd_data/sZoUSg9dKz_aneurysm1/blood_data.pt filter=lfs diff=lfs merge=lfs -text
7455
  cfd_data/sZoUSg9dKz_aneurysm1/wall_data.pt filter=lfs diff=lfs merge=lfs -text
7456
  cfd_data/sZoUSg9dKz_aneurysm1/wall_mesh_registration.pt filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
7454
  cfd_data/sZoUSg9dKz_aneurysm1/blood_data.pt filter=lfs diff=lfs merge=lfs -text
7455
  cfd_data/sZoUSg9dKz_aneurysm1/wall_data.pt filter=lfs diff=lfs merge=lfs -text
7456
  cfd_data/sZoUSg9dKz_aneurysm1/wall_mesh_registration.pt filter=lfs diff=lfs merge=lfs -text
7457
+ cfd_data/sdfgnnRzJL_aneurysm1/blood_data.pt filter=lfs diff=lfs merge=lfs -text
7458
+ cfd_data/sdfgnnRzJL_aneurysm1/geomagic_processed.obj filter=lfs diff=lfs merge=lfs -text
7459
+ cfd_data/sdfgnnRzJL_aneurysm1/geomagic_processed_original.obj filter=lfs diff=lfs merge=lfs -text
7460
+ cfd_data/sdfgnnRzJL_aneurysm1/mesh.msh filter=lfs diff=lfs merge=lfs -text
7461
+ cfd_data/sdfgnnRzJL_aneurysm1/mesh.vtu filter=lfs diff=lfs merge=lfs -text
7462
+ cfd_data/sdfgnnRzJL_aneurysm1/wall_data.pt filter=lfs diff=lfs merge=lfs -text
7463
+ cfd_data/sdfgnnRzJL_aneurysm1/wall_mesh_registration.pt filter=lfs diff=lfs merge=lfs -text
cfd_data/sdfgnnRzJL_aneurysm1/blood_data.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bfe5b3af6a9a4e3652dddea9284f3bbeafb12e7c34e2d1732dc7a3b8905c0bf
3
+ size 2298490530
cfd_data/sdfgnnRzJL_aneurysm1/branch_ranking.npy ADDED
Binary file (152 Bytes). View file
 
cfd_data/sdfgnnRzJL_aneurysm1/flowsplit_ratio.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 0.7230910617720062 0.2769089382279938
cfd_data/sdfgnnRzJL_aneurysm1/forward_fusion_info.npz ADDED
Binary file (7.04 kB). View file
 
cfd_data/sdfgnnRzJL_aneurysm1/geomagic_processed.obj ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb17ca8e0334e261aac841b04088c6abfe3d29dd9b6fb2fcdb99defb68c37b95
3
+ size 15986783
cfd_data/sdfgnnRzJL_aneurysm1/geomagic_processed_original.obj ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68df543c9f15df70c2a5c9004c84d24e30dffe7aac8aeae85e9370612149e3c6
3
+ size 17600436
cfd_data/sdfgnnRzJL_aneurysm1/ghd_forward_fusion_info.npz ADDED
Binary file (7.12 kB). View file
 
cfd_data/sdfgnnRzJL_aneurysm1/ghd_fusion_params.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "flaw_opening_min_size": 5,
3
+ "init_step": 1,
4
+ "max_cl_length": null,
5
+ "ring_downsample_ratio": 1,
6
+ "smooth_n_rings": 5,
7
+ "smooth_n_iter": 10,
8
+ "extrude_outlets": true,
9
+ "extrude_inlet": true,
10
+ "min_torsion": true
11
+ }
cfd_data/sdfgnnRzJL_aneurysm1/ghd_merged_reconstruction.obj ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/ghd_reconstructed.obj ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/ghd_smoothed_reconstruction.obj ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/ghd_surface.vtp ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/inlet_centroids.csv ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/jnl_transient ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 outflow
8
+ /define/boundary-conditions/zone-type 6 outflow
9
+ (define in-file (open-input-file "flowsplit_ratio.txt"))
10
+ (define out1 (read in-file))
11
+ (define out2 (read in-file))
12
+ (close-input-port in-file)
13
+
14
+ (define cmd1 (string-append "/define/boundary-conditions/outflow 5 " (number->string out1)))
15
+ (define cmd2 (string-append "/define/boundary-conditions/outflow 6 " (number->string out2)))
16
+
17
+ (ti-menu-load-string cmd1)
18
+ (ti-menu-load-string cmd2)
19
+ /define/user-defined/compiled-functions compile libudf yes parabolic_vinlet_udf_full.c "" ""
20
+ /define/user-defined/compiled-functions load libudf
21
+ /define/boundary-conditions/set/velocity-inlet surface4 () vmag yes yes udf inlet_x_velocity_transient::libudf quit
22
+ /solve/set/p-v-coupling 24
23
+ /solve/set/p-v-controls 2000000 0.5 0.5
24
+ /solve/monitors/residual/convergence-criteria 0.0001 0.0001 0.0001 0.0001
25
+ /solve/initialize/hyb-initialization
26
+ /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
27
+ /file/autosave/data-frequency 1600
28
+ /solve/set/time-step 0.001
29
+ /solve/dual-time-iterate 1600 100
30
+ exit
31
+ yes
cfd_data/sdfgnnRzJL_aneurysm1/mesh.msh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12d161bdbf7f6e685d7c4f51e36747bf15f5ea6727de4eca86dffccecc26c573
3
+ size 168694758
cfd_data/sdfgnnRzJL_aneurysm1/mesh.vtu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d0aa9df5cf57e8b6a5dcfef12a97179f15d8fbd36ffb96ec0382f1ae0e4b724
3
+ size 36899690
cfd_data/sdfgnnRzJL_aneurysm1/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
+ }
cfd_data/sdfgnnRzJL_aneurysm1/udf_waveform_5cycles.txt ADDED
The diff for this file is too large to render. See raw diff
 
cfd_data/sdfgnnRzJL_aneurysm1/wall_data.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7aecc8342355da8b319e9b2c4b7a809863c2ce5e34884f135f86a3a32bc30407
3
+ size 35792206
cfd_data/sdfgnnRzJL_aneurysm1/wall_mesh_registration.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48780cf4abadc41583cdaac242a011e3814814016efe01fdcf5e102473e1eb11
3
+ size 3163689