kanydao commited on
Commit
1ca7ae2
·
verified ·
1 Parent(s): 4cf5aa9

Archive CFD workflow 2026-10-12: _root_files

Browse files
cfd_workflow_20261012/README.md ADDED
@@ -0,0 +1 @@
 
 
1
+ bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002_3
cfd_workflow_20261012/batch_cal_ave_drag.py ADDED
File without changes
cfd_workflow_20261012/batch_cal_ave_drag_simple.py ADDED
File without changes
cfd_workflow_20261012/cal_ave_drag.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import os
3
+
4
+ # path = "gen_meshes_1012_sep_batch_144_base_sim2/test_meshes_dgs0_sts0.75_nis100_nol0_nos30_lr0.0005_F_S_WWC_WM_541"
5
+ path = "test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_15/test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_generated_denorm"
6
+ data = np.loadtxt(os.path.join(path, "postProcessing/car/0/forceCoeffs.dat"), comments="#")
7
+ mask = data[:,0] >= 2000 # 1500
8
+ avg_drag = np.mean(data[mask, 2]) # 根据列号修改
9
+
10
+ with open(os.path.join(path, "avg_drag.txt"), "w") as f:
11
+ f.write(f"{avg_drag}\n")
12
+
13
+ print("Average Drag Coeff:", avg_drag)
cfd_workflow_20261012/cal_ave_drag_batch.py ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import os
3
+ import glob
4
+
5
+ # 可以修改这个路径来处理不同的基础文件夹
6
+ # base_path = "test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all*"
7
+ base_path = "test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all*"
8
+ base_path = "test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1_*"
9
+ base_path = "test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_rebuttal_R*"
10
+ base_path = "triopt_output_*"
11
+
12
+
13
+
14
+
15
+ print(f"正在搜索 {base_path} 下包含2500文件夹的子目录...")
16
+
17
+ # 搜索所有包含2500文件夹的路径
18
+ pattern = os.path.join(base_path, "**/2500")
19
+
20
+ paths_with_2500 = glob.glob(pattern, recursive=True)
21
+
22
+ if not paths_with_2500:
23
+ print("未找到包含2500文件夹的子目录!")
24
+ exit()
25
+
26
+ # 获取包含2500文件夹的父目录
27
+ subdirs = []
28
+ for path_2500 in paths_with_2500:
29
+ parent_dir = os.path.dirname(path_2500)
30
+ subdirs.append(parent_dir)
31
+
32
+ subdirs = sorted(set(subdirs)) # 去重并排序
33
+
34
+ print(f"找到 {len(subdirs)} 个包含2500文件夹的子目录:")
35
+ for subdir in subdirs:
36
+ print(f" - {os.path.relpath(subdir, base_path)}")
37
+
38
+ print("\n开始批量计算...")
39
+
40
+ results = []
41
+
42
+ for i, subdir in enumerate(subdirs, 1):
43
+ subdir_name = os.path.relpath(subdir, base_path)
44
+ print(f"[{i}/{len(subdirs)}] 处理: {subdir_name}")
45
+
46
+ try:
47
+ # 原始代码逻辑,但路径改为动态的subdir
48
+ path = subdir
49
+ data = np.loadtxt(os.path.join(path, "postProcessing/car/0/forceCoeffs.dat"), comments="#")
50
+ mask = data[:,0] >= 2000 # 1500
51
+ avg_drag = np.mean(data[mask, 2]) # 根据列号修改
52
+
53
+ with open(os.path.join(path, "avg_drag.txt"), "w") as f:
54
+ f.write(f"{avg_drag}\n")
55
+
56
+ print(f" ✓ Average Drag Coeff: {avg_drag:.6f}")
57
+ results.append((subdir_name, avg_drag))
58
+
59
+ except Exception as e:
60
+ print(f" ✗ 处理失败: {e}")
61
+
62
+ # 打印所有结果
63
+ print(f"\n{'='*60}")
64
+ print(f"批量计算完成!处理了 {len(results)} 个子目录")
65
+ print(f"{'='*60}")
66
+
67
+ if results:
68
+ print("所有结果:")
69
+ for subdir_name, avg_drag in results:
70
+ print(f" {subdir_name}: {avg_drag:.6f}")
71
+
72
+ # 计算统计信息
73
+ all_drags = [avg_drag for _, avg_drag in results]
74
+ print(f"\n统计信息:")
75
+ print(f" 平均值: {np.mean(all_drags):.6f}")
76
+ print(f" 标准差: {np.std(all_drags):.6f}")
77
+ print(f" 最小值: {np.min(all_drags):.6f}")
78
+ print(f" 最大值: {np.max(all_drags):.6f}")
79
+
80
+ # 保存汇总结果
81
+ summary_path = os.path.join(base_path, "batch_drag_results.txt")
82
+ with open(summary_path, "w") as f:
83
+ f.write("批量阻力系数计算结果\n")
84
+ f.write("="*40 + "\n")
85
+ for subdir_name, avg_drag in results:
86
+ f.write(f"{subdir_name}: {avg_drag:.6f}\n")
87
+ f.write(f"\n统计信息:\n")
88
+ f.write(f"平均值: {np.mean(all_drags):.6f}\n")
89
+ f.write(f"标准差: {np.std(all_drags):.6f}\n")
90
+ f.write(f"最小值: {np.min(all_drags):.6f}\n")
91
+ f.write(f"最大值: {np.max(all_drags):.6f}\n")
92
+
93
+ print(f"\n汇总结果已保存到: {summary_path}")
cfd_workflow_20261012/drag_results_organized.csv ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Shape_ID,Name_1_generated,AvgDrag_1_generated,Name_1_original,AvgDrag_1_original,Name_2_generated,AvgDrag_2_generated,Name_2_original,AvgDrag_2_original,Name_3_generated,AvgDrag_3_generated,Name_3_original,AvgDrag_3_original
2
+ E_S_WWC_WM_005,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_generated_denorm,0.3944345861,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_generated_denorm,0.3112970543,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_original_denorm,0.3680911892,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_generated_denorm,0.3726995816,,
3
+ E_S_WWC_WM_121,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_generated_denorm,0.3501637639,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_generated_denorm,0.2921688151,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_original_denorm,0.3461788710,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_generated_denorm,0.3486945843,,
4
+ E_S_WWC_WM_265,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_generated_denorm,0.3748098060,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_generated_denorm,0.2685194392,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_original_denorm,0.3550341020,,,,
5
+ E_S_WWC_WM_397,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_generated_denorm,0.3564955713,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_generated_denorm,0.3374985599,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_original_denorm,0.3520660052,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_generated_denorm,0.3551618059,,
6
+ E_S_WWC_WM_570,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_generated_denorm,0.2897309892,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_generated_denorm,0.2823997115,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_original_denorm,0.2788280455,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_generated_denorm,0.3118935051,,
7
+ E_S_WW_WM_560,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WW_WM_560_generated_denorm,0.2662407407,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_560_generated_denorm,0.2279030396,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_560_original_denorm,0.2911924801,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WW_WM_560_generated_denorm,0.3279038645,,
8
+ E_S_WW_WM_615,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WW_WM_615_generated_denorm,0.3007156501,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_615_generated_denorm,0.2835059463,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_615_original_denorm,0.3274519544,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_E_S_WW_WM_615_generated_denorm,0.3557366629,,
9
+ F_S_WWC_WM_056,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_generated_denorm,0.3281632989,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_generated_denorm,0.2652589249,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_original_denorm,0.3395129279,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_generated_denorm,0.3294402939,,
10
+ F_S_WWC_WM_087,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_generated_denorm,0.3187833931,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_generated_denorm,0.2615400205,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_original_denorm,0.3090649125,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_generated_denorm,0.3021728338,,
11
+ F_S_WWC_WM_541,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_generated_denorm,0.3127432883,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_generated_denorm,0.2682303621,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_original_denorm,0.3263630646,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_generated_denorm,0.3193403891,,
12
+ F_S_WWC_WM_700,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_generated_denorm,0.3587003976,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_generated_denorm,0.2914696080,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_original_denorm,0.3800891236,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_generated_denorm,0.3749502619,,
13
+ F_S_WWS_WM_514,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_generated_denorm,0.2696287339,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_generated_denorm,0.2841606839,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_original_denorm,0.2971893764,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_generated_denorm,0.3040624580,,
14
+ N_S_WWC_WM_078,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_generated_denorm,0.3274746092,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_generated_denorm,0.2773493989,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_original_denorm,0.3204433485,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_generated_denorm,0.3649722028,,
15
+ N_S_WWS_WM_276,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_generated_denorm,0.2967123031,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_generated_denorm,0.2655983544,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_original_denorm,0.3034673808,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_generated_denorm,0.2988663543,,
16
+ N_S_WW_WM_085,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_085_generated_denorm,0.2850095035,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_085_generated_denorm,0.2737118464,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_085_original_denorm,0.2911993508,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_085_generated_denorm,0.3265569550,,
17
+ N_S_WW_WM_109,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_109_generated_denorm,0.3377757426,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_109_generated_denorm,0.3345349621,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_109_original_denorm,0.3561438714,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_109_generated_denorm,0.3570314688,,
18
+ N_S_WW_WM_307,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_307_generated_denorm,0.2880865205,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_307_generated_denorm,0.2734240199,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_307_original_denorm,0.2797133367,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_307_generated_denorm,0.2792031281,,
19
+ N_S_WW_WM_313,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_313_generated_denorm,0.2892685289,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_313_generated_denorm,0.2809796922,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_313_original_denorm,0.3112253678,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_313_generated_denorm,0.3273432348,,
20
+ N_S_WW_WM_416,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_416_generated_denorm,0.3022560878,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_416_generated_denorm,0.2714942117,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_416_original_denorm,0.3429863593,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_416_generated_denorm,0.3537881639,,
21
+ N_S_WW_WM_456,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_456_generated_denorm,0.3005216009,,,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_456_generated_denorm,0.2540354952,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_456_original_denorm,0.3285866382,test_meshes_dgs3.9847495044325627_sts1_nis100_nol0_nos32_lr0.0060719894934413024_N_S_WW_WM_456_generated_denorm,0.3262066094,,
cfd_workflow_20261012/givenshape_analyse.py ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Script to analyze OpenFOAM simulation results from givenshape experiments.
4
+ Extracts drag coefficients from original and generated meshes and calculates improvements.
5
+ """
6
+
7
+ import os
8
+ import csv
9
+ import glob
10
+ from pathlib import Path
11
+ import re
12
+
13
+
14
+ def extract_avg_drag(avg_drag_file):
15
+ """
16
+ Extract drag value from avg_drag.txt file.
17
+
18
+ Args:
19
+ avg_drag_file: Path to avg_drag.txt file
20
+
21
+ Returns:
22
+ float: Drag value, or None if extraction fails
23
+ """
24
+ try:
25
+ with open(avg_drag_file, 'r') as f:
26
+ content = f.read().strip()
27
+ # Try to convert the content to float
28
+ drag_value = float(content)
29
+ return drag_value
30
+ except Exception as e:
31
+ print(f"Error reading {avg_drag_file}: {e}")
32
+ return None
33
+
34
+
35
+ def extract_force_coeffs(force_coeffs_file):
36
+ """
37
+ Extract Cd (drag coefficient) from forceCoeffs.dat file.
38
+ Reads the last line and extracts the third column (Cd).
39
+
40
+ File format:
41
+ # Time Cm Cd Cl Cl(f) Cl(r)
42
+ 2500 -0.4757 0.2554 0.0982 -0.4266 0.5249
43
+
44
+ Args:
45
+ force_coeffs_file: Path to postProcessing/car/0/forceCoeffs.dat file
46
+
47
+ Returns:
48
+ float: Cd value, or None if extraction fails
49
+ """
50
+ try:
51
+ with open(force_coeffs_file, 'r') as f:
52
+ lines = f.readlines()
53
+
54
+ # Find the last non-empty line that's not a comment
55
+ for line in reversed(lines):
56
+ line = line.strip()
57
+ # Skip empty lines and comments
58
+ if not line or line.startswith('#'):
59
+ continue
60
+
61
+ # Split the line and extract the third column (index 2 - Cd column)
62
+ parts = line.split()
63
+ if len(parts) >= 3:
64
+ cd_value = float(parts[2])
65
+ return cd_value
66
+
67
+ print(f"No valid data found in {force_coeffs_file}")
68
+ return None
69
+ except Exception as e:
70
+ print(f"Error reading {force_coeffs_file}: {e}")
71
+ return None
72
+
73
+
74
+ def extract_id_from_folder(folder_name):
75
+ """
76
+ Extract ID from folder name.
77
+ Assumes format: test_meshes_..._<ID>_original_denorm or test_meshes_..._<ID>_generated_denorm
78
+ Extracts the hash ID which is the second-to-last part when split by '_'.
79
+
80
+ Args:
81
+ folder_name: Name of the folder
82
+
83
+ Returns:
84
+ str: ID or folder name if extraction fails
85
+ """
86
+ try:
87
+ parts = folder_name.split('_')
88
+ # The ID is the second-to-last part (before "original/generated" and "denorm")
89
+ if len(parts) >= 3:
90
+ return parts[-3]
91
+ return folder_name
92
+ except Exception as e:
93
+ print(f"Error extracting ID from {folder_name}: {e}")
94
+ return folder_name
95
+
96
+
97
+ def process_experiment_folder(exp_folder):
98
+ """
99
+ Process a single experiment folder containing original and generated subfolders.
100
+
101
+ Args:
102
+ exp_folder: Path to experiment folder
103
+
104
+ Returns:
105
+ dict: Dictionary with extracted data, or None if processing fails
106
+ """
107
+ exp_path = Path(exp_folder)
108
+
109
+ # Find original and generated subfolders by pattern
110
+ original_folders = list(exp_path.glob('*_original_denorm'))
111
+ generated_folders = list(exp_path.glob('*_generated_denorm'))
112
+
113
+ if not original_folders or not generated_folders:
114
+ print(f"Skipping {exp_folder}: Missing original or generated subfolder")
115
+ return None
116
+
117
+ # Use the first matching folders (should only be one pair per experiment)
118
+ original_path = original_folders[0]
119
+ generated_path = generated_folders[0]
120
+
121
+ # Extract ID from the original subfolder name
122
+ case_id = extract_id_from_folder(original_path.name)
123
+
124
+ result = {
125
+ 'id': case_id,
126
+ 'experiment_folder': exp_path.name,
127
+ 'original_subfolder': original_path.name,
128
+ 'generated_subfolder': generated_path.name,
129
+ 'original_avg_drag': None,
130
+ 'original_cd': None,
131
+ 'generated_avg_drag': None,
132
+ 'generated_cd': None,
133
+ 'improvement_avg_drag': None,
134
+ 'improvement_cd': None
135
+ }
136
+
137
+ # Process original folder
138
+ original_avg_drag_file = original_path / 'avg_drag.txt'
139
+ original_force_coeffs_file = original_path / 'postProcessing' / 'car' / '0' / 'forceCoeffs.dat'
140
+
141
+ if original_avg_drag_file.exists():
142
+ result['original_avg_drag'] = extract_avg_drag(original_avg_drag_file)
143
+ else:
144
+ print(f" Missing: {original_avg_drag_file}")
145
+
146
+ if original_force_coeffs_file.exists():
147
+ result['original_cd'] = extract_force_coeffs(original_force_coeffs_file)
148
+ else:
149
+ print(f" Missing: {original_force_coeffs_file}")
150
+
151
+ # Process generated folder
152
+ generated_avg_drag_file = generated_path / 'avg_drag.txt'
153
+ generated_force_coeffs_file = generated_path / 'postProcessing' / 'car' / '0' / 'forceCoeffs.dat'
154
+
155
+ if generated_avg_drag_file.exists():
156
+ result['generated_avg_drag'] = extract_avg_drag(generated_avg_drag_file)
157
+ else:
158
+ print(f" Missing: {generated_avg_drag_file}")
159
+
160
+ if generated_force_coeffs_file.exists():
161
+ result['generated_cd'] = extract_force_coeffs(generated_force_coeffs_file)
162
+ else:
163
+ print(f" Missing: {generated_force_coeffs_file}")
164
+
165
+ # Calculate improvement percentages
166
+ # Improvement = (Original - Generated) / Original * 100
167
+ # Positive percentage means reduction (improvement)
168
+
169
+ if result['original_avg_drag'] is not None and result['generated_avg_drag'] is not None:
170
+ if result['original_avg_drag'] != 0:
171
+ improvement = (result['original_avg_drag'] - result['generated_avg_drag']) / result['original_avg_drag'] * 100
172
+ result['improvement_avg_drag'] = f"{improvement:.2f}%"
173
+ else:
174
+ result['improvement_avg_drag'] = "N/A"
175
+
176
+ if result['original_cd'] is not None and result['generated_cd'] is not None:
177
+ if result['original_cd'] != 0:
178
+ improvement = (result['original_cd'] - result['generated_cd']) / result['original_cd'] * 100
179
+ result['improvement_cd'] = f"{improvement:.2f}%"
180
+ else:
181
+ result['improvement_cd'] = "N/A"
182
+
183
+ return result
184
+
185
+
186
+ def main():
187
+ """
188
+ Main function to process all experiment folders and generate CSV report.
189
+ """
190
+ # Get the current directory (openfoam folder)
191
+ base_dir = Path(__file__).parent
192
+
193
+ # Pattern to match experiment folders
194
+ # pattern = "test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all*"
195
+ pattern = "test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all*"
196
+
197
+ print(f"Searching for folders matching: {pattern}")
198
+ print(f"Base directory: {base_dir}")
199
+
200
+ # Find all matching experiment folders
201
+ exp_folders = glob.glob(str(base_dir / pattern))
202
+ exp_folders.sort()
203
+
204
+ print(f"Found {len(exp_folders)} experiment folders\n")
205
+
206
+ if not exp_folders:
207
+ print("No matching folders found!")
208
+ return
209
+
210
+ # Process each experiment folder
211
+ results = []
212
+ for exp_folder in exp_folders:
213
+ print(f"Processing: {Path(exp_folder).name}")
214
+ result = process_experiment_folder(exp_folder)
215
+ if result is not None:
216
+ # Only add if we have at least some data
217
+ if any([result['original_avg_drag'], result['original_cd'],
218
+ result['generated_avg_drag'], result['generated_cd']]):
219
+ results.append(result)
220
+ print(f" ✓ Successfully processed")
221
+ else:
222
+ print(f" ✗ No valid data found")
223
+ print()
224
+
225
+ # Write results to CSV
226
+ output_file = base_dir / 'givenshape_drivaernet_analysis_results.csv'
227
+
228
+ with open(output_file, 'w', newline='') as csvfile:
229
+ fieldnames = [
230
+ 'ID',
231
+ 'Experiment_Folder',
232
+ 'Original_Subfolder',
233
+ 'Generated_Subfolder',
234
+ 'Original_AvgDrag',
235
+ 'Generated_AvgDrag',
236
+ 'Improvement_AvgDrag',
237
+ 'Original_Cd',
238
+ 'Generated_Cd',
239
+ 'Improvement_Cd'
240
+ ]
241
+
242
+ writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
243
+ writer.writeheader()
244
+
245
+ for result in results:
246
+ writer.writerow({
247
+ 'ID': result['id'],
248
+ 'Experiment_Folder': result['experiment_folder'],
249
+ 'Original_Subfolder': result['original_subfolder'],
250
+ 'Generated_Subfolder': result['generated_subfolder'],
251
+ 'Original_AvgDrag': result['original_avg_drag'] if result['original_avg_drag'] is not None else 'N/A',
252
+ 'Generated_AvgDrag': result['generated_avg_drag'] if result['generated_avg_drag'] is not None else 'N/A',
253
+ 'Improvement_AvgDrag': result['improvement_avg_drag'] if result['improvement_avg_drag'] is not None else 'N/A',
254
+ 'Original_Cd': result['original_cd'] if result['original_cd'] is not None else 'N/A',
255
+ 'Generated_Cd': result['generated_cd'] if result['generated_cd'] is not None else 'N/A',
256
+ 'Improvement_Cd': result['improvement_cd'] if result['improvement_cd'] is not None else 'N/A'
257
+ })
258
+
259
+ print(f"Results saved to: {output_file}")
260
+ print(f"Total cases processed: {len(results)}")
261
+
262
+ # Print summary statistics
263
+ if results:
264
+ print("\n=== Summary Statistics ===")
265
+
266
+ # Calculate average improvements
267
+ avg_drag_improvements = []
268
+ cd_improvements = []
269
+
270
+ for result in results:
271
+ if result['improvement_avg_drag'] and result['improvement_avg_drag'] != 'N/A':
272
+ try:
273
+ val = float(result['improvement_avg_drag'].rstrip('%'))
274
+ avg_drag_improvements.append(val)
275
+ except:
276
+ pass
277
+
278
+ if result['improvement_cd'] and result['improvement_cd'] != 'N/A':
279
+ try:
280
+ val = float(result['improvement_cd'].rstrip('%'))
281
+ cd_improvements.append(val)
282
+ except:
283
+ pass
284
+
285
+ if avg_drag_improvements:
286
+ print(f"\nAvg Drag Improvements:")
287
+ print(f" Mean: {sum(avg_drag_improvements)/len(avg_drag_improvements):.2f}%")
288
+ print(f" Min: {min(avg_drag_improvements):.2f}%")
289
+ print(f" Max: {max(avg_drag_improvements):.2f}%")
290
+ print(f" Count: {len(avg_drag_improvements)}")
291
+
292
+ if cd_improvements:
293
+ print(f"\nCd Improvements:")
294
+ print(f" Mean: {sum(cd_improvements)/len(cd_improvements):.2f}%")
295
+ print(f" Min: {min(cd_improvements):.2f}%")
296
+ print(f" Max: {max(cd_improvements):.2f}%")
297
+ print(f" Count: {len(cd_improvements)}")
298
+
299
+
300
+ if __name__ == '__main__':
301
+ main()
cfd_workflow_20261012/givenshape_analysis_results.csv ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ID,Experiment_Folder,Original_Subfolder,Generated_Subfolder,Original_AvgDrag,Generated_AvgDrag,Improvement_AvgDrag,Original_Cd,Generated_Cd,Improvement_Cd
2
+ ed6bf649ad5b3d82b1bb46d2556ba67d,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_ed6bf649ad5b3d82b1bb46d2556ba67d_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_ed6bf649ad5b3d82b1bb46d2556ba67d_generated_denorm,0.40720703468552977,0.33504198415659797,17.72%,0.4021993399564,0.3396574401063,15.55%
3
+ 2c407d592623011eda2ff65a113288d,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_27,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_2c407d592623011eda2ff65a113288d_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_2c407d592623011eda2ff65a113288d_generated_denorm,0.31275817644022513,0.2875285917375034,8.07%,0.3295244464003,0.2911268888892,11.65%
4
+ 2df225b8df2633c231141a7d4d06dc13,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_28,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_2df225b8df2633c231141a7d4d06dc13_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_2df225b8df2633c231141a7d4d06dc13_generated_denorm,0.3566345136377958,0.32730156852889947,8.22%,0.3633856702877,0.3196683760857,12.03%
5
+ 3ac08e66bd7da4c35da01f298003d56,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_29,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_3ac08e66bd7da4c35da01f298003d56_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_3ac08e66bd7da4c35da01f298003d56_generated_denorm,0.3488658529164656,0.30512285897864,12.54%,0.3563985146308,0.3096069489385,13.13%
6
+ 3c1ecfc2dc88c1919214bcda3ade39f4,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_30,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_3c1ecfc2dc88c1919214bcda3ade39f4_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_3c1ecfc2dc88c1919214bcda3ade39f4_generated_denorm,N/A,0.3017747230655102,N/A,0.07982798612129,0.3091681139251,-287.29%
7
+ 4fa9b14789c8af5e3781057335c8a2e8,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_31,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_4fa9b14789c8af5e3781057335c8a2e8_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_4fa9b14789c8af5e3781057335c8a2e8_generated_denorm,0.38954146923406635,0.3055991388290681,21.55%,0.390742703235,0.3059470363076,21.70%
8
+ 6a8058611e45e7d243ff4cf09319bd2,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_32,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6a8058611e45e7d243ff4cf09319bd2_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6a8058611e45e7d243ff4cf09319bd2_generated_denorm,0.35612864302811376,0.3186037125555613,10.54%,0.3682461014794,0.3296979224372,10.47%
9
+ 6dda1440d653d0c3bc5845a373118df7,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_33,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6dda1440d653d0c3bc5845a373118df7_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6dda1440d653d0c3bc5845a373118df7_generated_denorm,0.34900248965961916,0.3497877457999934,-0.23%,0.3420129181916,0.3437082872232,-0.50%
10
+ 9cd875a215c8806731b76be6623555e0,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_34,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_9cd875a215c8806731b76be6623555e0_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_9cd875a215c8806731b76be6623555e0_generated_denorm,0.24995660445856607,0.32141231875452375,-28.59%,0.245449742011,0.3363818323965,-37.05%
11
+ 35f6b9780e173878a8c38723d07b122f,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_35,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_35f6b9780e173878a8c38723d07b122f_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_35f6b9780e173878a8c38723d07b122f_generated_denorm,0.2320527030812477,0.2915369914392503,-25.63%,0.233063796226,0.2820452048497,-21.02%
12
+ 37c5ac3d5b34761add75f724c0ccbe00,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_36,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_37c5ac3d5b34761add75f724c0ccbe00_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_37c5ac3d5b34761add75f724c0ccbe00_generated_denorm,0.4028690094114721,0.30141685862387546,25.18%,0.3963618461055,0.298434041944,24.71%
13
+ 51f4aebb148459a45fae7711b4095f8,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_37,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_51f4aebb148459a45fae7711b4095f8_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_51f4aebb148459a45fae7711b4095f8_generated_denorm,0.3642142634563353,0.32670404356650656,10.30%,0.3566795998751,0.3402109146716,4.62%
14
+ 61f70557b8bda7422ee0f9a97b71d505,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_38,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_61f70557b8bda7422ee0f9a97b71d505_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_61f70557b8bda7422ee0f9a97b71d505_generated_denorm,0.37994435988566067,0.27766590694536136,26.92%,0.3893697462687,0.2728802947648,29.92%
15
+ 61f70557b8bda7422ee0f9a97b71d505,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_39,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_61f70557b8bda7422ee0f9a97b71d505_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_61f70557b8bda7422ee0f9a97b71d505_generated_denorm,0.37994435988566067,0.27766590694536136,26.92%,0.3893697462687,0.2728802947648,29.92%
16
+ 72d1eb25d911b6d8913eef1194316fef,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_40,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_72d1eb25d911b6d8913eef1194316fef_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_72d1eb25d911b6d8913eef1194316fef_generated_denorm,0.2756967692113164,0.30507109816336925,-10.65%,0.2863726741701,0.3043948958153,-6.29%
17
+ 86c31c04c436f5932e877e82c90c24d,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_41,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_86c31c04c436f5932e877e82c90c24d_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_86c31c04c436f5932e877e82c90c24d_generated_denorm,0.3064583925008607,0.294853682568026,3.79%,0.3027325910102,0.3015218042643,0.40%
18
+ 300c1f29d253f94a97e6e890ac2fb198,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_42,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_300c1f29d253f94a97e6e890ac2fb198_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_300c1f29d253f94a97e6e890ac2fb198_generated_denorm,0.26641267247747386,0.2786999913354669,-4.61%,0.261577988016,0.2765123115328,-5.71%
19
+ 338eb8e836639e09f8f1f8fdb364ff3c,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_43,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_338eb8e836639e09f8f1f8fdb364ff3c_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_338eb8e836639e09f8f1f8fdb364ff3c_generated_denorm,N/A,0.3155404766358098,N/A,0.07925582670227,0.320893563986,-304.88%
20
+ 414ae320397821af8bf92e87e504146a,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_44,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_414ae320397821af8bf92e87e504146a_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_414ae320397821af8bf92e87e504146a_generated_denorm,0.41114299788997843,0.35278993928432917,14.19%,0.4141371637763,0.3775171494683,8.84%
21
+ 903b043072a209ba8290d32865eb3245,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_45,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_903b043072a209ba8290d32865eb3245_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_903b043072a209ba8290d32865eb3245_generated_denorm,0.30597324162256245,0.314090869770269,-2.65%,0.3068149499821,0.3155762077096,-2.86%
22
+ 119033fe083145e22f31600ac759c763,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_46,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_119033fe083145e22f31600ac759c763_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_119033fe083145e22f31600ac759c763_generated_denorm,0.28611451430035223,0.27962798082518064,2.27%,0.2813125775542,0.2770600970908,1.51%
23
+ 324434f8eea2839bf63ee8a34069b7c5,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_47,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_324434f8eea2839bf63ee8a34069b7c5_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_324434f8eea2839bf63ee8a34069b7c5_generated_denorm,N/A,0.33318211219723837,N/A,0.08259154145403,0.3497431617121,-323.46%
24
+ a16ff37768fe676473d32960f279a9cb,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_48,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_a16ff37768fe676473d32960f279a9cb_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_a16ff37768fe676473d32960f279a9cb_generated_denorm,N/A,0.27733744489037904,N/A,0.08018179436613,0.2761263671906,-244.38%
25
+ a53f8a03871fd1d1c4e15ee0eb85afd9,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_49,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_a53f8a03871fd1d1c4e15ee0eb85afd9_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_a53f8a03871fd1d1c4e15ee0eb85afd9_generated_denorm,0.29327613017803755,0.272076772078008,7.23%,0.2944291807215,0.2771624043126,5.86%
26
+ e3d7957c7a9b95382e877e82c90c24d,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_50,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_e3d7957c7a9b95382e877e82c90c24d_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_e3d7957c7a9b95382e877e82c90c24d_generated_denorm,N/A,0.30073361316320196,N/A,0.08941172406688,0.3046877296199,-240.77%
27
+ e61dadc02535e6e44b6e62b17dc78f70,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_51,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_e61dadc02535e6e44b6e62b17dc78f70_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_e61dadc02535e6e44b6e62b17dc78f70_generated_denorm,0.45018625340979285,0.3271286114894851,27.33%,0.4356239062811,0.3327215424844,23.62%
28
+ b47d993a5e2dd15e3a3aa1d2d3319a4,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim10,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_b47d993a5e2dd15e3a3aa1d2d3319a4_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_b47d993a5e2dd15e3a3aa1d2d3319a4_generated_denorm,0.4678840572208547,0.3484221932736091,25.53%,0.4706618411492,0.3372760675967,28.34%
29
+ c92ef17bef6471f72a9eb0f146e94477,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim11,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_c92ef17bef6471f72a9eb0f146e94477_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_c92ef17bef6471f72a9eb0f146e94477_generated_denorm,0.31592912267892753,0.3111692033798092,1.51%,0.3222608518303,0.3119435533248,3.20%
30
+ d34b0494fc4d756ab927782fc69a1fbb,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim14,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_d34b0494fc4d756ab927782fc69a1fbb_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_d34b0494fc4d756ab927782fc69a1fbb_generated_denorm,0.4858832300221309,0.3048283573247533,37.26%,0.491935665837,0.3008198801176,38.85%
31
+ ff267b1a6d986426c6df82b90873315e,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim17,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_ff267b1a6d986426c6df82b90873315e_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_ff267b1a6d986426c6df82b90873315e_generated_denorm,0.290980565364585,0.2744068151597343,5.70%,0.2984943500291,0.2933867546628,1.71%
32
+ f60f11a1a8c8f89992691fb966926839,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim18,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_f60f11a1a8c8f89992691fb966926839_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_f60f11a1a8c8f89992691fb966926839_generated_denorm,0.3712852209362982,0.29683093587329745,20.05%,0.3696347035018,0.2991099048339,19.08%
33
+ 558404e6c17c58997302a5e36ce363de,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim20,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_558404e6c17c58997302a5e36ce363de_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_558404e6c17c58997302a5e36ce363de_generated_denorm,0.3033379513641455,0.3031009897465098,0.08%,0.3127130705471,0.300572799641,3.88%
34
+ 7611c8605cb47d74b11647ffa4306609,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim22,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_7611c8605cb47d74b11647ffa4306609_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_7611c8605cb47d74b11647ffa4306609_generated_denorm,0.39131248574071814,0.32941443590734226,15.82%,0.3886514835004,0.3287145981951,15.42%
35
+ 816f9a529bf7b14817d5c90faf553cc9,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim23,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_816f9a529bf7b14817d5c90faf553cc9_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_816f9a529bf7b14817d5c90faf553cc9_generated_denorm,0.32550541013946865,0.25733076238264196,20.94%,0.3255477495829,0.2554904764359,21.52%
36
+ 664b8ab637c1fb54a78cb4f1b66f009e,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim25,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_664b8ab637c1fb54a78cb4f1b66f009e_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_664b8ab637c1fb54a78cb4f1b66f009e_generated_denorm,0.3172728138485549,0.28118795878700115,11.37%,0.3143934876726,0.2887651380306,8.15%
37
+ 371c5e74c66d22d451973ec97171fea3,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim26,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_371c5e74c66d22d451973ec97171fea3_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_371c5e74c66d22d451973ec97171fea3_generated_denorm,0.3090105943000046,0.2800150408850145,9.38%,0.3119743503246,0.274201221239,12.11%
38
+ 5fb19e8ecfe42bd170bc1eaaf2d60138,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim4,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_5fb19e8ecfe42bd170bc1eaaf2d60138_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_5fb19e8ecfe42bd170bc1eaaf2d60138_generated_denorm,0.3496031506460309,0.29940276648561837,14.36%,0.3252926234454,0.2898843078025,10.89%
39
+ 7bce50c36d8166608e35db9103756ad5,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim5,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_7bce50c36d8166608e35db9103756ad5_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_7bce50c36d8166608e35db9103756ad5_generated_denorm,0.32340119370756365,0.2665890261437062,17.57%,0.3216668299434,0.2739691786756,14.83%
40
+ 79b99595059c53108540dd23f35aa602,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim6,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_79b99595059c53108540dd23f35aa602_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_79b99595059c53108540dd23f35aa602_generated_denorm,0.407704320235622,0.28613095818929446,29.82%,0.4035964623651,0.2886576222466,28.48%
41
+ 6265f0745d3f40546bcd32c43682e841,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim7,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6265f0745d3f40546bcd32c43682e841_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_6265f0745d3f40546bcd32c43682e841_generated_denorm,0.5054965525969557,0.3197573608210567,36.74%,0.5170071363414,0.3262683176886,36.89%
42
+ 10716a366de708b8fac96522b26f7fd,test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim8,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_10716a366de708b8fac96522b26f7fd_original_denorm,test_meshes_dgs0.03_sts0.75_nis100_nol20_nos20_lr0.008213044831567878_10716a366de708b8fac96522b26f7fd_generated_denorm,0.39832418794499297,0.2925089212000815,26.57%,0.3960028907757,0.2801270978607,29.26%
cfd_workflow_20261012/givenshape_drivaernet_analysis_results.csv ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ID,Experiment_Folder,Original_Subfolder,Generated_Subfolder,Original_AvgDrag,Generated_AvgDrag,Improvement_AvgDrag,Original_Cd,Generated_Cd,Improvement_Cd
2
+ 410,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_410_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_410_generated_denorm,0.28582411532369295,0.26347156165232055,7.82%,0.2797085174791,0.2808990222699,-0.43%
3
+ 289,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_1,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_289_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_289_generated_denorm,0.3416945455477447,0.2808242561548429,17.81%,0.3335869282523,0.289563783033,13.20%
4
+ 056,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_10,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_056_generated_denorm,0.34831875036029974,0.2568445939723996,26.26%,0.3501908724279,0.2620747763496,25.16%
5
+ 087,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_11,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_generated_denorm,0.31474000452094253,0.2707071971389127,13.99%,0.3284913774208,0.2630502610192,19.92%
6
+ 413,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_12,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_413_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_413_generated_denorm,0.2875158790619175,0.2673230706505798,7.02%,0.2931140140194,0.2729787185379,6.87%
7
+ 541,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_13,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_541_generated_denorm,0.32636306464446285,0.26916490598903275,17.53%,0.3166246689811,0.2736883742293,13.56%
8
+ 051,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_14,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_051_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_051_generated_denorm,0.289523309755989,0.2638768945806453,8.86%,0.2980748255865,0.2655017425414,10.93%
9
+ 236,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_15,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_236_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_236_generated_denorm,0.3155132510283457,0.27263384287960796,13.59%,0.3222572109,0.2575519464044,20.08%
10
+ 269,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_16,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_269_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_269_generated_denorm,0.2976700453037579,0.2674290958850357,10.16%,0.3091445676866,0.2725682061449,11.83%
11
+ 289,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_17,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_289_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_289_generated_denorm,0.3152509854470084,0.2916997264820529,7.47%,0.3215500608962,0.2977873569683,7.39%
12
+ 207,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_18,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_207_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_207_generated_denorm,0.29822089173309024,0.27070035520739416,9.23%,0.3060167930377,0.270306056535,11.67%
13
+ 313,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_19,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_313_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_313_generated_denorm,0.30670289921914595,0.2745907074964192,10.47%,0.2949009407083,0.2795051956874,5.22%
14
+ 560,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_2,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_560_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_560_generated_denorm,0.2911924800910072,0.26468885148045507,9.10%,0.296759168459,0.2700212015589,9.01%
15
+ 416,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_20,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_416_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_416_generated_denorm,0.34205629856379205,0.27291790464010574,20.21%,0.3304600956492,0.2690496799192,18.58%
16
+ 276,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_21,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_276_generated_denorm,0.3034673808273938,0.2584761185469405,14.83%,0.2975414079016,0.249373389345,16.19%
17
+ 482,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_22,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_482_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_482_generated_denorm,0.2814851350018703,0.2686941846081736,4.54%,0.2866802712267,0.2706624580287,5.59%
18
+ 133,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_23,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_133_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_133_generated_denorm,0.36603240288112543,0.33167803209827984,9.39%,0.3428423739807,0.3194595494527,6.82%
19
+ 403,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_24,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_403_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_403_generated_denorm,0.3187122784512256,0.2699503556079926,15.30%,0.3215256146798,0.2815994531409,12.42%
20
+ 203,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_25,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_203_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_203_generated_denorm,0.32873141910876985,0.27636577723552297,15.93%,0.334942581066,0.2807408790016,16.18%
21
+ 109,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_26,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_109_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_109_generated_denorm,0.3285814464688226,0.2662205767176002,18.98%,0.3422737877297,0.2745829622231,19.78%
22
+ 1877,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_27,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1877_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1877_generated_denorm,0.3138041491541552,0.32831249720973416,-4.62%,0.3125929884747,0.320604922301,-2.56%
23
+ 225,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_28,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_225_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_225_generated_denorm,0.3619447875682106,0.27537172288884537,23.92%,0.3479703644149,0.2793450551199,19.72%
24
+ 193,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_29,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_193_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_193_generated_denorm,0.30704261273576205,0.2745733695251746,10.57%,0.3132985715653,0.2838386241819,9.40%
25
+ 005,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_3,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_005_generated_denorm,0.36809118922636525,0.312822564948988,15.01%,0.3671876669622,0.3092753238266,15.77%
26
+ 485,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_30,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_485_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_485_generated_denorm,0.3365148689199448,0.2806135115303383,16.61%,0.3292368003408,0.2853489192063,13.33%
27
+ 615,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_31,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_615_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_615_generated_denorm,0.3279984137013732,0.2964091217460563,9.63%,0.3143649178289,0.2990074496434,4.89%
28
+ 653,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_32,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_653_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WW_WM_653_generated_denorm,0.2925806858872283,0.2794499096215625,4.49%,0.2939318813268,0.2790559571992,5.06%
29
+ 265,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_33,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_265_generated_denorm,0.35503410202645647,0.2825791233256084,20.41%,0.3527057989643,0.2956332551879,16.18%
30
+ 297,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_34,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_297_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_297_generated_denorm,0.34751603873613174,0.26495659948780603,23.76%,0.353413847732,0.2552191673601,27.78%
31
+ 397,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_35,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_397_generated_denorm,0.35262169152036565,0.25179660816721994,28.59%,0.3355239866069,0.2458269758965,26.73%
32
+ 511,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_36,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_511_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_511_generated_denorm,0.32823144122991615,0.2512869430037998,23.44%,0.3443953964781,0.2614445108016,24.09%
33
+ 521,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_37,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_521_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_521_generated_denorm,0.3191808479465615,0.28855426327320655,9.60%,0.3274713813557,0.2991942680621,8.63%
34
+ 0659,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_38,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0659_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0659_generated_denorm,0.3228847905534701,0.3158714214605812,2.17%,0.3335509191786,0.3099210043413,7.08%
35
+ 0897,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_39,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0897_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0897_generated_denorm,0.3463542930370032,0.3540750761385417,-2.23%,0.3507374303289,0.3508639461231,-0.04%
36
+ 121,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_4,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_121_generated_denorm,0.34617887097457983,0.2832049570399773,18.19%,0.3418556652409,0.2686374068549,21.42%
37
+ 1511,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_40,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1511_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1511_generated_denorm,0.3393215355952052,0.2921571545275701,13.90%,0.3372906293512,0.2909593366198,13.74%
38
+ 1522,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_41,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1522_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_1522_generated_denorm,0.2929418291632635,N/A,N/A,0.2817032660224,-8.275577668776e+28,29376931924239592125394289950720.00%
39
+ 2498,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_42,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2498_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2498_generated_denorm,0.34074865528160564,0.27907580086126665,18.10%,0.3366640408179,0.2802122952588,16.77%
40
+ 2570,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_43,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2570_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2570_generated_denorm,0.2883027889720954,0.3414087387741716,-18.42%,0.2866166430112,0.3400164781918,-18.63%
41
+ 3129,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_44,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3129_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3129_generated_denorm,0.3294928988779164,0.30376103054511017,7.81%,0.3213214986562,0.2986374709615,7.06%
42
+ 700,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_45,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_700_generated_denorm,0.3800891236094806,0.3063801853251747,19.39%,0.4010549398422,0.2988058205224,25.50%
43
+ 260,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_46,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_260_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_260_generated_denorm,0.28806370412581817,0.2532866401625581,12.07%,0.2879429393359,0.2511830341964,12.77%
44
+ 383,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_47,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_383_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_383_generated_denorm,0.3268766404256886,0.276821441721395,15.31%,0.3283406701832,0.2810196695908,14.41%
45
+ 481,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_48,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_481_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_481_generated_denorm,0.2798311969291629,0.2688710937109118,3.92%,0.2721386973064,0.2703442539988,0.66%
46
+ 514,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_49,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_514_generated_denorm,0.297189376365987,0.2755573411010449,7.28%,0.3014701670279,0.2627847697408,12.83%
47
+ 570,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_5,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_E_S_WWC_WM_570_generated_denorm,0.2788280454985535,0.2926563656062349,-4.96%,0.2863380173445,0.2944171523016,-2.82%
48
+ 583,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_50,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_583_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWS_WM_583_generated_denorm,0.30981817561718367,0.27578038227263013,10.99%,0.302302643033,0.2719486123606,10.04%
49
+ 085,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_51,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_085_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_085_generated_denorm,0.2911993508287383,0.27476671100869904,5.64%,0.2865937000637,0.2935989025371,-2.44%
50
+ 307,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_52,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_307_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_307_generated_denorm,0.27971333674053994,0.27403329947521216,2.03%,0.2691300232041,0.2753291311588,-2.30%
51
+ 456,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_53,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_456_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WW_WM_456_generated_denorm,0.3285866382235631,0.2286335734349507,30.42%,0.3057386132624,0.2224589299131,27.24%
52
+ 078,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_54,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWC_WM_078_generated_denorm,0.3204433484808154,0.2713665459467048,15.32%,0.3182451187027,0.2847404249528,10.53%
53
+ 075,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_55,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_075_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_N_S_WWS_WM_075_generated_denorm,0.2967586138568175,0.2749283248262365,7.36%,0.2842164744796,0.27285296442,4.00%
54
+ 0278,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_6,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0278_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_0278_generated_denorm,0.30520449591281185,0.27691247267628305,9.27%,0.3083554204423,0.2963771357876,3.88%
55
+ 2493,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_7,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2493_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_2493_generated_denorm,0.35904919347774805,0.28019112347804576,21.96%,0.3435865296271,0.2802844632967,18.42%
56
+ 3414,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_8,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3414_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3414_generated_denorm,0.3022939227810918,0.28552339733010923,5.55%,0.3016447683857,0.2901400324508,3.81%
57
+ 3794,test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_9,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3794_original_denorm,test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_D_WM_WW_3794_generated_denorm,0.3243127436977012,0.3250608707953852,-0.23%,0.3272406538254,0.3352151000126,-2.44%
cfd_workflow_20261012/move_stl.py ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ STL File Translation Tool
4
+ Read STL files, apply given translation, and overwrite the source file
5
+ """
6
+
7
+ import numpy as np
8
+ import argparse
9
+ import os
10
+ import sys
11
+
12
+ try:
13
+ import trimesh
14
+ except ImportError:
15
+ print("Error: trimesh library not found. Please install it with: pip install trimesh")
16
+ sys.exit(1)
17
+
18
+ def read_stl(filepath):
19
+ """
20
+ Read STL file using trimesh
21
+
22
+ Args:
23
+ filepath: STL file path
24
+
25
+ Returns:
26
+ mesh: trimesh.Trimesh object
27
+ """
28
+ if not os.path.exists(filepath):
29
+ raise FileNotFoundError(f"STL file not found: {filepath}")
30
+
31
+ try:
32
+ mesh = trimesh.load_mesh(filepath)
33
+ print(f"Successfully loaded STL file: {len(mesh.vertices)} vertices, {len(mesh.faces)} faces")
34
+ return mesh
35
+ except Exception as e:
36
+ raise Exception(f"Failed to load STL file: {e}")
37
+
38
+ def write_stl(mesh, filepath):
39
+ """
40
+ Write mesh to STL file using trimesh
41
+
42
+ Args:
43
+ mesh: trimesh.Trimesh object
44
+ filepath: output file path
45
+ """
46
+ try:
47
+ mesh.export(filepath)
48
+ print(f"Successfully exported STL file: {filepath}")
49
+ except Exception as e:
50
+ raise Exception(f"Failed to export STL file: {e}")
51
+
52
+ def apply_translation(mesh, translation):
53
+ """
54
+ Apply translation to mesh vertices
55
+
56
+ Args:
57
+ mesh: trimesh.Trimesh object
58
+ translation: translation vector [dx, dy, dz]
59
+
60
+ Returns:
61
+ translated_mesh: translated trimesh.Trimesh object
62
+ """
63
+ translation = np.array(translation)
64
+ if translation.shape != (3,):
65
+ raise ValueError("Translation vector must be a 3-element array: [dx, dy, dz]")
66
+
67
+ # Create a copy of the mesh to avoid modifying the original
68
+ translated_mesh = mesh.copy()
69
+ translated_mesh.vertices += translation
70
+
71
+ return translated_mesh
72
+
73
+ def move_stl(filepath, translation, output_format='auto'):
74
+ """
75
+ Move mesh in STL file and overwrite the original file
76
+
77
+ Args:
78
+ filepath: STL file path
79
+ translation: translation vector [dx, dy, dz]
80
+ output_format: output format ('auto' for same as input)
81
+ """
82
+ print(f"Processing STL file: {filepath}")
83
+ print(f"Translation vector: {translation}")
84
+
85
+ # Read STL file
86
+ try:
87
+ mesh = read_stl(filepath)
88
+ except Exception as e:
89
+ print(f"Failed to read STL file: {e}")
90
+ return False
91
+
92
+ # Apply translation
93
+ try:
94
+ translated_mesh = apply_translation(mesh, translation)
95
+ print(f"Successfully applied translation")
96
+
97
+ # Display bounding box before and after transformation
98
+ original_min = np.min(mesh.vertices, axis=0)
99
+ original_max = np.max(mesh.vertices, axis=0)
100
+ translated_min = np.min(translated_mesh.vertices, axis=0)
101
+ translated_max = np.max(translated_mesh.vertices, axis=0)
102
+
103
+ print(f"Original bounding box: min={original_min}, max={original_max}")
104
+ print(f"Translated bounding box: min={translated_min}, max={translated_max}")
105
+
106
+ except Exception as e:
107
+ print(f"Failed to apply translation: {e}")
108
+ return False
109
+
110
+ # Create backup (optional)
111
+ # backup_path = filepath + '.backup'
112
+ # try:
113
+ # import shutil
114
+ # shutil.copy2(filepath, backup_path)
115
+ # print(f"Created backup file: {backup_path}")
116
+ # except Exception as e:
117
+ # print(f"Failed to create backup file: {e}")
118
+ # print("Continuing...")
119
+
120
+ # Write STL file (overwrite original file)
121
+ try:
122
+ write_stl(translated_mesh, filepath)
123
+ print(f"Successfully wrote STL file: {filepath}")
124
+ return True
125
+
126
+ except Exception as e:
127
+ print(f"Failed to write STL file: {e}")
128
+
129
+ # Try to restore from backup
130
+ if os.path.exists(backup_path):
131
+ try:
132
+ import shutil
133
+ shutil.copy2(backup_path, filepath)
134
+ print(f"Restored original file from backup")
135
+ except Exception as restore_error:
136
+ print(f"Failed to restore backup: {restore_error}")
137
+
138
+ return False
139
+
140
+ def main():
141
+ """
142
+ Main function - command line interface
143
+ """
144
+ parser = argparse.ArgumentParser(
145
+ description='Move mesh in STL file and overwrite the original file',
146
+ formatter_class=argparse.RawDescriptionHelpFormatter,
147
+ epilog="""
148
+ Example usage:
149
+ python move_stl.py /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground/base_E_S_WWC_WM_005/constant/triSurface/car.stl --translation 0.0 0.0 -0.3
150
+
151
+ python move_stl.py mesh.stl -t 1.531090 0.0 -0.3
152
+ python move_stl.py mesh.stl -t 0 0 5
153
+ """
154
+ )
155
+
156
+ parser.add_argument('stl_file',
157
+ help='STL file path to process')
158
+
159
+ parser.add_argument('-t', '--translation',
160
+ nargs=3,
161
+ type=float,
162
+ required=True,
163
+ metavar=('DX', 'DY', 'DZ'),
164
+ help='Translation vector [dx, dy, dz]')
165
+
166
+ parser.add_argument('--no-backup',
167
+ action='store_true',
168
+ help='Do not create backup file')
169
+
170
+ args = parser.parse_args()
171
+
172
+ # Check if file exists
173
+ if not os.path.exists(args.stl_file):
174
+ print(f"Error: STL file not found: {args.stl_file}")
175
+ sys.exit(1)
176
+
177
+ # Check if file is writable
178
+ if not os.access(args.stl_file, os.W_OK):
179
+ print(f"Error: No write permission: {args.stl_file}")
180
+ sys.exit(1)
181
+
182
+ # Execute translation operation
183
+ success = move_stl(args.stl_file, args.translation)
184
+
185
+ if success:
186
+ print("STL file translation completed!")
187
+ sys.exit(0)
188
+ else:
189
+ print("STL file translation failed!")
190
+ sys.exit(1)
191
+
192
+ if __name__ == "__main__":
193
+ main()
cfd_workflow_20261012/organize_drag_results.py ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Script to organize drag coefficient results from OpenFOAM simulations into a CSV file.
4
+
5
+ This script scans all test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_*
6
+ folders, extracts drag coefficients from avg_drag.txt files, and organizes them by ID and parameters.
7
+ """
8
+
9
+ import os
10
+ import re
11
+ import csv
12
+ from pathlib import Path
13
+ from collections import defaultdict
14
+ from typing import Dict, List, Tuple
15
+
16
+ def parse_subfolder_name(subfolder_name: str) -> Tuple[str, str, str]:
17
+ """
18
+ Parse subfolder name to extract ID, parameters, and type.
19
+
20
+ Example input: test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_generated_denorm
21
+ Returns: ('F_S_WWC_WM_087', 'dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024', 'generated')
22
+
23
+ Example input: test_meshes_dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024_F_S_WWC_WM_087_original_denorm
24
+ Returns: ('F_S_WWC_WM_087', 'dgs3.9847495044325627_sts0.25_nis100_nol39_nos32_lr0.0060719894934413024', 'original')
25
+ """
26
+ # Remove 'test_meshes_' prefix
27
+ name = subfolder_name.replace('test_meshes_', '')
28
+
29
+ # Determine type (generated or original)
30
+ mesh_type = None
31
+ if name.endswith('_generated_denorm'):
32
+ name = name.replace('_generated_denorm', '')
33
+ mesh_type = 'generated'
34
+ elif name.endswith('_original_denorm'):
35
+ name = name.replace('_original_denorm', '')
36
+ mesh_type = 'original'
37
+ else:
38
+ return None, None, None
39
+
40
+ # Pattern to match ID (e.g., F_S_WWC_WM_087, E_S_WW_WM_560)
41
+ # ID pattern: Letter_Letter_Letters_Letters_Numbers
42
+ id_pattern = r'([A-Z]_[A-Z]_[A-Z]+_[A-Z]+_\d+)$'
43
+ match = re.search(id_pattern, name)
44
+
45
+ if match:
46
+ shape_id = match.group(1)
47
+ # Everything before the ID is the parameters
48
+ params = name[:match.start()].rstrip('_')
49
+ return shape_id, params, mesh_type
50
+ else:
51
+ return None, None, None
52
+
53
+ def extract_avg_drag(avg_drag_path: Path) -> float:
54
+ """
55
+ Extract average drag coefficient from avg_drag.txt file.
56
+ """
57
+ try:
58
+ with open(avg_drag_path, 'r') as f:
59
+ content = f.read().strip()
60
+ return float(content)
61
+ except (FileNotFoundError, ValueError) as e:
62
+ print(f"Warning: Could not read {avg_drag_path}: {e}")
63
+ return None
64
+
65
+ def parse_parameters(params_str: str) -> Dict[str, float]:
66
+ """
67
+ Parse parameter string into a dictionary for sorting.
68
+
69
+ Example: 'dgs3.9847495044325627_sts0.25_nis100_nol0_nos32_lr0.0060719894934413024'
70
+ Returns: {'dgs': 3.9847495044325627, 'sts': 0.25, 'nis': 100, ...}
71
+ """
72
+ param_dict = {}
73
+ # Split by underscore and parse key-value pairs
74
+ parts = params_str.split('_')
75
+ for part in parts:
76
+ # Match pattern like 'dgs3.98...' or 'sts0.25' or 'nis100'
77
+ match = re.match(r'([a-z]+)([\d.]+)', part)
78
+ if match:
79
+ key, value = match.groups()
80
+ param_dict[key] = float(value)
81
+ return param_dict
82
+
83
+ def main():
84
+ # Base directory containing all test folders
85
+ base_dir = Path('/mnt/cvlab/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow')
86
+
87
+ # Pattern to match test folders
88
+ test_folder_pattern = 'test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_*'
89
+
90
+ # Dictionary to store results: {shape_id: {params: {mesh_type: (subfolder_name, avg_drag)}}}
91
+ results = defaultdict(lambda: defaultdict(dict))
92
+
93
+ # Scan all test folders
94
+ test_folders = sorted(base_dir.glob(test_folder_pattern))
95
+ print(f"Found {len(test_folders)} test folders")
96
+
97
+ for test_folder in test_folders:
98
+ if not test_folder.is_dir():
99
+ continue
100
+
101
+ print(f"Processing {test_folder.name}...")
102
+
103
+ # Scan subfolders within each test folder
104
+ for subfolder in test_folder.iterdir():
105
+ if not subfolder.is_dir():
106
+ continue
107
+
108
+ # Parse subfolder name
109
+ shape_id, params, mesh_type = parse_subfolder_name(subfolder.name)
110
+
111
+ if shape_id is None or params is None or mesh_type is None:
112
+ print(f" Warning: Could not parse {subfolder.name}")
113
+ continue
114
+
115
+ # Check if avg_drag.txt exists
116
+ avg_drag_path = subfolder / 'avg_drag.txt'
117
+ if not avg_drag_path.exists():
118
+ print(f" Warning: {avg_drag_path} does not exist")
119
+ continue
120
+
121
+ # Extract average drag
122
+ avg_drag = extract_avg_drag(avg_drag_path)
123
+ if avg_drag is None:
124
+ continue
125
+
126
+ # Store result
127
+ results[shape_id][params][mesh_type] = (subfolder.name, avg_drag)
128
+
129
+ print(f"\nFound {len(results)} unique shape IDs")
130
+
131
+ # Prepare CSV output
132
+ output_file = base_dir / 'drag_results_organized.csv'
133
+
134
+ # Collect all unique parameter sets across all IDs
135
+ all_params = set()
136
+ for shape_id, param_dict in results.items():
137
+ all_params.update(param_dict.keys())
138
+
139
+ # Sort parameters
140
+ # We'll sort by the parameter values (dgs, sts, nis, nol, nos, lr)
141
+ def param_sort_key(params_str):
142
+ param_dict = parse_parameters(params_str)
143
+ # Sort by: dgs, sts, nis, nol, nos, lr
144
+ return (
145
+ param_dict.get('dgs', 0),
146
+ param_dict.get('sts', 0),
147
+ param_dict.get('nis', 0),
148
+ param_dict.get('nol', 0),
149
+ param_dict.get('nos', 0),
150
+ param_dict.get('lr', 0)
151
+ )
152
+
153
+ sorted_params = sorted(all_params, key=param_sort_key)
154
+
155
+ # Write CSV
156
+ with open(output_file, 'w', newline='') as csvfile:
157
+ # Create header: ID, param1_name_gen, param1_drag_gen, param1_name_ori, param1_drag_ori, ...
158
+ header = ['Shape_ID']
159
+ for i, params in enumerate(sorted_params, 1):
160
+ header.append(f'Name_{i}_generated')
161
+ header.append(f'AvgDrag_{i}_generated')
162
+ header.append(f'Name_{i}_original')
163
+ header.append(f'AvgDrag_{i}_original')
164
+
165
+ writer = csv.writer(csvfile)
166
+ writer.writerow(header)
167
+
168
+ # Write data rows
169
+ for shape_id in sorted(results.keys()):
170
+ row = [shape_id]
171
+ param_dict = results[shape_id]
172
+
173
+ for params in sorted_params:
174
+ if params in param_dict:
175
+ mesh_types = param_dict[params]
176
+
177
+ # Add generated data
178
+ if 'generated' in mesh_types:
179
+ subfolder_name, avg_drag = mesh_types['generated']
180
+ row.append(subfolder_name)
181
+ row.append(f'{avg_drag:.10f}')
182
+ else:
183
+ row.append('')
184
+ row.append('')
185
+
186
+ # Add original data
187
+ if 'original' in mesh_types:
188
+ subfolder_name, avg_drag = mesh_types['original']
189
+ row.append(subfolder_name)
190
+ row.append(f'{avg_drag:.10f}')
191
+ else:
192
+ row.append('')
193
+ row.append('')
194
+ else:
195
+ # No data for this param set
196
+ row.append('')
197
+ row.append('')
198
+ row.append('')
199
+ row.append('')
200
+
201
+ writer.writerow(row)
202
+
203
+ print(f"\nResults written to {output_file}")
204
+ print(f"Total shape IDs: {len(results)}")
205
+ print(f"Total parameter sets: {len(sorted_params)}")
206
+
207
+ # Count generated and original entries
208
+ total_generated = 0
209
+ total_original = 0
210
+ for shape_id, param_dict in results.items():
211
+ for params, mesh_types in param_dict.items():
212
+ if 'generated' in mesh_types:
213
+ total_generated += 1
214
+ if 'original' in mesh_types:
215
+ total_original += 1
216
+
217
+ print(f"Total generated entries: {total_generated}")
218
+ print(f"Total original entries: {total_original}")
219
+
220
+ # Print summary
221
+ print("\nSummary of first 5 shape IDs:")
222
+ for i, shape_id in enumerate(sorted(results.keys())[:5]):
223
+ param_dict = results[shape_id]
224
+ gen_count = sum(1 for p in param_dict.values() if 'generated' in p)
225
+ ori_count = sum(1 for p in param_dict.values() if 'original' in p)
226
+ print(f" {shape_id}: {len(param_dict)} parameter sets ({gen_count} generated, {ori_count} original)")
227
+
228
+ if __name__ == '__main__':
229
+ main()
cfd_workflow_20261012/render_agpg60_cfd_shape.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Render the exact shapes that entered CFD: AnchorGen@60 vs PhysGen@60.
3
+
4
+ Per case, AG and PG meshes SHARE one parallel-projection camera (union bbox
5
+ center + scale) per view, so relative size/deformation is faithful. Views:
6
+ oblique (3D form), side (matches SIDE sketch silhouette), front (width).
7
+ Labels carry the real OpenFOAM9 pressure Cd (cd_pressure) for each mesh.
8
+ Convention copied from render_compare20.py (color #789bb7, parallel_scale=0.58*extent).
9
+ """
10
+ from pathlib import Path
11
+ import json
12
+ import numpy as np
13
+ import pyvista as pv
14
+ from PIL import Image, ImageDraw, ImageFont
15
+
16
+ CFD = Path("/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow")
17
+ OUT = CFD / "render_agpg60_cfd_shape_20260925"
18
+ (OUT / "panels").mkdir(parents=True, exist_ok=True)
19
+
20
+ CASES = ["pair0008_source001", "pair0116_source019", "pair0330_source055"]
21
+
22
+ def ag_mesh(c):
23
+ return json.loads((CFD/"anchorgen_side60_20260923_v3/results"/c/"PREPARED.json").read_text())["states"]["final60"]["input"]["path"]
24
+ def pg_mesh(c):
25
+ return json.loads((CFD/"physgen60_priority_20260924_v1/results"/c/"physgen60/PREPARED.json").read_text())["input_source"]["mesh"]
26
+ def ag_cdp(c):
27
+ return json.loads((CFD/"anchorgen_side60_20260923_v3/results"/c/"final60/CFD_RESULT.json").read_text())["cd_pressure"]
28
+ def pg_cdp(c):
29
+ return json.loads((CFD/"physgen60_priority_20260924_v1/results"/c/"physgen60/CFD_RESULT.json").read_text())["cd_pressure"]
30
+
31
+ VIEWS = [("oblique", (1.0, -1.0, 0.65)), ("side", (0.0, -1.0, 0.0)), ("front", (-1.0, 0.0, 0.0))]
32
+ MESH_COLOR = "#789bb7"
33
+ PW, PH = 360, 320
34
+ HEAD_H, LAB_H = 30, 40
35
+ NCOL = len(VIEWS) * 2 # AG,PG per view
36
+ ROW_H = HEAD_H + LAB_H + PH
37
+ SHEET_W = NCOL * PW
38
+
39
+ try:
40
+ F_HEAD = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 20)
41
+ F_LAB = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 15)
42
+ F_SUB = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 13)
43
+ except OSError:
44
+ F_HEAD = F_LAB = F_SUB = ImageFont.load_default()
45
+
46
+ def bounds_union(meshes):
47
+ b = np.array([m.bounds for m in meshes])
48
+ lo = b[:, [0, 2, 4]].min(0); hi = b[:, [1, 3, 5]].max(0)
49
+ return (lo + hi) / 2.0, float((hi - lo).max())
50
+
51
+ def render_mesh(mesh, direction, center, extent):
52
+ p = pv.Plotter(off_screen=True, window_size=(PW - 16, PH))
53
+ p.set_background("white")
54
+ p.add_mesh(mesh, color=MESH_COLOR, smooth_shading=True, specular=0.12)
55
+ d = np.array(direction, float); d /= np.linalg.norm(d)
56
+ pos = center + d * extent * 3.0
57
+ p.camera_position = [tuple(pos), tuple(center), (0.0, 0.0, 1.0)]
58
+ p.enable_parallel_projection()
59
+ p.camera.parallel_scale = 0.58 * extent
60
+ shot = p.screenshot(return_img=True); p.close()
61
+ return Image.fromarray(shot).convert("RGB")
62
+
63
+ qc = []
64
+ rows = []
65
+ for c in CASES:
66
+ agp, pgp = ag_mesh(c), pg_mesh(c)
67
+ agcd, pgcd = ag_cdp(c), pg_cdp(c)
68
+ ag, pg = pv.read(agp), pv.read(pgp)
69
+ center, extent = bounds_union([ag, pg])
70
+ winner = "AnchorGen" if agcd < pgcd else "PhysGen"
71
+ row = Image.new("RGB", (SHEET_W, ROW_H), "white")
72
+ dr = ImageDraw.Draw(row)
73
+ dr.text((10, 5), f"{c} AG60 cd_p={agcd:.5f} PG60 cd_p={pgcd:.5f} lower(better)={winner}",
74
+ fill="black", font=F_HEAD)
75
+ col = 0
76
+ for vname, direction in VIEWS:
77
+ for tag, mesh, cd in [("AnchorGen@60", ag, agcd), ("PhysGen@60", pg, pgcd)]:
78
+ img = render_mesh(mesh, direction, center, extent)
79
+ x0 = col * PW
80
+ lab_color = "red" if ((tag.startswith("AnchorGen")) == (agcd < pgcd)) else "black"
81
+ dr.text((x0 + 8, HEAD_H + 2), f"{tag}", fill=lab_color, font=F_LAB)
82
+ dr.text((x0 + 8, HEAD_H + 20), f"{vname} cd_p {cd:.5f}", fill="#333333", font=F_SUB)
83
+ row.paste(img, (x0 + (PW - img.width)//2, HEAD_H + LAB_H + (PH - img.height)//2))
84
+ img.save(OUT/"panels"/f"{c}_{tag.split('@')[0]}_{vname}.png")
85
+ col += 1
86
+ row.save(OUT / f"row_{c}.png")
87
+ rows.append(row)
88
+ qc.append(dict(case=c, ag_mesh=agp, pg_mesh=pgp, ag_cd_pressure=agcd, pg_cd_pressure=pgcd,
89
+ ag_points=int(ag.n_points), ag_faces=int(ag.n_cells),
90
+ pg_points=int(pg.n_points), pg_faces=int(pg.n_cells),
91
+ union_extent=extent, lower_drag=winner))
92
+ print("RENDERED", c, flush=True)
93
+
94
+ sheet = Image.new("RGB", (SHEET_W, ROW_H * len(rows)), "white")
95
+ for i, im in enumerate(rows):
96
+ sheet.paste(im, (0, i * ROW_H))
97
+ sheet.save(OUT / "overview_ag60_vs_pg60_cfd_shape.png")
98
+ (OUT / "QC.json").write_text(json.dumps(qc, indent=2) + "\n")
99
+ print("DONE ->", OUT / "overview_ag60_vs_pg60_cfd_shape.png")
cfd_workflow_20261012/resource_pods_20260923.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apiVersion": "v1",
3
+ "items": [],
4
+ "kind": "List",
5
+ "metadata": {
6
+ "resourceVersion": ""
7
+ }
8
+ }
cfd_workflow_20261012/resource_snapshot_20260923.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess,re,json
2
+ txt=subprocess.check_output(['kubectl','describe','nodes'],universal_newlines=True)
3
+ for block in re.split(r'^Name:\s*',txt,flags=re.M)[1:]:
4
+ name=block.splitlines()[0]
5
+ if not any(x in name for x in ['gpu2']):continue
6
+ alloc=block.split('Allocatable:')[-1].split('System Info:')[0]
7
+ cpu=re.search(r'^\s+cpu:\s+(\S+)',alloc,re.M);mem=re.search(r'^\s+memory:\s+(\S+)',alloc,re.M)
8
+ used=block.split('Allocated resources:')[-1].split('Events:')[0]
9
+ line=re.search(r'^\s+cpu\s+(\S+)\s+\(([^)]+)\)',used,re.M)
10
+ ml=re.search(r'^\s+memory\s+(\S+)\s+\(([^)]+)\)',used,re.M)
11
+ print(name,'CPU',cpu[1] if cpu else '?','requested',line[1:3] if line else '?','memory',mem[1] if mem else '?','requested',ml[1:3] if ml else '?')
cfd_workflow_20261012/setup_simulation.sh ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # OpenFOAM Simulation Setup Script
4
+ # Usage: ./setup_simulation.sh <xxx>
5
+ # Where xxx is the subdirectory name under the outputs path
6
+ # ./setup_simulation.sh gen_meshes_1002
7
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all
8
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
9
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_512
10
+
11
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
12
+
13
+ set -e # Exit on any error
14
+
15
+ # Check if argument is provided
16
+ if [ $# -ne 1 ]; then
17
+ echo "Usage: $0 <subdirectory_name>"
18
+ echo "Example: $0 gen_meshes_1002"
19
+ exit 1
20
+ fi
21
+
22
+ # Input parameter
23
+ SUBDIR_NAME="$1"
24
+
25
+ # Define paths
26
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
27
+ TEMPLATE_DIR="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template"
28
+ # OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Conditional/train_conditional_CLIPasso"
29
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Unconditional"
30
+
31
+ SOURCE_DIR="${OUTPUT_BASE}/${SUBDIR_NAME}"
32
+
33
+ echo "=== OpenFOAM Simulation Setup ==="
34
+ echo "Subdirectory: ${SUBDIR_NAME}"
35
+ echo "Source directory: ${SOURCE_DIR}"
36
+
37
+ # Check if source directory exists
38
+ if [ ! -d "${SOURCE_DIR}" ]; then
39
+ echo "Error: Source directory does not exist: ${SOURCE_DIR}"
40
+ exit 1
41
+ fi
42
+
43
+ # Check if template directory exists
44
+ if [ ! -d "${TEMPLATE_DIR}" ]; then
45
+ echo "Error: Template directory does not exist: ${TEMPLATE_DIR}"
46
+ echo "Please update TEMPLATE_DIR in the script to point to the correct template location."
47
+ exit 1
48
+ fi
49
+
50
+ # Create main SUBDIR_NAME directory
51
+ MAIN_DIR="${SCRIPT_DIR}/${SUBDIR_NAME}"
52
+ echo "Creating main directory: ${MAIN_DIR}"
53
+
54
+ if [ -d "${MAIN_DIR}" ]; then
55
+ echo "Warning: Main directory already exists: ${MAIN_DIR}"
56
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
57
+ echo
58
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
59
+ echo "Exiting without making changes."
60
+ exit 0
61
+ fi
62
+ echo "Removing existing directory..."
63
+ rm -rf "${MAIN_DIR}"
64
+ fi
65
+
66
+ mkdir -p "${MAIN_DIR}"
67
+
68
+ # Find all subdirectories in the source directory
69
+ echo "Searching for subdirectories in: ${SOURCE_DIR}"
70
+ SUBDIRS=($(find "${SOURCE_DIR}" -maxdepth 1 -type d ! -path "${SOURCE_DIR}"))
71
+
72
+ if [ ${#SUBDIRS[@]} -eq 0 ]; then
73
+ echo "Error: No subdirectories found in ${SOURCE_DIR}"
74
+ exit 1
75
+ fi
76
+
77
+ echo "Found ${#SUBDIRS[@]} subdirectory(ies):"
78
+ for subdir in "${SUBDIRS[@]}"; do
79
+ echo " $(basename "${subdir}")"
80
+ done
81
+
82
+ # Process each subdirectory
83
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
84
+ # Extract the basename of the subdirectory
85
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
86
+
87
+ # Find all STL files in this subdirectory
88
+ echo ""
89
+ echo "=== Processing subdirectory: ${SUBDIR_BASENAME} ==="
90
+ echo "Searching for *.stl files in: ${SUBDIR_PATH}"
91
+ STL_FILES=($(find "${SUBDIR_PATH}" -name "*.stl" -type f))
92
+
93
+ if [ ${#STL_FILES[@]} -eq 0 ]; then
94
+ echo "Warning: No STL files found in ${SUBDIR_PATH}, skipping..."
95
+ continue
96
+ fi
97
+
98
+ echo "Found ${#STL_FILES[@]} STL file(s) in ${SUBDIR_BASENAME}:"
99
+ for stl_file in "${STL_FILES[@]}"; do
100
+ echo " $(basename "${stl_file}")"
101
+ done
102
+
103
+ # Process each STL file in this subdirectory
104
+ for STL_PATH in "${STL_FILES[@]}"; do
105
+ # Extract the base name of the STL file (without .stl extension)
106
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
107
+
108
+ # Create simulation directory name using subdirectory basename + STL basename (as subdirectory of MAIN_DIR)
109
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
110
+
111
+ echo ""
112
+ echo "--- Processing STL: ${STL_BASENAME} from ${SUBDIR_BASENAME} ---"
113
+ echo "Creating simulation directory: ${SIM_DIR}"
114
+
115
+ # Check if simulation directory already exists
116
+ if [ -d "${SIM_DIR}" ]; then
117
+ echo "Warning: Simulation directory already exists: ${SIM_DIR}"
118
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
119
+ echo
120
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
121
+ echo "Skipping ${STL_BASENAME} from ${SUBDIR_BASENAME}"
122
+ continue
123
+ fi
124
+ echo "Removing existing directory..."
125
+ rm -rf "${SIM_DIR}"
126
+ fi
127
+
128
+ # Copy template to simulation directory
129
+ echo "Copying template from: ${TEMPLATE_DIR}"
130
+ cp -r "${TEMPLATE_DIR}" "${SIM_DIR}"
131
+
132
+ # Create triSurface directory if it doesn't exist
133
+ TRISURFACE_DIR="${SIM_DIR}/constant/triSurface"
134
+ # mkdir -p "${TRISURFACE_DIR}"
135
+
136
+ # Copy and rename STL file
137
+ CAR_STL_PATH="${TRISURFACE_DIR}/car.stl"
138
+ echo "Copying STL file: ${STL_PATH} -> ${CAR_STL_PATH}"
139
+ cp "${STL_PATH}" "${CAR_STL_PATH}"
140
+
141
+ # Verify the STL file was copied successfully
142
+ if [ ! -f "${CAR_STL_PATH}" ]; then
143
+ echo "Error: Failed to copy STL file to ${CAR_STL_PATH}"
144
+ continue
145
+ fi
146
+
147
+ # Call setup_simulation function from sim.py
148
+ echo "Calling setup_simulation for: ${SIM_DIR}"
149
+ cd "${SCRIPT_DIR}"
150
+
151
+ # Use Python to call the setup_simulation function
152
+ python3 -c "
153
+ import sys
154
+ sys.path.append('${SCRIPT_DIR}')
155
+ from sim import setup_simulation
156
+ import os
157
+
158
+ simdir = '${SIM_DIR}'
159
+ print(f'Setting up simulation for: {simdir}')
160
+
161
+ try:
162
+ setup_simulation(simdir)
163
+ print(f'Successfully set up simulation for: {os.path.basename(simdir)}')
164
+ except Exception as e:
165
+ print(f'Error setting up simulation for {os.path.basename(simdir)}: {e}')
166
+ sys.exit(1)
167
+ "
168
+
169
+ if [ $? -eq 0 ]; then
170
+ echo "✓ Successfully set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
171
+ else
172
+ echo "✗ Failed to set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
173
+ continue
174
+ fi
175
+
176
+ # Print summary information
177
+ echo "Simulation directory created: ${SIM_DIR}"
178
+ echo "STL file location: ${CAR_STL_PATH}"
179
+
180
+ # Check if config file was updated
181
+ CONFIG_FILE="${SIM_DIR}/include/config"
182
+ if [ -f "${CONFIG_FILE}" ]; then
183
+ echo "Configuration file updated: ${CONFIG_FILE}"
184
+
185
+ # Extract and display some key parameters
186
+ echo "Key parameters:"
187
+ grep -E "Aref|vr[1-4]_" "${CONFIG_FILE}" 2>/dev/null || echo " (Could not extract parameters)"
188
+ fi
189
+
190
+ done
191
+ done
192
+
193
+ echo ""
194
+ echo "=== Setup Complete ==="
195
+ echo "Created simulation directories for all STL files in subdirectories of: ${SOURCE_DIR}"
196
+ echo "You can now run OpenFOAM simulations in the created directories."
197
+
198
+ # Optional: List all created simulation directories
199
+ echo ""
200
+ echo "Created simulation directories:"
201
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
202
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
203
+ STL_FILES_IN_SUBDIR=($(find "${SUBDIR_PATH}" -name "*.stl" -type f))
204
+ for STL_PATH in "${STL_FILES_IN_SUBDIR[@]}"; do
205
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
206
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
207
+ if [ -d "${SIM_DIR}" ]; then
208
+ echo " ${SIM_DIR}"
209
+ fi
210
+ done
211
+ done
212
+
213
+ echo ""
214
+ echo "Next steps:"
215
+ echo "1. Navigate to a simulation directory"
216
+ echo "2. Check the mesh quality: checkMesh"
217
+ echo "3. Run the simulation: ./Allrun"
218
+ echo "4. Monitor progress: tail -f log.simpleFoam"
cfd_workflow_20261012/setup_simulation_rebuttal.sh ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # OpenFOAM Simulation Setup Script
4
+ # Usage: ./setup_simulation.sh <xxx>
5
+ # Where xxx is the subdirectory name under the outputs path
6
+ # ./setup_simulation.sh gen_meshes_1002
7
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all
8
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
9
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_512
10
+
11
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal
12
+
13
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_2
14
+
15
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1
16
+
17
+
18
+ set -e # Exit on any error
19
+
20
+ # Check if argument is provided
21
+ if [ $# -ne 1 ]; then
22
+ echo "Usage: $0 <subdirectory_name>"
23
+ echo "Example: $0 gen_meshes_1002"
24
+ exit 1
25
+ fi
26
+
27
+ # Input parameter
28
+ SUBDIR_NAME="$1"
29
+
30
+ # Define paths
31
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
32
+ TEMPLATE_DIR="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template"
33
+ # OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Conditional/train_conditional_CLIPasso"
34
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Unconditional"
35
+
36
+ SOURCE_DIR="${OUTPUT_BASE}/${SUBDIR_NAME}"
37
+
38
+ echo "=== OpenFOAM Simulation Setup ==="
39
+ echo "Subdirectory: ${SUBDIR_NAME}"
40
+ echo "Source directory: ${SOURCE_DIR}"
41
+
42
+ # Check if source directory exists
43
+ if [ ! -d "${SOURCE_DIR}" ]; then
44
+ echo "Error: Source directory does not exist: ${SOURCE_DIR}"
45
+ exit 1
46
+ fi
47
+
48
+ # Check if template directory exists
49
+ if [ ! -d "${TEMPLATE_DIR}" ]; then
50
+ echo "Error: Template directory does not exist: ${TEMPLATE_DIR}"
51
+ echo "Please update TEMPLATE_DIR in the script to point to the correct template location."
52
+ exit 1
53
+ fi
54
+
55
+ # Create main SUBDIR_NAME directory
56
+ MAIN_DIR="${SCRIPT_DIR}/${SUBDIR_NAME}"
57
+ echo "Creating main directory: ${MAIN_DIR}"
58
+
59
+ if [ -d "${MAIN_DIR}" ]; then
60
+ echo "Warning: Main directory already exists: ${MAIN_DIR}"
61
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
62
+ echo
63
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
64
+ echo "Exiting without making changes."
65
+ exit 0
66
+ fi
67
+ echo "Removing existing directory..."
68
+ rm -rf "${MAIN_DIR}"
69
+ fi
70
+
71
+ mkdir -p "${MAIN_DIR}"
72
+
73
+ # Find all subdirectories in the source directory
74
+ echo "Searching for subdirectories in: ${SOURCE_DIR}"
75
+ SUBDIRS=($(find "${SOURCE_DIR}" -maxdepth 1 -type d ! -path "${SOURCE_DIR}"))
76
+
77
+ if [ ${#SUBDIRS[@]} -eq 0 ]; then
78
+ echo "Error: No subdirectories found in ${SOURCE_DIR}"
79
+ exit 1
80
+ fi
81
+
82
+ echo "Found ${#SUBDIRS[@]} subdirectory(ies):"
83
+ for subdir in "${SUBDIRS[@]}"; do
84
+ echo " $(basename "${subdir}")"
85
+ done
86
+
87
+ # Process each subdirectory
88
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
89
+ # Extract the basename of the subdirectory
90
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
91
+
92
+ # Find all STL files in this subdirectory
93
+ echo ""
94
+ echo "=== Processing subdirectory: ${SUBDIR_BASENAME} ==="
95
+ echo "Searching for *_generated_denorm.stl files in: ${SUBDIR_PATH}"
96
+ STL_FILES=($(find "${SUBDIR_PATH}" -name "*_generated_denorm.stl" -type f))
97
+
98
+ if [ ${#STL_FILES[@]} -eq 0 ]; then
99
+ echo "Warning: No STL files found in ${SUBDIR_PATH}, skipping..."
100
+ continue
101
+ fi
102
+
103
+ echo "Found ${#STL_FILES[@]} STL file(s) in ${SUBDIR_BASENAME}:"
104
+ for stl_file in "${STL_FILES[@]}"; do
105
+ echo " $(basename "${stl_file}")"
106
+ done
107
+
108
+ # Process each STL file in this subdirectory
109
+ for STL_PATH in "${STL_FILES[@]}"; do
110
+ # Extract the base name of the STL file (without .stl extension)
111
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
112
+
113
+ # Create simulation directory name using subdirectory basename + STL basename (as subdirectory of MAIN_DIR)
114
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
115
+
116
+ echo ""
117
+ echo "--- Processing STL: ${STL_BASENAME} from ${SUBDIR_BASENAME} ---"
118
+ echo "Creating simulation directory: ${SIM_DIR}"
119
+
120
+ # Check if simulation directory already exists
121
+ if [ -d "${SIM_DIR}" ]; then
122
+ echo "Warning: Simulation directory already exists: ${SIM_DIR}"
123
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
124
+ echo
125
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
126
+ echo "Skipping ${STL_BASENAME} from ${SUBDIR_BASENAME}"
127
+ continue
128
+ fi
129
+ echo "Removing existing directory..."
130
+ rm -rf "${SIM_DIR}"
131
+ fi
132
+
133
+ # Copy template to simulation directory
134
+ echo "Copying template from: ${TEMPLATE_DIR}"
135
+ cp -r "${TEMPLATE_DIR}" "${SIM_DIR}"
136
+
137
+ # Create triSurface directory if it doesn't exist
138
+ TRISURFACE_DIR="${SIM_DIR}/constant/triSurface"
139
+ # mkdir -p "${TRISURFACE_DIR}"
140
+
141
+ # Copy and rename STL file
142
+ CAR_STL_PATH="${TRISURFACE_DIR}/car.stl"
143
+ echo "Copying STL file: ${STL_PATH} -> ${CAR_STL_PATH}"
144
+ cp "${STL_PATH}" "${CAR_STL_PATH}"
145
+
146
+ # Verify the STL file was copied successfully
147
+ if [ ! -f "${CAR_STL_PATH}" ]; then
148
+ echo "Error: Failed to copy STL file to ${CAR_STL_PATH}"
149
+ continue
150
+ fi
151
+
152
+ # Call setup_simulation function from sim.py
153
+ echo "Calling setup_simulation for: ${SIM_DIR}"
154
+ cd "${SCRIPT_DIR}"
155
+
156
+ # Use Python to call the setup_simulation function
157
+ python3 -c "
158
+ import sys
159
+ sys.path.append('${SCRIPT_DIR}')
160
+ from sim import setup_simulation
161
+ import os
162
+
163
+ simdir = '${SIM_DIR}'
164
+ print(f'Setting up simulation for: {simdir}')
165
+
166
+ try:
167
+ setup_simulation(simdir)
168
+ print(f'Successfully set up simulation for: {os.path.basename(simdir)}')
169
+ except Exception as e:
170
+ print(f'Error setting up simulation for {os.path.basename(simdir)}: {e}')
171
+ sys.exit(1)
172
+ "
173
+
174
+ if [ $? -eq 0 ]; then
175
+ echo "✓ Successfully set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
176
+ else
177
+ echo "✗ Failed to set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
178
+ continue
179
+ fi
180
+
181
+ # Print summary information
182
+ echo "Simulation directory created: ${SIM_DIR}"
183
+ echo "STL file location: ${CAR_STL_PATH}"
184
+
185
+ # Check if config file was updated
186
+ CONFIG_FILE="${SIM_DIR}/include/config"
187
+ if [ -f "${CONFIG_FILE}" ]; then
188
+ echo "Configuration file updated: ${CONFIG_FILE}"
189
+
190
+ # Extract and display some key parameters
191
+ echo "Key parameters:"
192
+ grep -E "Aref|vr[1-4]_" "${CONFIG_FILE}" 2>/dev/null || echo " (Could not extract parameters)"
193
+ fi
194
+
195
+ done
196
+ done
197
+
198
+ echo ""
199
+ echo "=== Setup Complete ==="
200
+ echo "Created simulation directories for all STL files in subdirectories of: ${SOURCE_DIR}"
201
+ echo "You can now run OpenFOAM simulations in the created directories."
202
+
203
+ # Optional: List all created simulation directories
204
+ echo ""
205
+ echo "Created simulation directories:"
206
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
207
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
208
+ STL_FILES_IN_SUBDIR=($(find "${SUBDIR_PATH}" -name "*_generated_denorm.stl" -type f))
209
+ for STL_PATH in "${STL_FILES_IN_SUBDIR[@]}"; do
210
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
211
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
212
+ if [ -d "${SIM_DIR}" ]; then
213
+ echo " ${SIM_DIR}"
214
+ fi
215
+ done
216
+ done
217
+
218
+ echo ""
219
+ echo "Next steps:"
220
+ echo "1. Navigate to a simulation directory"
221
+ echo "2. Check the mesh quality: checkMesh"
222
+ echo "3. Run the simulation: ./Allrun"
223
+ echo "4. Monitor progress: tail -f log.simpleFoam"
cfd_workflow_20261012/setup_simulation_single.sh ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # OpenFOAM Simulation Setup Script
4
+ # Usage: ./setup_simulation.sh <xxx>
5
+ # Where xxx is the subdirectory name under the outputs path
6
+ # ./setup_simulation.sh gen_meshes_1002
7
+ # ./setup_simulation_single.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
8
+
9
+
10
+ set -e # Exit on any error
11
+
12
+ # Check if argument is provided
13
+ if [ $# -ne 1 ]; then
14
+ echo "Usage: $0 <subdirectory_name>"
15
+ echo "Example: $0 gen_meshes_1002"
16
+ exit 1
17
+ fi
18
+
19
+ # Input parameter
20
+ SUBDIR_NAME="$1"
21
+
22
+ # Define paths
23
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
24
+ TEMPLATE_DIR="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template"
25
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Conditional/train_conditional_CLIPasso"
26
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Unconditional"
27
+ SOURCE_DIR="${OUTPUT_BASE}/${SUBDIR_NAME}"
28
+
29
+ echo "=== OpenFOAM Simulation Setup ==="
30
+ echo "Subdirectory: ${SUBDIR_NAME}"
31
+ echo "Source directory: ${SOURCE_DIR}"
32
+
33
+ # Check if source directory exists
34
+ if [ ! -d "${SOURCE_DIR}" ]; then
35
+ echo "Error: Source directory does not exist: ${SOURCE_DIR}"
36
+ exit 1
37
+ fi
38
+
39
+ # Check if template directory exists
40
+ if [ ! -d "${TEMPLATE_DIR}" ]; then
41
+ echo "Error: Template directory does not exist: ${TEMPLATE_DIR}"
42
+ echo "Please update TEMPLATE_DIR in the script to point to the correct template location."
43
+ exit 1
44
+ fi
45
+
46
+ # Create main SUBDIR_NAME directory
47
+ MAIN_DIR="${SCRIPT_DIR}/${SUBDIR_NAME}"
48
+ echo "Creating main directory: ${MAIN_DIR}"
49
+
50
+ if [ -d "${MAIN_DIR}" ]; then
51
+ echo "Warning: Main directory already exists: ${MAIN_DIR}"
52
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
53
+ echo
54
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
55
+ echo "Exiting without making changes."
56
+ exit 0
57
+ fi
58
+ echo "Removing existing directory..."
59
+ rm -rf "${MAIN_DIR}"
60
+ fi
61
+
62
+ mkdir -p "${MAIN_DIR}"
63
+
64
+ # Find all subdirectories in the source directory
65
+ echo "Searching for subdirectories in: ${SOURCE_DIR}"
66
+ SUBDIRS=($(find "${SOURCE_DIR}" -maxdepth 1 -type d ! -path "${SOURCE_DIR}"))
67
+
68
+ if [ ${#SUBDIRS[@]} -eq 0 ]; then
69
+ echo "Error: No subdirectories found in ${SOURCE_DIR}"
70
+ exit 1
71
+ fi
72
+
73
+ echo "Found ${#SUBDIRS[@]} subdirectory(ies):"
74
+ for subdir in "${SUBDIRS[@]}"; do
75
+ echo " $(basename "${subdir}")"
76
+ done
77
+
78
+ # Process each subdirectory
79
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
80
+ # Extract the basename of the subdirectory
81
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
82
+
83
+ # Find STL files in this subdirectory (only *416*.stl)
84
+ echo ""
85
+ echo "=== Processing subdirectory: ${SUBDIR_BASENAME} ==="
86
+ echo "Searching for *416*.stl in: ${SUBDIR_PATH}"
87
+ STL_FILES=($(find "${SUBDIR_PATH}" -name "*416*.stl" -type f))
88
+
89
+ if [ ${#STL_FILES[@]} -eq 0 ]; then
90
+ echo "Warning: *416*.stl not found in ${SUBDIR_PATH}, skipping..."
91
+ continue
92
+ fi
93
+
94
+ echo "Found *416*.stl in ${SUBDIR_BASENAME}:"
95
+ for stl_file in "${STL_FILES[@]}"; do
96
+ echo " $(basename "${stl_file}")"
97
+ done
98
+
99
+ # Process each STL file in this subdirectory
100
+ for STL_PATH in "${STL_FILES[@]}"; do
101
+ # Extract the base name of the STL file (without .stl extension)
102
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
103
+
104
+ # Create simulation directory name using subdirectory basename + STL basename (as subdirectory of MAIN_DIR)
105
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
106
+
107
+ echo ""
108
+ echo "--- Processing STL: ${STL_BASENAME} from ${SUBDIR_BASENAME} ---"
109
+ echo "Creating simulation directory: ${SIM_DIR}"
110
+
111
+ # Check if simulation directory already exists
112
+ if [ -d "${SIM_DIR}" ]; then
113
+ echo "Warning: Simulation directory already exists: ${SIM_DIR}"
114
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
115
+ echo
116
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
117
+ echo "Skipping ${STL_BASENAME} from ${SUBDIR_BASENAME}"
118
+ continue
119
+ fi
120
+ echo "Removing existing directory..."
121
+ rm -rf "${SIM_DIR}"
122
+ fi
123
+
124
+ # Copy template to simulation directory
125
+ echo "Copying template from: ${TEMPLATE_DIR}"
126
+ cp -r "${TEMPLATE_DIR}" "${SIM_DIR}"
127
+
128
+ # Create triSurface directory if it doesn't exist
129
+ TRISURFACE_DIR="${SIM_DIR}/constant/triSurface"
130
+ # mkdir -p "${TRISURFACE_DIR}"
131
+
132
+ # Copy and rename STL file
133
+ CAR_STL_PATH="${TRISURFACE_DIR}/car.stl"
134
+ echo "Copying STL file: ${STL_PATH} -> ${CAR_STL_PATH}"
135
+ cp "${STL_PATH}" "${CAR_STL_PATH}"
136
+
137
+ # Verify the STL file was copied successfully
138
+ if [ ! -f "${CAR_STL_PATH}" ]; then
139
+ echo "Error: Failed to copy STL file to ${CAR_STL_PATH}"
140
+ continue
141
+ fi
142
+
143
+ # Call setup_simulation function from sim.py
144
+ echo "Calling setup_simulation for: ${SIM_DIR}"
145
+ cd "${SCRIPT_DIR}"
146
+
147
+ # Use Python to call the setup_simulation function
148
+ python3 -c "
149
+ import sys
150
+ sys.path.append('${SCRIPT_DIR}')
151
+ from sim import setup_simulation
152
+ import os
153
+
154
+ simdir = '${SIM_DIR}'
155
+ print(f'Setting up simulation for: {simdir}')
156
+
157
+ try:
158
+ setup_simulation(simdir)
159
+ print(f'Successfully set up simulation for: {os.path.basename(simdir)}')
160
+ except Exception as e:
161
+ print(f'Error setting up simulation for {os.path.basename(simdir)}: {e}')
162
+ sys.exit(1)
163
+ "
164
+
165
+ if [ $? -eq 0 ]; then
166
+ echo "✓ Successfully set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
167
+ else
168
+ echo "✗ Failed to set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
169
+ continue
170
+ fi
171
+
172
+ # Print summary information
173
+ echo "Simulation directory created: ${SIM_DIR}"
174
+ echo "STL file location: ${CAR_STL_PATH}"
175
+
176
+ # Check if config file was updated
177
+ CONFIG_FILE="${SIM_DIR}/include/config"
178
+ if [ -f "${CONFIG_FILE}" ]; then
179
+ echo "Configuration file updated: ${CONFIG_FILE}"
180
+
181
+ # Extract and display some key parameters
182
+ echo "Key parameters:"
183
+ grep -E "Aref|vr[1-4]_" "${CONFIG_FILE}" 2>/dev/null || echo " (Could not extract parameters)"
184
+ fi
185
+
186
+ done
187
+ done
188
+
189
+ echo ""
190
+ echo "=== Setup Complete ==="
191
+ echo "Created simulation directories for *416*.stl files in subdirectories of: ${SOURCE_DIR}"
192
+ echo "You can now run OpenFOAM simulations in the created directories."
193
+
194
+ # Optional: List all created simulation directories
195
+ echo ""
196
+ echo "Created simulation directories:"
197
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
198
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
199
+ STL_FILES_IN_SUBDIR=($(find "${SUBDIR_PATH}" -name "*416*.stl" -type f))
200
+ for STL_PATH in "${STL_FILES_IN_SUBDIR[@]}"; do
201
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
202
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
203
+ if [ -d "${SIM_DIR}" ]; then
204
+ echo " ${SIM_DIR}"
205
+ fi
206
+ done
207
+ done
208
+
209
+ echo ""
210
+ echo "Next steps:"
211
+ echo "1. Navigate to a simulation directory"
212
+ echo "2. Check the mesh quality: checkMesh"
213
+ echo "3. Run the simulation: ./Allrun"
214
+ echo "4. Monitor progress: tail -f log.simpleFoam"
cfd_workflow_20261012/setup_simulation_single_2.sh ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # OpenFOAM Simulation Setup Script
4
+ # Usage: ./setup_simulation.sh <xxx>
5
+ # Where xxx is the subdirectory name under the outputs path
6
+ # ./setup_simulation.sh gen_meshes_1002
7
+ # ./setup_simulation_single_2.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
8
+ # ./setup_simulation_single_2.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1_ori
9
+ # ./setup_simulation_single_2.sh test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_rebuttal_R1_ori
10
+
11
+
12
+ set -e # Exit on any error
13
+
14
+ # Check if argument is provided
15
+ if [ $# -ne 1 ]; then
16
+ echo "Usage: $0 <subdirectory_name>"
17
+ echo "Example: $0 gen_meshes_1002"
18
+ exit 1
19
+ fi
20
+
21
+ # Input parameter
22
+ SUBDIR_NAME="$1"
23
+
24
+ # Define paths
25
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
26
+ TEMPLATE_DIR="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template"
27
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Conditional/train_conditional_CLIPasso"
28
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Unconditional"
29
+ SOURCE_DIR="${OUTPUT_BASE}/${SUBDIR_NAME}"
30
+
31
+ echo "=== OpenFOAM Simulation Setup ==="
32
+ echo "Subdirectory: ${SUBDIR_NAME}"
33
+ echo "Source directory: ${SOURCE_DIR}"
34
+
35
+ # Check if source directory exists
36
+ if [ ! -d "${SOURCE_DIR}" ]; then
37
+ echo "Error: Source directory does not exist: ${SOURCE_DIR}"
38
+ exit 1
39
+ fi
40
+
41
+ # Check if template directory exists
42
+ if [ ! -d "${TEMPLATE_DIR}" ]; then
43
+ echo "Error: Template directory does not exist: ${TEMPLATE_DIR}"
44
+ echo "Please update TEMPLATE_DIR in the script to point to the correct template location."
45
+ exit 1
46
+ fi
47
+
48
+ # Create main SUBDIR_NAME directory
49
+ MAIN_DIR="${SCRIPT_DIR}/${SUBDIR_NAME}"
50
+ echo "Creating main directory: ${MAIN_DIR}"
51
+
52
+ if [ -d "${MAIN_DIR}" ]; then
53
+ echo "Warning: Main directory already exists: ${MAIN_DIR}"
54
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
55
+ echo
56
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
57
+ echo "Exiting without making changes."
58
+ exit 0
59
+ fi
60
+ echo "Removing existing directory..."
61
+ rm -rf "${MAIN_DIR}"
62
+ fi
63
+
64
+ mkdir -p "${MAIN_DIR}"
65
+
66
+ # Find all subdirectories in the source directory
67
+ echo "Searching for subdirectories in: ${SOURCE_DIR}"
68
+ SUBDIRS=($(find "${SOURCE_DIR}" -maxdepth 1 -type d ! -path "${SOURCE_DIR}"))
69
+
70
+ if [ ${#SUBDIRS[@]} -eq 0 ]; then
71
+ echo "Error: No subdirectories found in ${SOURCE_DIR}"
72
+ exit 1
73
+ fi
74
+
75
+ echo "Found ${#SUBDIRS[@]} subdirectory(ies):"
76
+ for subdir in "${SUBDIRS[@]}"; do
77
+ echo " $(basename "${subdir}")"
78
+ done
79
+
80
+ # Process each subdirectory
81
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
82
+ # Extract the basename of the subdirectory
83
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
84
+
85
+ # Find STL files in this subdirectory (only *original_*.stl)
86
+ echo ""
87
+ echo "=== Processing subdirectory: ${SUBDIR_BASENAME} ==="
88
+ echo "Searching for *original_*.stl in: ${SUBDIR_PATH}"
89
+ STL_FILES=($(find "${SUBDIR_PATH}" -name "*original_*.stl" -type f))
90
+
91
+ if [ ${#STL_FILES[@]} -eq 0 ]; then
92
+ echo "Warning: *original_*.stl not found in ${SUBDIR_PATH}, skipping..."
93
+ continue
94
+ fi
95
+
96
+ echo "Found *original_*.stl in ${SUBDIR_BASENAME}:"
97
+ for stl_file in "${STL_FILES[@]}"; do
98
+ echo " $(basename "${stl_file}")"
99
+ done
100
+
101
+ # Process each STL file in this subdirectory
102
+ for STL_PATH in "${STL_FILES[@]}"; do
103
+ # Extract the base name of the STL file (without .stl extension)
104
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
105
+
106
+ # Create simulation directory name using subdirectory basename + STL basename (as subdirectory of MAIN_DIR)
107
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
108
+
109
+ echo ""
110
+ echo "--- Processing STL: ${STL_BASENAME} from ${SUBDIR_BASENAME} ---"
111
+ echo "Creating simulation directory: ${SIM_DIR}"
112
+
113
+ # Check if simulation directory already exists
114
+ if [ -d "${SIM_DIR}" ]; then
115
+ echo "Warning: Simulation directory already exists: ${SIM_DIR}"
116
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
117
+ echo
118
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
119
+ echo "Skipping ${STL_BASENAME} from ${SUBDIR_BASENAME}"
120
+ continue
121
+ fi
122
+ echo "Removing existing directory..."
123
+ rm -rf "${SIM_DIR}"
124
+ fi
125
+
126
+ # Copy template to simulation directory
127
+ echo "Copying template from: ${TEMPLATE_DIR}"
128
+ cp -r "${TEMPLATE_DIR}" "${SIM_DIR}"
129
+
130
+ # Create triSurface directory if it doesn't exist
131
+ TRISURFACE_DIR="${SIM_DIR}/constant/triSurface"
132
+ # mkdir -p "${TRISURFACE_DIR}"
133
+
134
+ # Copy and rename STL file
135
+ CAR_STL_PATH="${TRISURFACE_DIR}/car.stl"
136
+ echo "Copying STL file: ${STL_PATH} -> ${CAR_STL_PATH}"
137
+ cp "${STL_PATH}" "${CAR_STL_PATH}"
138
+
139
+ # Verify the STL file was copied successfully
140
+ if [ ! -f "${CAR_STL_PATH}" ]; then
141
+ echo "Error: Failed to copy STL file to ${CAR_STL_PATH}"
142
+ continue
143
+ fi
144
+
145
+ # Call setup_simulation function from sim.py
146
+ echo "Calling setup_simulation for: ${SIM_DIR}"
147
+ cd "${SCRIPT_DIR}"
148
+
149
+ # Use Python to call the setup_simulation function
150
+ python3 -c "
151
+ import sys
152
+ sys.path.append('${SCRIPT_DIR}')
153
+ from sim import setup_simulation
154
+ import os
155
+
156
+ simdir = '${SIM_DIR}'
157
+ print(f'Setting up simulation for: {simdir}')
158
+
159
+ try:
160
+ setup_simulation(simdir)
161
+ print(f'Successfully set up simulation for: {os.path.basename(simdir)}')
162
+ except Exception as e:
163
+ print(f'Error setting up simulation for {os.path.basename(simdir)}: {e}')
164
+ sys.exit(1)
165
+ "
166
+
167
+ if [ $? -eq 0 ]; then
168
+ echo "✓ Successfully set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
169
+ else
170
+ echo "✗ Failed to set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
171
+ continue
172
+ fi
173
+
174
+ # Print summary information
175
+ echo "Simulation directory created: ${SIM_DIR}"
176
+ echo "STL file location: ${CAR_STL_PATH}"
177
+
178
+ # Check if config file was updated
179
+ CONFIG_FILE="${SIM_DIR}/include/config"
180
+ if [ -f "${CONFIG_FILE}" ]; then
181
+ echo "Configuration file updated: ${CONFIG_FILE}"
182
+
183
+ # Extract and display some key parameters
184
+ echo "Key parameters:"
185
+ grep -E "Aref|vr[1-4]_" "${CONFIG_FILE}" 2>/dev/null || echo " (Could not extract parameters)"
186
+ fi
187
+
188
+ done
189
+ done
190
+
191
+ echo ""
192
+ echo "=== Setup Complete ==="
193
+ echo "Created simulation directories for *original_*.stl files in subdirectories of: ${SOURCE_DIR}"
194
+ echo "You can now run OpenFOAM simulations in the created directories."
195
+
196
+ # Optional: List all created simulation directories
197
+ echo ""
198
+ echo "Created simulation directories:"
199
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
200
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
201
+ STL_FILES_IN_SUBDIR=($(find "${SUBDIR_PATH}" -name "*original_*.stl" -type f))
202
+ for STL_PATH in "${STL_FILES_IN_SUBDIR[@]}"; do
203
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
204
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
205
+ if [ -d "${SIM_DIR}" ]; then
206
+ echo " ${SIM_DIR}"
207
+ fi
208
+ done
209
+ done
210
+
211
+ echo ""
212
+ echo "Next steps:"
213
+ echo "1. Navigate to a simulation directory"
214
+ echo "2. Check the mesh quality: checkMesh"
215
+ echo "3. Run the simulation: ./Allrun"
216
+ echo "4. Monitor progress: tail -f log.simpleFoam"
cfd_workflow_20261012/setup_simulation_triopt.sh ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # OpenFOAM Simulation Setup Script
4
+ # Usage: ./setup_simulation.sh <xxx>
5
+ # Where xxx is the subdirectory name under the outputs path
6
+ # ./setup_simulation.sh gen_meshes_1002
7
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all
8
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all
9
+ # ./setup_simulation.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_512
10
+
11
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal
12
+
13
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_2
14
+
15
+ # ./setup_simulation_rebuttal.sh test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1
16
+
17
+
18
+ # ./setup_simulation_triopt.sh output
19
+
20
+ set -e # Exit on any error
21
+
22
+ # Check if argument is provided
23
+ if [ $# -ne 1 ]; then
24
+ echo "Usage: $0 <subdirectory_name>"
25
+ echo "Example: $0 gen_meshes_1002"
26
+ exit 1
27
+ fi
28
+
29
+ # Input parameter
30
+ SUBDIR_NAME="$1"
31
+
32
+ # Define paths
33
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
34
+ TEMPLATE_DIR="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template"
35
+ # OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/Diffusion-Conditional/train_conditional_CLIPasso"
36
+ OUTPUT_BASE="/mnt/cvlab/scratch/cvlab/home/hantzhan/Dora/pytorch_lightning/outputs/TripOpt/test-test_900_1e-5"
37
+
38
+ SOURCE_DIR="${OUTPUT_BASE}/${SUBDIR_NAME}"
39
+
40
+ echo "=== OpenFOAM Simulation Setup ==="
41
+ echo "Subdirectory: ${SUBDIR_NAME}"
42
+ echo "Source directory: ${SOURCE_DIR}"
43
+
44
+ # Check if source directory exists
45
+ if [ ! -d "${SOURCE_DIR}" ]; then
46
+ echo "Error: Source directory does not exist: ${SOURCE_DIR}"
47
+ exit 1
48
+ fi
49
+
50
+ # Check if template directory exists
51
+ if [ ! -d "${TEMPLATE_DIR}" ]; then
52
+ echo "Error: Template directory does not exist: ${TEMPLATE_DIR}"
53
+ echo "Please update TEMPLATE_DIR in the script to point to the correct template location."
54
+ exit 1
55
+ fi
56
+
57
+ # Create main SUBDIR_NAME directory
58
+ MAIN_DIR="${SCRIPT_DIR}/${SUBDIR_NAME}"
59
+ echo "Creating main directory: ${MAIN_DIR}"
60
+
61
+ if [ -d "${MAIN_DIR}" ]; then
62
+ echo "Warning: Main directory already exists: ${MAIN_DIR}"
63
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
64
+ echo
65
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
66
+ echo "Exiting without making changes."
67
+ exit 0
68
+ fi
69
+ echo "Removing existing directory..."
70
+ rm -rf "${MAIN_DIR}"
71
+ fi
72
+
73
+ mkdir -p "${MAIN_DIR}"
74
+
75
+ # Find all subdirectories in the source directory
76
+ echo "Searching for subdirectories in: ${SOURCE_DIR}"
77
+ SUBDIRS=($(find "${SOURCE_DIR}" -maxdepth 1 -type d ! -path "${SOURCE_DIR}"))
78
+
79
+ if [ ${#SUBDIRS[@]} -eq 0 ]; then
80
+ echo "Error: No subdirectories found in ${SOURCE_DIR}"
81
+ exit 1
82
+ fi
83
+
84
+ echo "Found ${#SUBDIRS[@]} subdirectory(ies):"
85
+ for subdir in "${SUBDIRS[@]}"; do
86
+ echo " $(basename "${subdir}")"
87
+ done
88
+
89
+ # Process each subdirectory
90
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
91
+ # Extract the basename of the subdirectory
92
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
93
+
94
+ # Find all STL files in this subdirectory
95
+ echo ""
96
+ echo "=== Processing subdirectory: ${SUBDIR_BASENAME} ==="
97
+ echo "Searching for *_optimized_denorm.stl files in: ${SUBDIR_PATH}"
98
+ STL_FILES=($(find "${SUBDIR_PATH}" -name "*_optimized_denorm.stl" -type f))
99
+
100
+ if [ ${#STL_FILES[@]} -eq 0 ]; then
101
+ echo "Warning: No STL files found in ${SUBDIR_PATH}, skipping..."
102
+ continue
103
+ fi
104
+
105
+ echo "Found ${#STL_FILES[@]} STL file(s) in ${SUBDIR_BASENAME}:"
106
+ for stl_file in "${STL_FILES[@]}"; do
107
+ echo " $(basename "${stl_file}")"
108
+ done
109
+
110
+ # Process each STL file in this subdirectory
111
+ for STL_PATH in "${STL_FILES[@]}"; do
112
+ # Extract the base name of the STL file (without .stl extension)
113
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
114
+
115
+ # Create simulation directory name using subdirectory basename + STL basename (as subdirectory of MAIN_DIR)
116
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
117
+
118
+ echo ""
119
+ echo "--- Processing STL: ${STL_BASENAME} from ${SUBDIR_BASENAME} ---"
120
+ echo "Creating simulation directory: ${SIM_DIR}"
121
+
122
+ # Check if simulation directory already exists
123
+ if [ -d "${SIM_DIR}" ]; then
124
+ echo "Warning: Simulation directory already exists: ${SIM_DIR}"
125
+ read -p "Do you want to overwrite it? (y/N): " -n 1 -r
126
+ echo
127
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
128
+ echo "Skipping ${STL_BASENAME} from ${SUBDIR_BASENAME}"
129
+ continue
130
+ fi
131
+ echo "Removing existing directory..."
132
+ rm -rf "${SIM_DIR}"
133
+ fi
134
+
135
+ # Copy template to simulation directory
136
+ echo "Copying template from: ${TEMPLATE_DIR}"
137
+ cp -r "${TEMPLATE_DIR}" "${SIM_DIR}"
138
+
139
+ # Create triSurface directory if it doesn't exist
140
+ TRISURFACE_DIR="${SIM_DIR}/constant/triSurface"
141
+ # mkdir -p "${TRISURFACE_DIR}"
142
+
143
+ # Copy and rename STL file
144
+ CAR_STL_PATH="${TRISURFACE_DIR}/car.stl"
145
+ echo "Copying STL file: ${STL_PATH} -> ${CAR_STL_PATH}"
146
+ cp "${STL_PATH}" "${CAR_STL_PATH}"
147
+
148
+ # Verify the STL file was copied successfully
149
+ if [ ! -f "${CAR_STL_PATH}" ]; then
150
+ echo "Error: Failed to copy STL file to ${CAR_STL_PATH}"
151
+ continue
152
+ fi
153
+
154
+ # Call setup_simulation function from sim.py
155
+ echo "Calling setup_simulation for: ${SIM_DIR}"
156
+ cd "${SCRIPT_DIR}"
157
+
158
+ # Use Python to call the setup_simulation function
159
+ python3 -c "
160
+ import sys
161
+ sys.path.append('${SCRIPT_DIR}')
162
+ from sim import setup_simulation
163
+ import os
164
+
165
+ simdir = '${SIM_DIR}'
166
+ print(f'Setting up simulation for: {simdir}')
167
+
168
+ try:
169
+ setup_simulation(simdir)
170
+ print(f'Successfully set up simulation for: {os.path.basename(simdir)}')
171
+ except Exception as e:
172
+ print(f'Error setting up simulation for {os.path.basename(simdir)}: {e}')
173
+ sys.exit(1)
174
+ "
175
+
176
+ if [ $? -eq 0 ]; then
177
+ echo "✓ Successfully set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
178
+ else
179
+ echo "✗ Failed to set up simulation for: ${STL_BASENAME} from ${SUBDIR_BASENAME}"
180
+ continue
181
+ fi
182
+
183
+ # Print summary information
184
+ echo "Simulation directory created: ${SIM_DIR}"
185
+ echo "STL file location: ${CAR_STL_PATH}"
186
+
187
+ # Check if config file was updated
188
+ CONFIG_FILE="${SIM_DIR}/include/config"
189
+ if [ -f "${CONFIG_FILE}" ]; then
190
+ echo "Configuration file updated: ${CONFIG_FILE}"
191
+
192
+ # Extract and display some key parameters
193
+ echo "Key parameters:"
194
+ grep -E "Aref|vr[1-4]_" "${CONFIG_FILE}" 2>/dev/null || echo " (Could not extract parameters)"
195
+ fi
196
+
197
+ done
198
+ done
199
+
200
+ echo ""
201
+ echo "=== Setup Complete ==="
202
+ echo "Created simulation directories for all STL files in subdirectories of: ${SOURCE_DIR}"
203
+ echo "You can now run OpenFOAM simulations in the created directories."
204
+
205
+ # Optional: List all created simulation directories
206
+ echo ""
207
+ echo "Created simulation directories:"
208
+ for SUBDIR_PATH in "${SUBDIRS[@]}"; do
209
+ SUBDIR_BASENAME=$(basename "${SUBDIR_PATH}")
210
+ STL_FILES_IN_SUBDIR=($(find "${SUBDIR_PATH}" -name "*_optimized_denorm.stl" -type f))
211
+ for STL_PATH in "${STL_FILES_IN_SUBDIR[@]}"; do
212
+ STL_BASENAME=$(basename "${STL_PATH}" .stl)
213
+ SIM_DIR="${MAIN_DIR}/${SUBDIR_BASENAME}_${STL_BASENAME}"
214
+ if [ -d "${SIM_DIR}" ]; then
215
+ echo " ${SIM_DIR}"
216
+ fi
217
+ done
218
+ done
219
+
220
+ echo ""
221
+ echo "Next steps:"
222
+ echo "1. Navigate to a simulation directory"
223
+ echo "2. Check the mesh quality: checkMesh"
224
+ echo "3. Run the simulation: ./Allrun"
225
+ echo "4. Monitor progress: tail -f log.simpleFoam"
cfd_workflow_20261012/sim.py ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilities for the OpenFOAM simulation.
3
+
4
+ Also look into /openfoam and oclerc/improved_car_dataset/Preprocessing
5
+ """
6
+
7
+ import os, os.path
8
+ import shutil
9
+ import re
10
+
11
+ import trimesh
12
+ import numpy as np
13
+
14
+ RE_FLOAT = '-?[0-9]+\.?[0-9]*' # signed float
15
+ RE_VECTOR = f'\(\s*{RE_FLOAT}\s*{RE_FLOAT}\s*{RE_FLOAT}\s*\)' # 3d vector of signed floats
16
+
17
+ CONFIG_FILE = "include/config"
18
+ CAR_STL_FILE = "constant/triSurface/car.stl"
19
+
20
+
21
+ ####################################################################################################
22
+ # Simulation setup
23
+ ####################################################################################################
24
+
25
+ def find_highest_point(mesh, epsilon=0.05):
26
+ """Find point close to max height and the further front."""
27
+ height = mesh.bounds[1, 2]
28
+ close_p = mesh.vertices[:,2] > height - epsilon
29
+ verts = mesh.vertices[close_p]
30
+ return verts[verts[:,0].argmin()]
31
+
32
+ def get_vr4(mesh):
33
+ # From DRIVAER template
34
+ _vr4_min, _vr4_max = np.array([3.2, -1., -0.3]), np.array([6.2, 1.0, 1.0])
35
+ vr4_min, vr4_max = _vr4_min.copy(), _vr4_max.copy()
36
+
37
+ # x: start on highest point, then end on offset to the car
38
+ vr4_min[0] = find_highest_point(mesh)[0]
39
+ x_offset = 2.395022 # from DRIVAER
40
+ vr4_max[0] = mesh.bounds[1,0] + x_offset
41
+
42
+ # y: resize based on ratio to DRIVAER
43
+ ratio_y = mesh.extents[1] / 2.02998 # from DRIVAER
44
+ vr4_y = (_vr4_max[1] - _vr4_min[1]) * ratio_y
45
+ vr4_min[1], vr4_max[1] = -vr4_y / 2, vr4_y / 2
46
+
47
+ # z: to car height
48
+ vr4_max[2] = mesh.bounds[1,2]
49
+
50
+ return vr4_min, vr4_max
51
+
52
+ def get_vr3(mesh, vr4):
53
+ # From DRIVAER template
54
+ _vr3_min, _vr3_max = np.array([2.5, -1.5, -0.3]), np.array([7.5, 1.5, 1.4])
55
+ vr3_min, vr3_max = _vr3_min.copy(), _vr3_max.copy()
56
+
57
+ # x: start on highest point, then constant offset to vr4
58
+ vr3_min[0] = find_highest_point(mesh)[0]
59
+ x_offset = 1.3 # from DRIVAER
60
+ vr3_max[0] = vr4[1][0] + x_offset
61
+
62
+ # y: constant offset to vr4
63
+ y_offset = 0.5
64
+ vr3_min[1] = vr4[0][1] - y_offset
65
+ vr3_max[1] = vr4[1][1] + y_offset
66
+
67
+ # z: height of car + constant offset
68
+ z_offset = 0.300101 # from DRIVAER
69
+ vr3_max[2] = mesh.bounds[1,2] + z_offset
70
+
71
+ return vr3_min, vr3_max
72
+
73
+ def get_vr2(mesh, vr3):
74
+ # From DRIVAER template
75
+ _vr2_min, _vr2_max = np.array([-2.0, -2.0, -0.3]), np.array([9.0, 2.0, 1.7])
76
+ vr2_min, vr2_max = _vr2_min.copy(), _vr2_max.copy()
77
+
78
+ # x: same offset to front and to vr3
79
+ front_x_offset = 1.192151 # between DRIVAER and vr2
80
+ back_x_offset = 1.5 # between vr3 and 2
81
+ vr2_min[0] = mesh.bounds[0,0] - front_x_offset
82
+ vr2_max[0] = vr3[1][0] + back_x_offset
83
+
84
+ # y: constant offset to vr3
85
+ y_offset = 0.5
86
+ vr2_min[1] = vr3[0][1] - y_offset
87
+ vr2_max[1] = vr3[1][1] + y_offset
88
+
89
+ # z: constant offset to vr3
90
+ z_offset = 0.3
91
+ vr2_max[2] = vr3[1][2] + z_offset
92
+
93
+ return vr2_min, vr2_max
94
+
95
+ def get_vr1(mesh):
96
+ # From DRIVAER template
97
+ _vr1_min, _vr1_max = np.array([-7.5, -3.0, -0.3]), np.array([25.0, 3.0, 3.7])
98
+ vr1_min, vr1_max = _vr1_min.copy(), _vr1_max.copy()
99
+
100
+ # Fixed
101
+ return vr1_min, vr1_max
102
+
103
+ def get_all_vr(mesh):
104
+ vr4_min, vr4_max = get_vr4(mesh)
105
+ vr3_min, vr3_max = get_vr3(mesh, (vr4_min, vr4_max))
106
+ vr2_min, vr2_max = get_vr2(mesh, (vr3_min, vr3_max))
107
+ vr1_min, vr1_max = get_vr1(mesh)
108
+ return (vr4_min, vr4_max), (vr3_min, vr3_max), (vr2_min, vr2_max), (vr1_min, vr1_max)
109
+
110
+
111
+ def find_Aref(mesh, ray_per_dim=512):
112
+ """Approximate frontal area by intersecting rays."""
113
+ y_min, y_max = mesh.bounds[:,1]
114
+ z_min, z_max = mesh.bounds[:,2]
115
+ yz_area = (y_max - y_min) * (z_max - z_min)
116
+ YZ = np.stack(np.meshgrid(
117
+ np.linspace(y_min, y_max, ray_per_dim),
118
+ np.linspace(z_min, z_max, ray_per_dim),
119
+ ), axis=-1).reshape(-1, 2)
120
+ YZ = np.concatenate([np.full_like(YZ[:,0:1], -2), YZ], axis=1)
121
+
122
+ intersections = mesh.ray.intersects_any(YZ, [[1,0,0]]* len(YZ))
123
+ return yz_area * intersections.mean()
124
+
125
+
126
+ def vector2str(vector):
127
+ return " ".join(["("] + [f"{x:.2f}" for x in vector]+ [")"])
128
+
129
+ def edit_config(configpath, aref, vr1_min, vr1_max, vr2_min, vr2_max, vr3_min, vr3_max, vr4_min, vr4_max):
130
+ with open(configpath, 'r') as f:
131
+ content = f.read()
132
+
133
+ # Automatic edition of Aref
134
+ content = re.sub(f'Aref\s*{RE_FLOAT}\s*;', f'Aref {aref:.6f};', content)
135
+
136
+ # Automatic edition of vri's
137
+ content = re.sub(f'vr1_min\s*{RE_VECTOR}\s*;', f'vr1_min {vector2str(vr1_min)};', content)
138
+ content = re.sub(f'vr1_max\s*{RE_VECTOR}\s*;', f'vr1_max {vector2str(vr1_max)};', content)
139
+
140
+ content = re.sub(f'vr2_min\s*{RE_VECTOR}\s*;', f'vr2_min {vector2str(vr2_min)};', content)
141
+ content = re.sub(f'vr2_max\s*{RE_VECTOR}\s*;', f'vr2_max {vector2str(vr2_max)};', content)
142
+
143
+ content = re.sub(f'vr3_min\s*{RE_VECTOR}\s*;', f'vr3_min {vector2str(vr3_min)};', content)
144
+ content = re.sub(f'vr3_max\s*{RE_VECTOR}\s*;', f'vr3_max {vector2str(vr3_max)};', content)
145
+
146
+ content = re.sub(f'vr4_min\s*{RE_VECTOR}\s*;', f'vr4_min {vector2str(vr4_min)};', content)
147
+ content = re.sub(f'vr4_max\s*{RE_VECTOR}\s*;', f'vr4_max {vector2str(vr4_max)};', content)
148
+
149
+ with open(configpath, 'w') as f:
150
+ f.write(content)
151
+
152
+
153
+ def copy_template(dst, src="/mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/template/"):
154
+ shutil.copytree(src, dst)
155
+
156
+
157
+ def setup_simulation(simdir, aref_ray=512):
158
+ """Correctly transform the car and compute the config parameters."""
159
+ # 1. Verify the existence of a mesh
160
+ if not os.path.isfile(os.path.join(simdir, CAR_STL_FILE)):
161
+ print(f"File does not exist! ({simdir}) Skipping...")
162
+ return
163
+ car = trimesh.load(os.path.join(simdir, CAR_STL_FILE))
164
+
165
+ # 2. Frontal area
166
+ aref_pred = find_Aref(car, ray_per_dim=aref_ray)
167
+
168
+ # 3. Refinement regions
169
+ (vr4_min, vr4_max), (vr3_min, vr3_max), (vr2_min, vr2_max), (vr1_min, vr1_max) = get_all_vr(car)
170
+
171
+ # Edit the config file
172
+ edit_config(os.path.join(simdir, "include/config"),
173
+ aref_pred,
174
+ vr1_min, vr1_max, vr2_min, vr2_max,
175
+ vr3_min, vr3_max, vr4_min, vr4_max)
176
+
177
+
178
+
179
+
180
+ ####################################################################################################
181
+ # Utilities
182
+ ####################################################################################################
183
+
184
+ def get_Cd_sim(simdir, itercheck=2500, average=1000, load_always=False):
185
+ """
186
+ Get the drag coefficient from the simulation directory.
187
+
188
+ itercheck: int (optional)
189
+ If given, will verify if the max iteration is the given int.
190
+ average: int
191
+ If not None, will return the average Cd over the last `average` iters.
192
+ load_always: bool
193
+ If True, will load the data even if the simulation is not finished.
194
+
195
+ If return value is negative, then an error has been raised:
196
+ -1: Unknown error.
197
+ -2: Experiment is not finished.
198
+ -3: Problem in loading the force coeff data.
199
+ """
200
+ try:
201
+ if not os.path.isdir(os.path.join(simdir, "postProcessing")):
202
+ print(f"{simdir} might not be finished (no 'postProcessing' folder).")
203
+ return -2
204
+
205
+ # Get data in tabular form
206
+ try:
207
+ data = []
208
+ with open(os.path.join(simdir, "postProcessing/car/0/forceCoeffs.dat")) as file:
209
+ for line in file:
210
+ if line[0] == '#':
211
+ # The last commented line should correspond to column names
212
+ names = line[1:].split()
213
+ else:
214
+ data.append(line.split())
215
+ data = np.array(data).astype(float)
216
+
217
+ if itercheck is not None and len(data)-1 != itercheck:
218
+ print(f"WARNING ({simdir}): iteration number is incorrect ({len(data)-1}!={itercheck})!")
219
+ if not load_always:
220
+ return -2
221
+
222
+ except ValueError as err:
223
+ print(f"Cannot load data from {simdir}: {err}")
224
+ return -3
225
+
226
+ # Extract the drag coeff (optionally average over the last iters)
227
+ col = names.index('Cd') if 'Cd' in names else 2
228
+ if average is not None:
229
+ cd = data[-average:, col].mean()
230
+ else:
231
+ cd = data[:, col]
232
+ return cd
233
+
234
+ except Exception as err:
235
+ print(f"Unknown exception for {simdir}: {err}")
236
+ return -1
cfd_workflow_20261012/sim_run.sh ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MAINDIR="$1"
2
+ cd $MAINDIR
3
+ for expdir in $(ls $1); do
4
+ cd $expdir
5
+
6
+ mkdir -p logs
7
+ # Verify if already finished by checking the plotting folder
8
+ ITERMAX=$(grep -o "endTime *[0-9]* *;" system/controlDict | grep -o "[0-9]*")
9
+ if [[ -d images ]] && [[ -d $ITERMAX ]] && [[ -f simulation.done ]]
10
+ then
11
+ echo "Experiment at $expdir is already finished! Passing..."
12
+ else
13
+ bash run_all_shm.sh 2>&1 | tee -a logs/log.ALL
14
+ fi
15
+
16
+ cd $MAINDIR
17
+ done
18
+
19
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim1 # 1
20
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim2 # 2
21
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim3 # 3
22
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim4 # 4
23
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim5 # 5
24
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim6 # 6
25
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim7 # 7
26
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim8 # 8
27
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim9 # 9
28
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim10 # 10
29
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim11 # 11
30
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim12 # 12
31
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim13 # 13
32
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim14 # 14
33
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim15 # 15
34
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim16 # 16
35
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim17 # 17
36
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim18 # 18
37
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim19 # 19
38
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim20 # 20
39
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim21 # 21
40
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim22 # 22
41
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim23 # 23
42
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim24 # 24
43
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim25 # 25
44
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_sim26 # 26
45
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_27 # 1
46
+
47
+
48
+
49
+
50
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002
51
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002_2
52
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_sim1
53
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_sim2
54
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_sim3
55
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_optoutput_splatent_sim1
56
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_optoutput_splatent_sim2
57
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1006_optoutput_splatent_sim3
58
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_ground_sim1
59
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_ground_sim2
60
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_ground_1002_sim1
61
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_ground_1002_zeroliftlateral_sim1
62
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_0.1_1002_sim1
63
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_0.1_moveground_1002_sim1
64
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_0.3_1002_sim1
65
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002_sim_E_S_WW_WM_615 13
66
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002_sim_N_S_WW_WM_256 14
67
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1002_sim_N_S_WWS_WM_172 15 slow
68
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_0.1_1002_sim2 # 2
69
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_0.3_1002_sim2 # 3
70
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1007_ground_1002_sim2 # 4
71
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim1 # 1
72
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim2 # 5
73
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008 # 7
74
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim3 # 8
75
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim4 # 9
76
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim5 # 10
77
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim6 # 11
78
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim7 # 12
79
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim8 # 6
80
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim9 #
81
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim10 #
82
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1008_sim11 #
83
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground # 1
84
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim1 # 2
85
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim2 # 3
86
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim3 # 4
87
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim4 # 5
88
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim5 # 6
89
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim6 # 7
90
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim7 # 8
91
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim8 # 9
92
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim9 # 10
93
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_ground_sim10 # 11
94
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_318 # 12
95
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_318_sim1 # 13
96
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_318_sim2 # 14
97
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1010_318_sim3 # 15
98
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch # 14
99
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim1 # 1
100
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim2 # 2
101
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim3 # 3
102
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim4 # 4
103
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim5 # 5
104
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim6 # 6
105
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim7 # 7
106
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim8 # 8
107
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim9 # 9
108
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim10 # 10
109
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim11 # 11
110
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim12 # 12
111
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1011_batch_sim13 # 13
112
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim1 # 6
113
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim1 # 8
114
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim2 # 9
115
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim2 # 10
116
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim3 # 11
117
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim3 # 12
118
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim4 # 13
119
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim4 # 14
120
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim5 # 1
121
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim5 # 2
122
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim6 # 3
123
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim6 # 4
124
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_base_sim7 # 5
125
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim7 # 6
126
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim1 # 16
127
+
128
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim3 # 20
129
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim6 # 27
130
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim7 # 29
131
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim8 # 30
132
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim8 # 7
133
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim9 # 8
134
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim9 # 10
135
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim10 # 11
136
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim10 # 12
137
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim10 # 13
138
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim11 # 14
139
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim11 # 1
140
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim11 # 2
141
+
142
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim1 # 17
143
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim2 # 18
144
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim2 # 19
145
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim3 # 21
146
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim4 # 22
147
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim4 # 23
148
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim5 # 24
149
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim5 # 25
150
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim6 # 26
151
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim7 # 28
152
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim9 # 9
153
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim8 # 15
154
+
155
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim12 # 3
156
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim12 # 4
157
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim12 # 5
158
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim13 # 6
159
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim13 # 27
160
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim13 # 28
161
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim14 # 29
162
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim14 # 30
163
+
164
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim14 # 1
165
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim15 # 8
166
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim15 # 10
167
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim15 # 11
168
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim16 # 13
169
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim16 # 14
170
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim16 # 16
171
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim17 # 20
172
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim17 # 6
173
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim17 # 7
174
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim18 # 27
175
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim18 # 29
176
+
177
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim18 # 2
178
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim19 # 3
179
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim19 # 4
180
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim19 # 5
181
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim20 # 12
182
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim20 # 19
183
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim20 # 21
184
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim21 # 22
185
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim21 # 23
186
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_fine_batch_144_15_sim21 # 24
187
+
188
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim22 # 17
189
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim22 # 25
190
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim23 # 26
191
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim23 # 28
192
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim24 # 29
193
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim24 # 30
194
+
195
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim25 # 1
196
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim25 # 7
197
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim26 # 8
198
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim26 # 9
199
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim27 # 10
200
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim27 # 11
201
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim28 # 18
202
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim28 # 20
203
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim29 # 21
204
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim29 # 22
205
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim30 # 23
206
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim30 # 24
207
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_base_sim31 # 25
208
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/gen_meshes_1012_sep_batch_144_15_sim31 # 27
209
+
210
+
211
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_1
212
+
213
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_512
214
+
215
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all
216
+
217
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_1
218
+
219
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_2
220
+
221
+
222
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_3
223
+
224
+
225
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_4
226
+
227
+
228
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_5
229
+
230
+
231
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_6
232
+
233
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_7
234
+
235
+
236
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_8
237
+
238
+
239
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_9
240
+
241
+
242
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_10
243
+
244
+
245
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_11
246
+
247
+
248
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_12
249
+
250
+
251
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_13
252
+
253
+
254
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_14
255
+
256
+
257
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_15
258
+
259
+
260
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_16
261
+
262
+
263
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_17
264
+
265
+
266
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_18
267
+
268
+
269
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_19
270
+
271
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_20
272
+
273
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_ori_2
274
+
275
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_ori_1
276
+
277
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1_1
278
+
279
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_drivaernet_oridrag_w_phys_all_rebuttal_R1_ori
280
+
281
+
282
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/test_noreseed_myvae_100k_opt_diffout_givenshape_oridrag_w_phys_all_rebuttal_R1_1
283
+
284
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/triopt_output_1800_1
285
+
286
+ # bash sim_run.sh /mnt/cvlab/scratch/cvlab/home/hantzhan/cfd_workflow/triopt_output_900_1