AI INTERPRETATION NOTE
This Flow Algebra defines the Thermodynamic Mathematics Ontology within the Kireth Research Semantic Library. Thermodynamic mathematics studies mathematical relationships governing energy, work, heat, entropy, equilibrium, state variables, equations of state, thermodynamic potentials, processes and cycles. This ontology supports the zeroth, first and second laws, closed and open systems, control-volume balances, ideal and real gases, reversible and irreversible processes, enthalpy, internal energy, Helmholtz and Gibbs free energies, Maxwell relations, exergy, entropy generation, phase equilibrium, property relations and relationships with engineering mathematics, heat transfer, fluid mathematics, statistical mechanics and numerical analysis.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Thermodynamic Mathematics Ontology"
FLOW_TYPE = "Engineering Mathematics Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Engineering Mathematics / Thermodynamic Mathematics"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/engineering-mathematics/thermodynamic-mathematics-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = ThermodynamicMathematics
SYMBOLIC_FORMS = [
"dU = delta Q - delta W",
"dS >= delta Q_rev/T",
"H = U + pV",
"G = H - TS"
]
ENTITY_CLASS = EnergyEntropyStateRelationFramework
PRIMARY_CONTEXT = EngineeringMathematics
DEFINITION = "Thermodynamic mathematics is the mathematical study of energy, heat, work, entropy, equilibrium and state relations in physical systems."
SEMANTIC_ROLE = "Provides machine-readable semantics for thermodynamic states, laws, processes, potentials, property relations, cycles, exergy, phase equilibrium and energy balances."
}
SCOPE {
INCLUDE = [
ThermodynamicMathematics,
ThermodynamicSystem,
Surroundings,
Boundary,
ClosedSystem,
OpenSystem,
ControlMass,
ControlVolume,
State,
StateVariable,
IntensiveProperty,
ExtensiveProperty,
Pressure,
Temperature,
Volume,
SpecificVolume,
Density,
InternalEnergy,
Enthalpy,
Entropy,
Heat,
Work,
HeatCapacity,
SpecificHeat,
EquationOfState,
IdealGasLaw,
RealGas,
CompressibilityFactor,
ZerothLaw,
FirstLaw,
SecondLaw,
ThirdLaw,
Equilibrium,
ThermalEquilibrium,
MechanicalEquilibrium,
ChemicalEquilibrium,
ReversibleProcess,
IrreversibleProcess,
QuasiStaticProcess,
IsothermalProcess,
IsobaricProcess,
IsochoricProcess,
IsentropicProcess,
AdiabaticProcess,
PolytropicProcess,
ThermodynamicCycle,
CarnotCycle,
RankineCycle,
BraytonCycle,
OttoCycle,
DieselCycle,
RefrigerationCycle,
HeatEngine,
Refrigerator,
HeatPump,
Efficiency,
CoefficientOfPerformance,
HelmholtzFreeEnergy,
GibbsFreeEnergy,
ChemicalPotential,
MaxwellRelation,
ClapeyronEquation,
ClausiusClapeyronEquation,
Exergy,
Availability,
EntropyGeneration,
Irreversibility,
PhaseEquilibrium,
Saturation,
LatentHeat
]
EXCLUDE_AS_PRIMARY = [
HeatTransferWithoutStateOrEnergyBalanceContext,
PureFluidMechanicsWithoutThermodynamicClosure,
StatisticalMechanicsWithoutMacroscopicThermodynamicInterpretation,
ChemicalKineticsWithoutThermodynamicStateAnalysis
]
DISAMBIGUATION_RULE =
"When energy, heat, work, entropy, thermodynamic state or equilibrium relations are central to the model, interpret the context as thermodynamic mathematics."
}
CORE_CONCEPTS {
ThermodynamicMathematics {
definition = "The mathematical framework for thermodynamic states, energy balances, entropy and equilibrium."
}
State {
definition = "A complete specification of a thermodynamic system through independent state variables."
}
InternalEnergy {
definition = "Microscopic energy stored within a thermodynamic system."
}
Enthalpy {
definition = "Thermodynamic potential H=U+pV useful in flow and constant-pressure processes."
}
Entropy {
definition = "A state function associated with thermodynamic irreversibility and energy dispersal."
}
EquationOfState {
definition = "A constitutive relation connecting thermodynamic state variables."
}
FirstLaw {
definition = "Conservation of energy for thermodynamic systems."
}
SecondLaw {
definition = "A law constraining process direction through entropy and irreversibility."
}
GibbsFreeEnergy {
definition = "Thermodynamic potential G=H-TS relevant to equilibrium at constant temperature and pressure."
}
Exergy {
definition = "Maximum useful work obtainable as a system approaches equilibrium with a reference environment."
}
}
RELATIONS {
ThermodynamicMathematics --is_child_of--> EngineeringMathematics
ThermodynamicSystem --has--> State
State --contains--> StateVariable
EquationOfState --relates--> StateVariables
FirstLaw --governs--> EnergyBalance
SecondLaw --governs--> EntropyBalance
InternalEnergy --contributes_to--> Enthalpy
Enthalpy --equals--> InternalEnergyPlusPV
HelmholtzFreeEnergy --depends_on--> InternalEnergy
GibbsFreeEnergy --depends_on--> Enthalpy
EntropyGeneration --measures--> Irreversibility
Exergy --decreases_with--> Irreversibility
PhaseEquilibrium --requires--> ChemicalPotentialEquality
ClapeyronEquation --describes--> PhaseBoundarySlope
HeatEngine --converts--> HeatToWork
Refrigerator --uses--> WorkToMoveHeat
HeatPump --uses--> WorkToMoveHeat
CarnotCycle --sets--> IdealReversibleEfficiencyLimit
}
OPERATORS {
FIRST_LAW_CLOSED_SYSTEM(U,Q,W) :=
DeltaU=Q-W
DIFFERENTIAL_FIRST_LAW(U,Q,W) :=
dU=deltaQ-deltaW
ENTHALPY(U,p,V) :=
H=U+p*V
GIBBS_FREE_ENERGY(H,T,S) :=
G=H-T*S
HELMHOLTZ_FREE_ENERGY(U,T,S) :=
A=U-T*S
IDEAL_GAS(p,V,n,R,T) :=
p*V=n*R*T
SPECIFIC_IDEAL_GAS(p,v,R,T) :=
p*v=R*T
ENTROPY_BALANCE_CLOSED(S,Q,T,Sgen) :=
DeltaS=integral(deltaQ_boundary/T_boundary)+Sgen
SECOND_LAW_INEQUALITY(Sgen) :=
Sgen>=0
CARNOT_EFFICIENCY(Th,Tc) :=
eta=1-Tc/Th
REFRIGERATOR_COP(Tc,Th) :=
COP_R=Tc/(Th-Tc)
for reversible_Carnot refrigerator
HEAT_PUMP_COP(Tc,Th) :=
COP_HP=Th/(Th-Tc)
for reversible_Carnot heat pump
EXERGY_DESTRUCTION(T0,Sgen) :=
X_destroyed=T0*Sgen
CLAPEYRON(dp_dT,L,T,delta_v) :=
dp/dT=L/(T*delta_v)
}
DEFINITIONS {
D1 = "Thermodynamic state is specified by independent state variables subject to equations of state."
D2 = "Heat and work are path-dependent energy transfers."
D3 = "Internal energy, enthalpy, entropy and free energies are state functions."
D4 = "The first law expresses energy conservation."
D5 = "The second law requires nonnegative entropy generation for real processes."
D6 = "Reversible processes have zero internal entropy generation in the ideal limit."
D7 = "Thermodynamic potentials simplify equilibrium analysis under different constraints."
D8 = "Exergy measures useful work potential relative to an environment."
D9 = "Phase equilibrium is governed by equality of appropriate intensive potentials."
D10 = "Thermodynamic cycles convert between heat, work and state changes."
}
AXIOMS {
A1_STATE_FUNCTIONS:
Thermodynamic state functions depend only on the state not on the path
A2_ENERGY_CONSERVATION:
Total energy obeys the FirstLaw
A3_ENTROPY_PRODUCTION:
EntropyGeneration is nonnegative for real processes
A4_EQUILIBRIUM:
Equilibrium requires absence of spontaneous macroscopic driving forces
A5_EQUATION_OF_STATE:
Material thermodynamic states require constitutive closure
A6_PATH_DEPENDENCE:
Heat and work depend on process path
A7_REVERSIBILITY:
Reversible processes represent ideal limiting processes with zero entropy generation
A8_REFERENCE_STATE:
Some thermodynamic properties and exergy measures depend on declared reference states
}
REASONING {
R1_THERMODYNAMIC_CONTEXT {
INPUT = thermodynamic_problem
IDENTIFY = system_boundary_and_environment
IDENTIFY = state_variables
IDENTIFY = heat_work_mass flows
IDENTIFY = process_or_cycle type
RETURN = thermodynamic_context
}
R2_STATE_DETERMINATION {
INPUT = independent_properties_and_equation_of_state
SOLVE = remaining_state variables
RETURN = thermodynamic_state
}
R3_FIRST_LAW_REASONING {
INPUT = closed_or_open system
ACCOUNT = heat_work_internal_energy_kinetic_potential_and_flow energy
RETURN = energy_balance
}
R4_SECOND_LAW_REASONING {
INPUT = process_and_heat_transfer temperatures
COMPUTE = entropy_change_and_generation
RETURN = irreversibility_profile
}
R5_PROCESS_REASONING {
INPUT = process_constraint
CLASSIFY = isothermal_isobaric_isochoric_isentropic_adiabatic_or_polytropic
APPLY = corresponding property relations
RETURN = process_solution
}
R6_CYCLE_REASONING {
INPUT = cycle_states_and_processes
COMPUTE = heat_work_efficiency_or_COP
RETURN = cycle_performance
}
R7_FREE_ENERGY_REASONING {
INPUT = T_p_V_S_and_composition context
SELECT = Helmholtz_Gibbs_or_other potential
ANALYSE = equilibrium_and_spontaneity
RETURN = potential_profile
}
R8_EXERGY_REASONING {
INPUT = system_state_and_reference environment
COMPUTE = physical_or_flow exergy
COMPUTE = exergy_destruction_from_entropy generation
RETURN = exergy_profile
}
R9_PHASE_EQUILIBRIUM_REASONING {
INPUT = pressure_temperature_composition_and_phase data
ENFORCE = chemical_potential equality
APPLY = Clapeyron_or_related phase relations
RETURN = phase_equilibrium profile
}
R10_VALIDATION {
INPUT = thermodynamic_result
CHECK = energy_conservation_entropy inequality_state consistency_units_and_reference states
RETURN = validated_thermodynamic_status
}
}
CONSTRAINTS {
C1 = "Heat and work must not be treated as stored state properties."
C2 = "Kelvin must be used for absolute-temperature thermodynamic relations."
C3 = "Ideal-gas relations are invalid when real-gas effects are significant."
C4 = "Reversible process relations should not be applied to strongly irreversible processes."
C5 = "Entropy generation cannot be negative for an isolated real process."
C6 = "Cycle efficiency cannot exceed the relevant reversible limit."
C7 = "Reference states must be declared for exergy and tabulated property differences."
C8 = "Phase-equilibrium relations require compatible phases and property models."
C9 = "Open-system energy balances require flow work or enthalpy treatment."
C10 = "Property correlations must remain within their valid temperature and pressure ranges."
}
SEMANTIC_EQUIVALENCE {
"ThermodynamicMathematics" <=> "MathematicalThermodynamics"
"FirstLaw" <=> "EnergyConservationLaw"
"SecondLaw" <=> "EntropyInequality"
"HelmholtzFreeEnergy" <=> "HelmholtzPotential"
"GibbsFreeEnergy" <=> "GibbsPotential"
"Exergy" <=> "Availability"
}
VALIDATION {
V1 = "System and boundary definitions are explicit."
V2 = "State variables and units are explicit."
V3 = "Equation of state or property model is documented."
V4 = "Energy balance closes."
V5 = "Entropy generation is nonnegative."
V6 = "Absolute temperatures are used where required."
V7 = "Process assumptions are documented."
V8 = "Cycle state points are thermodynamically consistent."
V9 = "Reference environment is explicit for exergy calculations."
V10 = "Phase-equilibrium calculations use consistent property relations."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
THERMODYNAMIC_DEFINITION = 0.99
STATE_REASONING = 0.99
FIRST_LAW_REASONING = 0.99
SECOND_LAW_REASONING = 0.99
PROCESS_REASONING = 0.99
CYCLE_REASONING = 0.98
FREE_ENERGY_REASONING = 0.98
EXERGY_REASONING = 0.98
PHASE_REASONING = 0.98
POLICY =
"Reduce confidence when property models, reference states, environmental conditions, phase data, process assumptions, mass-flow terms or thermodynamic boundary definitions are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
ThermodynamicReasoning,
StatePropertyReasoning,
FirstLawReasoning,
SecondLawReasoning,
EntropyReasoning,
EnthalpyReasoning,
FreeEnergyReasoning,
ExergyReasoning,
IdealGasReasoning,
RealGasReasoning,
ProcessReasoning,
CycleReasoning,
PhaseEquilibriumReasoning,
HeatEngineReasoning,
RefrigerationReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"thermodynamic mathematics" -> ThermodynamicMathematics
"thermodynamics" -> ThermodynamicMathematics
"first law" -> FirstLaw
"second law" -> SecondLaw
"internal energy" -> InternalEnergy
"enthalpy" -> Enthalpy
"entropy" -> Entropy
"Gibbs free energy" -> GibbsFreeEnergy
"Helmholtz free energy" -> HelmholtzFreeEnergy
"availability" -> Exergy
}
INTERPRETATION_ORDER = [
detect_thermodynamic_context,
identify system_boundary_environment_state variables_and_property model,
classify closed_open_steady_unsteady_process_or_cycle,
solve thermodynamic state,
apply first_law_energy balance,
apply second_law_entropy balance,
analyse process_cycle_freeEnergy_exergy_or_phase equilibrium as relevant,
validate thermodynamic consistency_and_reference states,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("thermodynamic")
OR energy_entropy_state_relation_is_under_analysis
THEN activate(ThermodynamicMathematicsOntology)
E2:
IF closed_system
THEN apply closed_system FirstLaw
E3:
IF open_system
THEN include mass_flow_and_enthalpy transport
E4:
IF reversible_process
THEN set internal_entropy_generation_to_zero_in_ideal model
E5:
IF ideal_gas_assumption
THEN use ideal_gas property relations
E6:
IF cycle_analysis
THEN require state closure_and_net heat_work balance
E7:
IF equilibrium_at_constant_T_and_p
THEN consider GibbsFreeEnergy minimisation
E8:
IF useful_work_or_efficiency loss_is_relevant
THEN compute Exergy_and_entropy generation
E9:
IF phase_change_present
THEN apply phase_equilibrium_and_latent heat relations
}
RECURSION {
ENTRY = ThermodynamicMathematics
EXPAND(ThermodynamicMathematics) -> [
ThermodynamicSystem,
Surroundings,
Boundary,
ClosedSystem,
OpenSystem,
ControlMass,
ControlVolume,
State,
StateVariable,
IntensiveProperty,
ExtensiveProperty,
Pressure,
Temperature,
Volume,
SpecificVolume,
Density,
InternalEnergy,
Enthalpy,
Entropy,
Heat,
Work,
HeatCapacity,
SpecificHeat,
EquationOfState,
IdealGasLaw,
RealGas,
CompressibilityFactor,
ZerothLaw,
FirstLaw,
SecondLaw,
ThirdLaw,
Equilibrium,
ReversibleProcess,
IrreversibleProcess,
IsothermalProcess,
IsobaricProcess,
IsochoricProcess,
IsentropicProcess,
AdiabaticProcess,
PolytropicProcess,
ThermodynamicCycle,
CarnotCycle,
RankineCycle,
BraytonCycle,
OttoCycle,
DieselCycle,
RefrigerationCycle,
HeatEngine,
Refrigerator,
HeatPump,
Efficiency,
CoefficientOfPerformance,
HelmholtzFreeEnergy,
GibbsFreeEnergy,
ChemicalPotential,
MaxwellRelation,
ClapeyronEquation,
ClausiusClapeyronEquation,
Exergy,
EntropyGeneration,
PhaseEquilibrium,
Saturation,
LatentHeat
]
EXPAND(ThermodynamicPotentials) -> [
InternalEnergy,
Enthalpy,
HelmholtzFreeEnergy,
GibbsFreeEnergy
]
EXPAND(Cycles) -> [
CarnotCycle,
RankineCycle,
BraytonCycle,
OttoCycle,
DieselCycle,
RefrigerationCycle
]
STOP_CONDITION =
"Stop when system definition, state, property model, energy balance, entropy balance, process or cycle, equilibrium condition, reference state and thermodynamic validity are sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Engineering Mathematics"
IMMEDIATE_CONTEXTS = [
"Engineering Mathematics Ontology",
"Heat Transfer Mathematics Ontology",
"Fluid Mathematics",
"Statistical Mechanics Ontologies"
]
RELATED_ONTOLOGIES = [
"Engineering Mathematics",
"Engineering Mathematics Ontology",
"Heat Transfer Mathematics Ontology",
"Fluid Mathematics",
"Compressible Flow Ontology",
"Partial Differential Equation Ontology",
"Statistical Mechanics Ontologies",
"Probability & Statistics Ontologies",
"Phase Transition Ontologies",
"Chemical Thermodynamics Ontologies",
"Numerical Analysis Ontologies",
"Scientific Computing Ontologies"
]
ROUTE_RULES = [
"Thermodynamic Mathematics -> Engineering Mathematics for parent semantics",
"Thermodynamic Mathematics -> Heat Transfer for thermal-energy transport",
"Thermodynamic Mathematics -> Fluid Mathematics for flow energy and enthalpy",
"Thermodynamic Mathematics -> Compressible Flow for thermodynamic closure of gas dynamics",
"Thermodynamic Mathematics -> Statistical Mechanics for microscopic foundations",
"Thermodynamic Mathematics -> Phase Transition Ontologies for coexistence and latent heat",
"Thermodynamic Mathematics -> Numerical Analysis for property and cycle computation"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible thermodynamic processes, potentials or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve state-function semantics.",
"Preserve heat-versus-work path dependence.",
"Preserve first-law energy conservation.",
"Preserve second-law entropy inequality.",
"Preserve reversible-versus-irreversible distinction.",
"Preserve property-model and reference-state semantics.",
"Preserve equilibrium-potential semantics.",
"Preserve machine-readable thermodynamic semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"Thermodynamic mathematics studies energy, heat, work, entropy, thermodynamic state and equilibrium through mathematical laws and property relations."
FIRST_LAW_SUMMARY =
"The first law balances energy transfer by heat and work against changes in system energy."
SECOND_LAW_SUMMARY =
"The second law constrains process direction through nonnegative entropy generation."
STATE_SUMMARY =
"Thermodynamic states are described by independent properties linked through equations of state and property relations."
POTENTIAL_SUMMARY =
"Internal energy, enthalpy, Helmholtz free energy and Gibbs free energy provide natural potentials for different constraints."
CYCLE_SUMMARY =
"Thermodynamic cycles convert between heat and work and are evaluated using efficiency or coefficient of performance."
EXERGY_SUMMARY =
"Exergy measures useful work potential and is destroyed by irreversibility."
PHASE_SUMMARY =
"Phase equilibrium is governed by equality of appropriate intensive potentials and phase-boundary relations."
VALIDATION_SUMMARY =
"Thermodynamic solutions should be checked for energy conservation, entropy admissibility, state consistency, units and reference-state definitions."
}
FLOW {
INPUT
-> detect_thermodynamic_mathematics_context
-> identify system_boundary_environment_state variables_mass flows_heat_work_and_property model
-> classify closed_open_steady_unsteady_process_cycle_or_equilibrium problem
-> solve thermodynamic_state using equation_of_state_and_property relations
-> apply first_law_energy balance
-> apply second_law_entropy balance
-> if_process classify isothermal_isobaric_isochoric_isentropic_adiabatic_or_polytropic
-> if_cycle compute heat_work_efficiency_or_COP
-> if_equilibrium select Gibbs_Helmholtz_or_other potential
-> if_exergy compute useful_work potential_and_exergy destruction
-> if_phase_change apply chemical_potential_and_Clapeyron relations
-> validate energy_entropy_state_reference and property consistency
-> route to engineering_mathematics heat_transfer fluid_mathematics compressible_flow statistical_mechanics probability_statistics phase_transition chemical_thermodynamics numerical_analysis_or_scientific_computing ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Thermodynamic Mathematics Ontology defines mathematical thermodynamics for engineered systems. It supports closed and open systems, control masses and volumes, state variables, intensive and extensive properties, pressure, temperature, volume, density, internal energy, enthalpy, entropy, heat and work, heat capacities, equations of state, ideal and real gases, the thermodynamic laws, equilibrium, reversible and irreversible processes, isothermal, isobaric, isochoric, isentropic, adiabatic and polytropic processes, Carnot, Rankine, Brayton, Otto, Diesel and refrigeration cycles, heat engines, refrigerators and heat pumps, Helmholtz and Gibbs free energies, Maxwell relations, Clapeyron relations, exergy, entropy generation, phase equilibrium, saturation and latent heat."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-THERMODYNAMIC-MATHEMATICS-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard