View Code? Open in Web Editor
NEW
Physical Quantities (PhQ) is a C++ library of physical quantities, physical models, and units of measure for scientific computing.
Home Page: https://acodcha.github.io/phq-docs
License: MIT License
CMake 0.82%
C++ 97.44%
Starlark 1.74%
phq's People
Contributors
Watchers
phq's Issues
Implement electric potential (also known as voltage) unit and quantity:
PhQ::Unit::ElectricPotential
PhQ::ElectricPotential
Implement electric resistance unit and quantity (typically measured in ohms):
PhQ::Unit::ElectricResistance
PhQ::ElectricResistance
Implement thermal conductivity models:
PhQ::ThermalConductivityModel
PhQ::ThermalConductivityModel::ConstantIsotropic
PhQ::ThermalConductivityModel::TemperatureTableIsotropic
PhQ::ThermalConductivityModel::ConstantOrthotropic
PhQ::ThermalConductivityModel::TemperatureTableOrthotropic
For the orthotropic models, their constructors take 3 scalars and 2 directions. Modify direction 2 to be perpendicular to direction 1, and calculate direction 3 to be direction 1 cross direction 2. Construct the dyadic tensor from these.
Requires #205
Implement performance tests to measure the runtime performance of physical quantities in comparison to using raw floating-point numbers to represent the same data. Ensure physical quantities have about the same performance as raw floating-point numbers.
Implement molar heat capacity (heat capacity per mole) unit and quantities:
PhQ::Unit::MolarHeatCapacity
PhQ::MolarGasConstant
PhQ::MolarIsobaricHeatCapacity
PhQ::MolarIsochoricHeatCapacity
Requires #193
Implement a simple solver for eigenvalues and eigenvectors of a 3x3 matrix for the PhQ::Dyad and PhQ::SymmetricDyad classes.
References:
Implement entropy units and physical quantities:
PhQ::Unit::Entropy (J/K)
PhQ::Entropy
PhQ::Unit::SpecificEntropy (J/K/kg)
PhQ::SpecificEntropy
PhQ::Unit::MolarEntropy (J/K/mol)
PhQ::MolarEntropy
Implement atmospheric models. Given a geopotential altitude, return the mass density, static pressure, temperature, sound speed, dynamic viscosity, and thermal conductivity of the air at that geopotential altitude. Create a state object that contains all of these quantities.
PhQ::AtmosphericState
PhQ::AtmosphericModel
PhQ::AtmosphericModel::InternationalStandardAtmosphere
PhQ::AtmosphericModel::UnitedStatesStandardAtmosphere1976
Implement work quantities:
PhQ::Work
PhQ::SpecificWork
PhQ::MolarWork
Requires #193
Implement electric resistivity unit and quantity (typically measured in ohm-metre):
PhQ::Unit::ElectricResistivity
PhQ::ElectricResistivity
Implement transport energy efficiency unit and quantity (distance traveled per energy used) (m/J) (inverse of force units).
PhQ::Unit::TransportEnergyEfficiency (inverse of PhQ::Unit::TransportEnergyConsumption)
PhQ::TransportEnergyEfficiency (inverse of PhQ::TransportEnergyConsumption)
Implement the moment physical quantity (force * distance, units of energy):
Implement the general concept of a temperature table: a template class that allows storing a quantity as a function of temperature for interpolation.
Implement mass density models:
PhQ::MassDensityModel
PhQ::MassDensityModel::Constant
PhQ::MassDensityModel::Boussinesq (applies the buoyancy Boussinesq approximation)
Implement heat capacity models.
PhQ::HeatCapacityModel
PhQ::HeatCapacityModel::Constant
PhQ::HeatCapacityModel::TemperatureTable
Requires #205
Implement principal stresses and strains for the PhQ::Stress, PhQ::Strain, and PhQ::StrainRate quantities. These should have a Principal() method that returns the principal stresses/strains. Perhaps also FirstPrincipal(), SecondPrincipal(), and ThirdPrincipal() classes.
Implement these classes:
PhQ::PrincipalStress: Contains a PhQ::Stress and a PhQ::Direction.
PhQ::PrincipalStresses: Contains three PhQ::PrincipalStress objects. Has First(), Second(), and Third() methods.
PhQ::PrincipalStrain
PhQ::PrincipalStrains
PhQ::PrincipalStrainRate
PhQ::PrincipalStrainRates
Requires #213
Salinity can be measured as mass of salt per volume of water or in mass of salt per mass of water:
PhQ::Salinity (dimensionless; mass of salt per mass of water)
PhQ::Unit::VolumetricSalinity (mass of salt per volume of water)
PhQ::VolumetricSalinity (dimensional; mass of salt per volume of water)
Implement capacitance unit and quantity (typically measured in farads):
PhQ::Unit::Capacitance
PhQ::Capacitance
Implement thermodynamic state models, also known as equations of state:
PhQ::ThermodynamicStateModel
PhQ::ThermodynamicStateModel::IdealGas
PhQ::ThermodynamicStateModel::BoussinesqFluid
PhQ::ThermodynamicStateModel::StiffenedGas
PhQ::ThermodynamicStateModel::TaitLiquid
PhQ::ThermodynamicStateModel::IncompressibleFluid
PhQ::ThermodynamicStateModel::IncompressibleIsothermalFluid
Implement electric conductance unit and quantity (typically measured in siemens):
PhQ::Unit::ElectricConductance
PhQ::ElectricConductance
Implement molar power (power per substance amount, e.g. W/mol) unit and quantity:
PhQ::Unit::MolarPower
PhQ::MolarPower
Requires #193
Implement electric conductivity unit and quantity (typically measured in siemens per metre):
PhQ::Unit::ElectricConductivity
PhQ::ElectricConductivity
Implement molar energy (energy per substance amount, e.g. J/mol) unit and quantity:
PhQ::Unit::MolarEnergy
PhQ::MolarEnergy
Implement molar mass unit and quantity (mass per substance amount, e.g. kg/mol):
PhQ::Unit::MolarMass
PhQ::MolarMass
Implement heat transfer quantities:
PhQ::HeatTransfer (units of energy)
PhQ::SpecificHeatTransfer (units of energy)
PhQ::MolarHeatTransfer (units of energy)
PhQ::HeatTransferRate (units of power)
PhQ::SpecificHeatTransferRate (units of power)
PhQ::MolarHeatTransferRate (units of power)
Requires #193
Implement parsing of text to physical quantities. Implement this method in Base.hpp:
template <typename Type>
[[nodiscard]] std::optional<Type> ParsePhysicalQuantity<Type>(const std::string_view text);
Support parsing plain text (as in the Print() methods), JSON messages, XML messages, and YAML messages.
Implement the general concept of a temperature and pressure table: a template class that allows storing a quantity as a function of temperature and pressure for two-dimensional interpolation.
PhQ::TemperaturePressureTable
Implement inductance unit and quantity (typically measured in henry):
PhQ::Unit::Inductance
PhQ::Inductance