feat(dimensions): added second partial type and new dimensions
This commit is contained in:
@@ -64,6 +64,28 @@ namespace serif::dimensions {
|
|||||||
static constexpr std::string_view identifier = "inverse_time_squared";
|
static constexpr std::string_view identifier = "inverse_time_squared";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mass density divided by time,
|
||||||
|
*/
|
||||||
|
struct MassDensityRate final : PhysicalQuantity {
|
||||||
|
static constexpr std::string_view identifier = "mass_density_rate";
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Force per unit volume
|
||||||
|
*/
|
||||||
|
struct ForceDensity final : PhysicalQuantity {
|
||||||
|
static constexpr std::string_view identifier = "force_density";
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pressure divided by length squared
|
||||||
|
*/
|
||||||
|
struct PressureLaplacian final : PhysicalQuantity
|
||||||
|
{
|
||||||
|
static constexpr std::string_view identifier = "pressure_laplacian";
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct GravitationalConstant
|
* @struct GravitationalConstant
|
||||||
*
|
*
|
||||||
@@ -200,6 +222,11 @@ namespace serif::dimensions {
|
|||||||
static constexpr std::string_view identifier = "specific_enthalpy";
|
static constexpr std::string_view identifier = "specific_enthalpy";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @brief The barotropic pressure primitive A with dA/density = (dP/density)/density. */
|
||||||
|
struct BarotropicPressurePotential final : ThermodynamicQuantity {
|
||||||
|
static constexpr std::string_view identifier = "barotropic_pressure_potential";
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct EnergyDensity
|
* @struct EnergyDensity
|
||||||
*
|
*
|
||||||
@@ -254,6 +281,11 @@ namespace serif::dimensions {
|
|||||||
static constexpr std::string_view identifier = "angular_velocity";
|
static constexpr std::string_view identifier = "angular_velocity";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @brief Angular acceleration, distinct from angular velocity despite sharing its chosen axis. */
|
||||||
|
struct AngularAcceleration final : PhysicalQuantity {
|
||||||
|
static constexpr std::string_view identifier = "angular_acceleration";
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct Momentum
|
* @struct Momentum
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,22 @@ namespace serif::dimensions {
|
|||||||
template <ThermodynamicQuantityType Quantity>
|
template <ThermodynamicQuantityType Quantity>
|
||||||
struct WithRespectTo final {};
|
struct WithRespectTo final {};
|
||||||
|
|
||||||
|
/** @brief
|
||||||
|
* A second EOS partial retains both differentiation quantities in its type.
|
||||||
|
*/
|
||||||
|
template <ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType FirstInput, ThermodynamicQuantityType SecondInput>
|
||||||
|
class SecondPartialDerivative final {
|
||||||
|
public:
|
||||||
|
/** @brief Store an explicitly evaluated second partial; this type does not differentiate. */
|
||||||
|
explicit constexpr SecondPartialDerivative(double value) noexcept : m_value(value) {}
|
||||||
|
|
||||||
|
/** @brief Return the numeric partial in the caller's physical units. */
|
||||||
|
[[nodiscard]] constexpr double value() const noexcept { return m_value; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
double m_value;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class PartialDerivative
|
* @class PartialDerivative
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace serif::dimensions {
|
|||||||
using SpecificEnergyValue = QuantityValue<SpecificEnergy>; ///< A quantity representing specific energy.
|
using SpecificEnergyValue = QuantityValue<SpecificEnergy>; ///< A quantity representing specific energy.
|
||||||
using SpecificInternalEnergyValue = QuantityValue<SpecificInternalEnergy>; ///< A quantity representing specific internal energy.
|
using SpecificInternalEnergyValue = QuantityValue<SpecificInternalEnergy>; ///< A quantity representing specific internal energy.
|
||||||
using SpecificEnthalpyValue = QuantityValue<SpecificEnthalpy>; ///< A quantity representing specific enthalpy.
|
using SpecificEnthalpyValue = QuantityValue<SpecificEnthalpy>; ///< A quantity representing specific enthalpy.
|
||||||
|
using BarotropicPressurePotentialValue = QuantityValue<BarotropicPressurePotential>; ///< A barotropic pressure primitive with specific energy units.
|
||||||
using EnergyDensityValue = QuantityValue<EnergyDensity>; ///< A quantity representing energy density.
|
using EnergyDensityValue = QuantityValue<EnergyDensity>; ///< A quantity representing energy density.
|
||||||
using GravitationalPotentialValue = QuantityValue<GravitationalPotential>; ///< A quantity representing gravitational potential.
|
using GravitationalPotentialValue = QuantityValue<GravitationalPotential>; ///< A quantity representing gravitational potential.
|
||||||
using VelocityValue = QuantityValue<Velocity>; ///< A quantity representing velocity.
|
using VelocityValue = QuantityValue<Velocity>; ///< A quantity representing velocity.
|
||||||
|
|||||||
Reference in New Issue
Block a user