|
183 | 183 | "category": "Acoustic Sources", |
184 | 184 | "explanation": ("Dimension-specific support types. Pulse type in {1,2,3,4}. Non-planar sources require foc_length and aperture."), |
185 | 185 | }, |
| 186 | + # IC Extrusion |
| 187 | + "check_ic_extrusion": { |
| 188 | + "title": "IC Extrusion File Parameters", |
| 189 | + "category": "IC Extrusion", |
| 190 | + "explanation": "Extrusion hcids (170, 270, 271, 272, 370) read initial condition data from files. Both files_dir and file_extension must be set.", |
| 191 | + }, |
186 | 192 | # Post-Processing |
187 | 193 | "check_vorticity": { |
188 | 194 | "title": "Vorticity Output", |
@@ -2037,6 +2043,26 @@ def check_geometry_precision_simulation(self): |
2037 | 2043 |
|
2038 | 2044 | # Main Validation Entry Points |
2039 | 2045 |
|
| 2046 | + def check_ic_extrusion(self): |
| 2047 | + """Checks that files_dir and file_extension are set for extrusion hcids.""" |
| 2048 | + extrusion_hcids = {170, 270, 271, 272, 370} |
| 2049 | + num_patches = self.get("num_patches", 0) |
| 2050 | + if not self._is_numeric(num_patches) or num_patches <= 0: |
| 2051 | + return |
| 2052 | + |
| 2053 | + for i in range(1, num_patches + 1): |
| 2054 | + hcid = self.get(f"patch_icpp({i})%hcid") |
| 2055 | + if hcid not in extrusion_hcids: |
| 2056 | + continue |
| 2057 | + self.prohibit( |
| 2058 | + not self.is_set("files_dir"), |
| 2059 | + f"patch_icpp({i})%hcid={hcid} requires files_dir to be set", |
| 2060 | + ) |
| 2061 | + self.prohibit( |
| 2062 | + not self.is_set("file_extension"), |
| 2063 | + f"patch_icpp({i})%hcid={hcid} requires file_extension to be set", |
| 2064 | + ) |
| 2065 | + |
2040 | 2066 | def validate_common(self): |
2041 | 2067 | """Validate parameters common to all stages""" |
2042 | 2068 | self.check_parameter_types() # Type validation first |
@@ -2101,6 +2127,7 @@ def validate_pre_process(self): |
2101 | 2127 | self.check_patch_within_domain() |
2102 | 2128 | self.check_velocity_components() |
2103 | 2129 | self.check_bc_patches() |
| 2130 | + self.check_ic_extrusion() |
2104 | 2131 |
|
2105 | 2132 | def validate_post_process(self): |
2106 | 2133 | """Validate post-process-specific parameters""" |
|
0 commit comments