Coder Social home page Coder Social logo

acodcha / phq Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 1.0 5.63 MB

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%
dimensional-analysis physical-models physical-quantities physics scientific-computing unit-conversions

phq's People

Contributors

acodcha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

linecode

phq's Issues

Implement electric potential

Implement electric potential (also known as voltage) unit and quantity:

  • PhQ::Unit::ElectricPotential
  • PhQ::ElectricPotential

Implement electric resistance

Implement electric resistance unit and quantity (typically measured in ohms):

  • PhQ::Unit::ElectricResistance
  • PhQ::ElectricResistance

Implement thermal conductivity models

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

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

Implement molar heat capacity (heat capacity per mole) unit and quantities:

  • PhQ::Unit::MolarHeatCapacity
  • PhQ::MolarGasConstant
  • PhQ::MolarIsobaricHeatCapacity
  • PhQ::MolarIsochoricHeatCapacity

Requires #193

Implement entropy

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

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

Implement work quantities:

  • PhQ::Work
  • PhQ::SpecificWork
  • PhQ::MolarWork

Requires #193

Implement electric resistivity

Implement electric resistivity unit and quantity (typically measured in ohm-metre):

  • PhQ::Unit::ElectricResistivity
  • PhQ::ElectricResistivity

Implement transport energy efficiency

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 moment

Implement the moment physical quantity (force * distance, units of energy):

  • PhQ::Moment

Implement temperature table

Implement the general concept of a temperature table: a template class that allows storing a quantity as a function of temperature for interpolation.

  • PhQ::TemperatureTable

Implement mass density models

Implement mass density models:

  • PhQ::MassDensityModel
  • PhQ::MassDensityModel::Constant
  • PhQ::MassDensityModel::Boussinesq (applies the buoyancy Boussinesq approximation)

Implement heat capacity models

Implement heat capacity models.

  • PhQ::HeatCapacityModel
  • PhQ::HeatCapacityModel::Constant
  • PhQ::HeatCapacityModel::TemperatureTable

Requires #205

Implement principal stresses and strains

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

Implement salinity and volumetric salinity

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

Implement capacitance unit and quantity (typically measured in farads):

  • PhQ::Unit::Capacitance
  • PhQ::Capacitance

Implement thermodynamic state models

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

Implement electric conductance unit and quantity (typically measured in siemens):

  • PhQ::Unit::ElectricConductance
  • PhQ::ElectricConductance

Implement molar power

Implement molar power (power per substance amount, e.g. W/mol) unit and quantity:

  • PhQ::Unit::MolarPower
  • PhQ::MolarPower

Requires #193

Implement electric conductivity

Implement electric conductivity unit and quantity (typically measured in siemens per metre):

  • PhQ::Unit::ElectricConductivity
  • PhQ::ElectricConductivity

Implement molar energy

Implement molar energy (energy per substance amount, e.g. J/mol) unit and quantity:

  • PhQ::Unit::MolarEnergy
  • PhQ::MolarEnergy

Implement molar mass

Implement molar mass unit and quantity (mass per substance amount, e.g. kg/mol):

  • PhQ::Unit::MolarMass
  • PhQ::MolarMass

Implement heat transfer

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 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 temperature-pressure table

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

Implement inductance unit and quantity (typically measured in henry):

  • PhQ::Unit::Inductance
  • PhQ::Inductance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.