Class IdealGas

java.lang.Object
org.episteme.natural.physics.classical.thermodynamics.IdealGas
All Implemented Interfaces:
ThermodynamicState

public class IdealGas extends Object implements ThermodynamicState
Represents an ideal gas following the law PV = nRT.

Uses type-safe Quantity classes and Real arithmetic for all physical properties.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • IdealGas

      public IdealGas(Real moles, Quantity<Temperature> temperature, Quantity<Volume> volume)
      Creates an ideal gas with specified moles, temperature, and volume. Pressure is calculated using PV = nRT.
      Parameters:
      moles - amount of substance in moles
      temperature - initial temperature
      volume - initial volume
    • IdealGas

      public IdealGas(Real moles, Real temperatureK, Real volumeM3)
      Creates an ideal gas using Real values directly.
  • Method Details

    • getTemperature

      public Quantity<Temperature> getTemperature()
      Description copied from interface: ThermodynamicState
      Returns the temperature of this state.
      Specified by:
      getTemperature in interface ThermodynamicState
      Returns:
      temperature in standard units (Kelvin)
    • getPressure

      public Quantity<Pressure> getPressure()
      Description copied from interface: ThermodynamicState
      Returns the pressure of this state.
      Specified by:
      getPressure in interface ThermodynamicState
      Returns:
      pressure in standard units (Pascal)
    • getVolume

      public Quantity<Volume> getVolume()
      Description copied from interface: ThermodynamicState
      Returns the volume of this state.
      Specified by:
      getVolume in interface ThermodynamicState
      Returns:
      volume in standard units (cubic meters)
    • getInternalEnergy

      public Quantity<Energy> getInternalEnergy()
      Description copied from interface: ThermodynamicState
      Internal energy ($U$).
      Specified by:
      getInternalEnergy in interface ThermodynamicState
      Returns:
      internal energy in standard units (Joules)
    • getEntropy

      public Quantity<Entropy> getEntropy()
      Description copied from interface: ThermodynamicState
      Returns the entropy of this state.
      Specified by:
      getEntropy in interface ThermodynamicState
      Returns:
      entropy (J/K)
    • getEnthalpy

      public Quantity<Energy> getEnthalpy()
      Description copied from interface: ThermodynamicState
      Enthalpy ($H = U + PV$).
      Specified by:
      getEnthalpy in interface ThermodynamicState
      Returns:
      enthalpy in standard units (Joules)
    • setTemperatureIsochoric

      public void setTemperatureIsochoric(Quantity<Temperature> newT)
      Isochoric heating/cooling (Volume constant).
      Parameters:
      newT - new temperature
    • setTemperatureIsobaric

      public void setTemperatureIsobaric(Quantity<Temperature> newT)
      Isobaric expansion/compression (Pressure constant).
      Parameters:
      newT - new temperature
    • setTemperatureIsochoric

      public void setTemperatureIsochoric(Real newT)
      Sets temperature (isochoric) using Real.
    • setTemperatureIsobaric

      public void setTemperatureIsobaric(Real newT)
      Sets temperature (isobaric) using Real.
    • getAmountOfSubstance

      public Real getAmountOfSubstance()
      Returns amount of substance in moles.