From f496b0670878168219d957f6435a35217f0967ca Mon Sep 17 00:00:00 2001 From: tmeunier Date: Mon, 10 Feb 2025 14:11:04 +0100 Subject: [PATCH 1/4] Adapt units symbol for temperature difference --- tests/test_resultinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_resultinfo.py b/tests/test_resultinfo.py index dd618b7d64b..67e54c7b408 100644 --- a/tests/test_resultinfo.py +++ b/tests/test_resultinfo.py @@ -124,7 +124,7 @@ def test_print_available_result_with_qualifiers(cfx_heating_coil, server_type): Number of components: 1 Dimensionality: scalar Homogeneity: specific_heat -Units: J/kg*K^-1 +Units: J/kg*dK^-1 Location: Nodal Available qualifier labels:""" # noqa: E501 ref2 = "'phase': 2" From 9214732ec4e3044e57b516afd4e357ba24b07647 Mon Sep 17 00:00:00 2001 From: tmeunier Date: Tue, 11 Feb 2025 11:08:51 +0100 Subject: [PATCH 2/4] Adapt unit test for unit system name --- tests/test_resultinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_resultinfo.py b/tests/test_resultinfo.py index 67e54c7b408..1ba6a7bff2a 100644 --- a/tests/test_resultinfo.py +++ b/tests/test_resultinfo.py @@ -149,7 +149,7 @@ def test_print_available_result_with_qualifiers(cfx_heating_coil, server_type): def test_print_result_info_with_qualifiers(cfx_heating_coil, server_type): model = Model(cfx_heating_coil(server=server_type), server=server_type) ref = """Static analysis -Unit system: SI: m, kg, N, s, V, A, K +Unit system: Custom: m, kg, N, s, V, A, K Physics Type: Fluid Available results: - specific_heat: Nodal Specific Heat From 3ca30c35bfee013947a9f240d1017edc81389d80 Mon Sep 17 00:00:00 2001 From: tmeunier Date: Tue, 11 Feb 2025 11:38:09 +0100 Subject: [PATCH 3/4] Handle retro compatibility --- tests/test_resultinfo.py | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/test_resultinfo.py b/tests/test_resultinfo.py index 1ba6a7bff2a..1cff163c237 100644 --- a/tests/test_resultinfo.py +++ b/tests/test_resultinfo.py @@ -30,6 +30,7 @@ SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_1, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0, + SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0, ) if SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0: @@ -117,7 +118,8 @@ def test_repr_available_results_list(model): ) def test_print_available_result_with_qualifiers(cfx_heating_coil, server_type): model = Model(cfx_heating_coil(server=server_type), server=server_type) - ref = """DPF Result + if SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0: + ref = """DPF Result ---------- specific_heat Operator name: "CP" @@ -126,6 +128,17 @@ def test_print_available_result_with_qualifiers(cfx_heating_coil, server_type): Homogeneity: specific_heat Units: J/kg*dK^-1 Location: Nodal +Available qualifier labels:""" # noqa: E501 + else: + ref = """DPF Result +---------- +specific_heat +Operator name: "CP" +Number of components: 1 +Dimensionality: scalar +Homogeneity: specific_heat +Units: J/kg*K^-1 +Location: Nodal Available qualifier labels:""" # noqa: E501 ref2 = "'phase': 2" if SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0: @@ -148,7 +161,28 @@ def test_print_available_result_with_qualifiers(cfx_heating_coil, server_type): ) def test_print_result_info_with_qualifiers(cfx_heating_coil, server_type): model = Model(cfx_heating_coil(server=server_type), server=server_type) - ref = """Static analysis + if SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0: + ref = """Static analysis +Unit system: Custom: m, kg, N, s, V, A, K +Physics Type: Fluid +Available results: + - specific_heat: Nodal Specific Heat + - epsilon: Nodal Epsilon + - enthalpy: Nodal Enthalpy + - turbulent_kinetic_energy: Nodal Turbulent Kinetic Energy + - thermal_conductivity: Nodal Thermal Conductivity + - dynamic_viscosity: Nodal Dynamic Viscosity + - turbulent_viscosity: Nodal Turbulent Viscosity + - static_pressure: Nodal Static Pressure + - total_pressure: Nodal Total Pressure + - density: Nodal Density + - entropy: Nodal Entropy + - temperature: Nodal Temperature + - total_temperature: Nodal Total Temperature + - velocity: Nodal Velocity +Available qualifier labels:""" # noqa + else: + ref = """Static analysis Unit system: Custom: m, kg, N, s, V, A, K Physics Type: Fluid Available results: From eb52b110c401ab0a09d4f40eb7687ad61027b0fe Mon Sep 17 00:00:00 2001 From: tmeunier Date: Mon, 10 Mar 2025 15:36:06 +0100 Subject: [PATCH 4/4] Fix reference --- tests/test_resultinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_resultinfo.py b/tests/test_resultinfo.py index 1cff163c237..b86bc8c11b8 100644 --- a/tests/test_resultinfo.py +++ b/tests/test_resultinfo.py @@ -183,7 +183,7 @@ def test_print_result_info_with_qualifiers(cfx_heating_coil, server_type): Available qualifier labels:""" # noqa else: ref = """Static analysis -Unit system: Custom: m, kg, N, s, V, A, K +Unit system: SI: m, kg, N, s, V, A, K Physics Type: Fluid Available results: - specific_heat: Nodal Specific Heat