Skip to content

Commit 1a0522d

Browse files
committed
Fix unit test
1 parent 7c56f46 commit 1a0522d

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

tests/simulation/translator/data/simulation_stopping_criterion.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"value": 0.0,
219219
"units": "m"
220220
},
221-
"private_attribute_id": "wallBC"
221+
"private_attribute_id": "wallBC1"
222222
},
223223
{
224224
"type": "SlipWall",
@@ -247,6 +247,32 @@
247247
]
248248
},
249249
"name": "Freestream"
250+
},
251+
{
252+
"type": "Wall",
253+
"entities": {
254+
"stored_entities": [
255+
{
256+
"private_attribute_entity_type_name": "Surface",
257+
"name": "4",
258+
"private_attribute_sub_components": []
259+
}
260+
]
261+
},
262+
"private_attribute_id": "wallBC",
263+
"name": "wing",
264+
"use_wall_function": false,
265+
"heat_spec": {
266+
"value": {
267+
"value": 0.0,
268+
"units": "W/m**2"
269+
},
270+
"type_name": "HeatFlux"
271+
},
272+
"roughness_height": {
273+
"value": 0.0,
274+
"units": "m"
275+
}
250276
}
251277
],
252278
"time_stepping": {

tests/simulation/translator/ref/Flow360_om6wing_stopping_criterion_and_moving_statistic.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
},
1111
"3": {
1212
"type": "Freestream"
13+
},
14+
"4": {
15+
"heatFlux": 0.0,
16+
"roughnessHeight": 0.0,
17+
"type": "NoSlipWall"
1318
}
1419
},
1520
"freestream": {
@@ -97,7 +102,7 @@
97102
},
98103
"runControl": {
99104
"externalProcessMonitorOutput": true,
100-
"monitorProcessorHash": "bc5ac70ee2692e2a051b0867dad9c0057ac1b6d58995389d41ca850fb6c39b5b",
105+
"monitorProcessorHash": "396038f897af72de2eb89b96a33c0d8d954bff330ce054f0714b06fe669c0744",
101106
"stoppingCriteria": [
102107
{
103108
"monitoredColumn": "point_legacy1_Point1_Helicity_mean",

tests/simulation/translator/test_solver_translator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def test_om6wing_with_stopping_criterion_and_moving_statistic(get_om6Wing_tutori
472472
monitor_field=mass_flow_rate,
473473
tolerance_window_size=3,
474474
)
475-
wallBC = Wall(name="wing", surfaces=[Surface(name="1")], private_attribute_id="wallBC")
475+
wallBC = Wall(name="wing", surfaces=[Surface(name="4")], private_attribute_id="wallBC")
476476
force_output = ForceOutput(
477477
name="force_wallBC",
478478
models=[wallBC],
@@ -486,10 +486,11 @@ def test_om6wing_with_stopping_criterion_and_moving_statistic(get_om6Wing_tutori
486486
monitor_output=force_output,
487487
monitor_field="CL",
488488
)
489+
params.models.append(wallBC)
489490
params.run_control = RunControl(stopping_criteria=[criterion1, criterion2, criterion3])
490491
params.outputs.extend([probe_output, mass_flow_rate_integral, force_output])
491492
translate_and_compare(
492-
get_om6Wing_tutorial_param,
493+
params,
493494
mesh_unit=0.8059 * u.m,
494495
ref_json_file="Flow360_om6wing_stopping_criterion_and_moving_statistic.json",
495496
debug=False,

0 commit comments

Comments
 (0)