Added thermal conductivity

This commit is contained in:
rbrugo authored and Mateusz Pusz committed 2020-04-10 16:36:08 +02:00
1 parent 017e88ca28
commit 15138286e5
5 files changed
+65

No files matched your search

@@ -268,6 +268,12 @@ TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]")
CHECK(fmt::format("{:%Q %Aq}", 1q_J_per_kg_K) == "1 J K^-1 kg^-1");
}
SECTION("thermal conductivity")
{
CHECK(fmt::format("{}", 1q_W_per_m_K) == "1 W ⋅ m⁻¹ ⋅ K⁻¹");
CHECK(fmt::format("{:%Q %Aq}", 1q_W_per_m_K) == "1 W m^-1 K^-1");
}
SECTION("incoherent units with powers")
{
CHECK(fmt::format("{}", 1q_mi * 1q_mi * 1q_mi) == "1 [15900351812136/3814697265625 × 10⁹] m³");
+5
View File
@@ -322,4 +322,9 @@ static_assert(1q_J_per_K * 1q_K == 1q_s * 1q_N * 1q_m_per_s);
static_assert(detail::unit_text<dim_heat_capacity, joule_per_kelvin>() == "J/K");
static_assert(detail::unit_text<dim_specific_heat_capacity, joule_per_kilogram_kelvin>() == basic_symbol_text("J ⋅ K⁻¹ ⋅ kg⁻¹", "J kg^-1 K^-1"));
// thermal conductivity
static_assert(20q_W_per_m_K * 10q_m * 300q_K == 60'000q_W);
static_assert(detail::unit_text<dim_thermal_conductivity, watt_per_metre_kelvin>() == basic_symbol_text("W ⋅ m⁻¹ ⋅ K⁻¹", "W m^-1 K^-1"));
} // namespace