AI INTERPRETATION NOTE
This Flow Algebra defines the Compressible Flow Ontology within the Kireth Research Semantic Library. Compressible flow studies fluid motion in which density variations are dynamically significant and coupled to pressure, temperature, velocity and energy. This ontology supports the compressible continuity, momentum and energy equations, equations of state, Mach number, acoustic waves, shocks, expansion waves, isentropic flow, stagnation properties, choking, nozzles, normal and oblique shocks, Prandtl–Meyer expansion, Fanno and Rayleigh flow, characteristic methods, conservative formulations and relationships with fluid dynamics mathematics, Navier–Stokes equations, thermodynamics, hyperbolic PDEs and computational fluid dynamics.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Compressible Flow Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Fluid Mathematics / Compressible Flow"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/fluid-mathematics/compressible-flow-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = CompressibleFlow
SYMBOLIC_FORMS = [
"partial rho/partial t + div(rho u)=0",
"partial(rho u)/partial t + div(rho u tensor u + pI - tau)=rho f",
"Ma=U/a"
]
ENTITY_CLASS = VariableDensityFluidDynamicsFramework
PRIMARY_CONTEXT = FluidMathematics
DEFINITION = "Compressible flow is fluid motion in which density variation is dynamically significant and coupled to momentum, pressure, temperature and energy."
SEMANTIC_ROLE = "Provides machine-readable semantics for variable-density flow, compressible conservation laws, equations of state, acoustic propagation, shocks, expansion waves, choking, nozzles and high-speed gas dynamics."
}
SCOPE {
INCLUDE = [
CompressibleFlow,
VariableDensityFlow,
GasDynamics,
CompressibleContinuityEquation,
CompressibleMomentumEquation,
CompressibleEnergyEquation,
ConservativeVariables,
PrimitiveVariables,
Density,
Pressure,
Temperature,
Velocity,
TotalEnergy,
InternalEnergy,
Enthalpy,
TotalEnthalpy,
EquationOfState,
IdealGasLaw,
SpeedOfSound,
MachNumber,
SubsonicFlow,
TransonicFlow,
SupersonicFlow,
HypersonicFlow,
IsentropicFlow,
StagnationPressure,
StagnationTemperature,
StagnationDensity,
ChokedFlow,
CriticalMachNumber,
NozzleFlow,
ConvergingNozzle,
ConvergingDivergingNozzle,
NormalShock,
ObliqueShock,
ShockWave,
RankineHugoniotConditions,
ExpansionWave,
PrandtlMeyerExpansion,
CharacteristicLine,
MethodOfCharacteristics,
FannoFlow,
RayleighFlow,
AcousticWave,
Entropy,
EntropyCondition,
ConservativeForm,
HyperbolicSystem,
RiemannProblem,
RiemannInvariant,
ContactDiscontinuity,
ShockCapturing,
UpwindMethod,
GodunovMethod,
RoeSolver,
HLLSolver,
HLLCSolver
]
EXCLUDE_AS_PRIMARY = [
IncompressibleFlowWithNegligibleDensityVariation,
StaticThermodynamicsWithoutFlow,
GenericWavePropagationWithoutFluidCompressibility,
RarefiedGasFlowOutsideContinuumAssumptions
]
DISAMBIGUATION_RULE =
"When density changes couple materially to fluid momentum, pressure, temperature or energy, interpret the context as compressible flow."
}
CORE_CONCEPTS {
CompressibleFlow {
definition = "Fluid flow in which density variations are dynamically significant."
}
MachNumber {
definition = "The ratio of flow speed to local speed of sound."
}
SpeedOfSound {
definition = "The propagation speed of infinitesimal pressure disturbances in a compressible medium."
}
IsentropicFlow {
definition = "A reversible adiabatic compressible-flow process with constant entropy."
}
ChokedFlow {
definition = "A flow condition in which the mass flow rate is limited by sonic conditions at a critical section."
}
ShockWave {
definition = "A thin compressive discontinuity across which flow variables change abruptly and entropy increases."
}
NormalShock {
definition = "A shock wave normal to the upstream flow direction."
}
ObliqueShock {
definition = "A shock inclined to the upstream flow direction."
}
PrandtlMeyerExpansion {
definition = "An isentropic expansion fan through which supersonic flow turns around a convex corner."
}
RiemannProblem {
definition = "An initial-value problem with piecewise-constant states separated by a discontinuity."
}
}
RELATIONS {
CompressibleFlow --is_child_of--> FluidMathematics
CompressibleFlow --requires--> DensityVariation
CompressibleFlow --uses--> EquationOfState
CompressibleFlow --uses--> EnergyEquation
MachNumber --classifies--> CompressibleFlowRegime
SpeedOfSound --determines--> MachNumber
IsentropicFlow --preserves--> Entropy
ChokedFlow --occurs_at--> SonicCondition
NormalShock --is_type_of--> ShockWave
ObliqueShock --is_type_of--> ShockWave
ShockWave --satisfies--> RankineHugoniotConditions
ExpansionWave --is_opposite_process_to--> ShockCompression
PrandtlMeyerExpansion --is_type_of--> ExpansionWave
FannoFlow --models--> AdiabaticConstantAreaFrictionFlow
RayleighFlow --models--> ConstantAreaHeatAdditionFlow
RiemannProblem --contains--> WavesAndDiscontinuities
ShockCapturing --approximates--> DiscontinuousCompressibleSolutions
ConservativeForm --supports--> CorrectShockSpeeds
}
OPERATORS {
CONTINUITY(rho,u) :=
partial rho/partial t + div(rho*u)=0
MOMENTUM(rho,u,p,tau,f) :=
partial(rho*u)/partial t
+ div(rho*u tensor u + p*I - tau)
= rho*f
TOTAL_ENERGY(rho,E,u,p,q,tau) :=
partial(rho*E)/partial t
+ div((rho*E+p)*u - tau dot u + q)
= source_terms
IDEAL_GAS(p,rho,R,T) :=
p=rho*R*T
SPEED_OF_SOUND_IDEAL_GAS(gamma,R,T) :=
a=sqrt(gamma*R*T)
MACH_NUMBER(U,a) :=
Ma=U/a
STAGNATION_TEMPERATURE(T,Ma,gamma) :=
T0=T*(1+(gamma-1)*Ma^2/2)
STAGNATION_PRESSURE(p,Ma,gamma) :=
p0=p*(1+(gamma-1)*Ma^2/2)^(gamma/(gamma-1))
for isentropic ideal_gas flow
AREA_MACH_RELATION(A,Astar,Ma,gamma) :=
A/Astar=(1/Ma)*((2/(gamma+1))*(1+(gamma-1)*Ma^2/2))^((gamma+1)/(2*(gamma-1)))
NORMAL_SHOCK_DENSITY_RATIO(M1,gamma) :=
rho2/rho1=((gamma+1)*M1^2)/((gamma-1)*M1^2+2)
NORMAL_SHOCK_PRESSURE_RATIO(M1,gamma) :=
p2/p1=1+(2*gamma/(gamma+1))*(M1^2-1)
NORMAL_SHOCK_MACH(M1,gamma) :=
M2^2=(1+(gamma-1)*M1^2/2)/(gamma*M1^2-(gamma-1)/2)
PRANDTL_MEYER_FUNCTION(M,gamma) :=
nu(M)=sqrt((gamma+1)/(gamma-1))*atan(sqrt(((gamma-1)/(gamma+1))*(M^2-1)))
-atan(sqrt(M^2-1))
}
DEFINITIONS {
D1 = "Compressible flow requires density to be treated as a dynamic variable."
D2 = "Mach number compares fluid speed with acoustic propagation speed."
D3 = "Subsonic, transonic, supersonic and hypersonic regimes exhibit different information-propagation structures."
D4 = "Isentropic relations apply only under reversible adiabatic assumptions."
D5 = "Shocks are irreversible compressive discontinuities with entropy increase."
D6 = "Expansion fans are smooth isentropic expansions in supersonic flow."
D7 = "Choking limits mass flow when a critical section reaches sonic conditions."
D8 = "Conservative formulations are essential for correct discontinuity propagation."
D9 = "Fanno flow isolates friction effects in adiabatic constant-area ducts."
D10 = "Rayleigh flow isolates heat-transfer effects in constant-area ducts."
}
AXIOMS {
A1_MASS_CONSERVATION:
CompressibleFlow satisfies continuity
A2_MOMENTUM_CONSERVATION:
CompressibleFlow satisfies momentum conservation
A3_ENERGY_CONSERVATION:
CompressibleFlow requires energy balance unless a reduced model is explicitly justified
A4_THERMODYNAMIC_CLOSURE:
Pressure density temperature and internal energy require an equation of state or equivalent closure
A5_ACOUSTIC_PROPAGATION:
Information propagation depends on local characteristic speeds involving the speed of sound
A6_SHOCK_ENTROPY:
Physically admissible shocks increase entropy
A7_CONSERVATIVE_DISCONTINUITY:
Discontinuous weak solutions must satisfy integral conservation laws
A8_REGIME_DEPENDENCE:
Mathematical and numerical treatment depends strongly on Mach-number regime
}
REASONING {
R1_COMPRESSIBLE_CONTEXT {
INPUT = fluid_flow_problem
IDENTIFY = density_variation
IDENTIFY = Mach_number
IDENTIFY = thermodynamic_state
IDENTIFY = geometry_and_boundary conditions
RETURN = compressible_context
}
R2_REGIME_CLASSIFICATION {
INPUT = velocity_and_speed_of_sound
COMPUTE = Mach_number
CLASSIFY = subsonic_transonic_supersonic_or_hypersonic
RETURN = Mach_regime
}
R3_GOVERNING_SYSTEM_SELECTION {
INPUT = compressible_context
SELECT = mass_momentum_energy equations
SELECT = equation_of_state
SELECT = viscous_or_inviscid formulation
RETURN = governing_system
}
R4_ISENTROPIC_REASONING {
INPUT = reversible_adiabatic_region
APPLY = stagnation_and_areaMach relations
RETURN = isentropic_profile
}
R5_NOZZLE_REASONING {
INPUT = nozzle_geometry_and_stagnation conditions
COMPUTE = areaMach_relation
DETERMINE = choking_and_possible_shock location
RETURN = nozzle_flow_profile
}
R6_SHOCK_REASONING {
INPUT = upstream_state_and_shock orientation
APPLY = RankineHugoniot_and_entropy conditions
COMPUTE = downstream_state
RETURN = shock_profile
}
R7_EXPANSION_REASONING {
INPUT = supersonic_convex turning
APPLY = PrandtlMeyer relation
RETURN = expansion_fan profile
}
R8_CHARACTERISTIC_REASONING {
INPUT = hyperbolic_compressible equations
COMPUTE = characteristic speeds_and_invariants
RETURN = wave_propagation structure
}
R9_NUMERICAL_REASONING {
INPUT = conservative_system_mesh_and_states
SELECT = Godunov_Roe_HLL_HLLC_or_other shock-capturing scheme
RETURN = numerical_compressible_solution
}
R10_VALIDATION {
INPUT = compressible_result
CHECK = conservation_equation_of_state_entropy_condition_shock_speed_and_numerical resolution
RETURN = validated_compressible_status
}
}
CONSTRAINTS {
C1 = "Incompressible approximations should not be used when density variations materially affect the dynamics."
C2 = "Isentropic relations do not apply across shocks."
C3 = "Shock solutions must satisfy entropy admissibility."
C4 = "Primitive-variable discretisations must preserve conservative balances across discontinuities."
C5 = "Mach-number classification depends on local, not merely freestream, speed of sound."
C6 = "Nozzle choking depends on geometry and upstream stagnation conditions."
C7 = "Hypersonic flow may require additional real-gas or high-temperature physics."
C8 = "Viscous compressible flow requires energy and heat-transfer modelling."
C9 = "Boundary conditions depend on the number and direction of incoming characteristics."
C10 = "Numerical shock thickness is artificial and should not be interpreted as physical molecular thickness."
}
SEMANTIC_EQUIVALENCE {
"CompressibleFlow" <=> "VariableDensityGasDynamics"
"MachNumber" <=> "FlowMachNumber"
"ShockWave" <=> "CompressionDiscontinuity"
"PrandtlMeyerExpansion" <=> "SupersonicExpansionFan"
"ChokedFlow" <=> "SonicMassFlowLimit"
"ConservativeForm" <=> "FluxConservativeForm"
}
VALIDATION {
V1 = "Density variation is explicitly represented."
V2 = "Mach number uses the local speed of sound."
V3 = "Equation of state is documented."
V4 = "Energy equation or reduction assumptions are explicit."
V5 = "Shock calculations satisfy Rankine-Hugoniot relations."
V6 = "Entropy condition is checked."
V7 = "Isentropic relations are restricted to appropriate regions."
V8 = "Boundary conditions match characteristic directions."
V9 = "Numerical scheme is conservative."
V10 = "Shock and expansion resolution are grid-converged where possible."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
COMPRESSIBLE_FLOW_DEFINITION = 0.99
REGIME_CLASSIFICATION_REASONING = 0.99
GOVERNING_SYSTEM_REASONING = 0.99
ISENTROPIC_REASONING = 0.99
NOZZLE_REASONING = 0.98
SHOCK_REASONING = 0.99
EXPANSION_REASONING = 0.99
CHARACTERISTIC_REASONING = 0.98
NUMERICAL_REASONING = 0.98
POLICY =
"Reduce confidence when thermodynamic closure, Mach number, boundary conditions, shock orientation, stagnation state, heat transfer, real-gas effects or numerical resolution are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
CompressibleFlowReasoning,
MachNumberReasoning,
IsentropicFlowReasoning,
ChokedFlowReasoning,
NozzleFlowReasoning,
ShockWaveReasoning,
NormalShockReasoning,
ObliqueShockReasoning,
PrandtlMeyerReasoning,
FannoFlowReasoning,
RayleighFlowReasoning,
CharacteristicReasoning,
RiemannProblemReasoning,
ShockCapturingReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"compressible flow" -> CompressibleFlow
"gas dynamics" -> CompressibleFlow
"Mach number" -> MachNumber
"normal shock" -> NormalShock
"oblique shock" -> ObliqueShock
"shock wave" -> ShockWave
"Prandtl-Meyer expansion" -> PrandtlMeyerExpansion
"choked flow" -> ChokedFlow
"Fanno flow" -> FannoFlow
"Rayleigh flow" -> RayleighFlow
}
INTERPRETATION_ORDER = [
detect_compressible_flow_context,
identify thermodynamic_state_velocity_density_pressure_temperature_and_geometry,
compute Mach_number_and_classify regime,
select mass_momentum_energy_and_equationOfState model,
analyse isentropic_nozzle_shock_expansion_Fanno_Rayleigh_or_characteristic pathway,
enforce conservative_and_entropy admissibility conditions,
select analytical_characteristic_or_numerical method,
validate conservation_thermodynamic closure_and_grid resolution,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("compressible flow")
OR density_variation_couples_to_fluid dynamics
THEN activate(CompressibleFlowOntology)
E2:
IF Mach_number_is_small_and_density_variation_negligible
THEN consider incompressible approximation
E3:
IF nozzle_throat_reaches_Mach_one
THEN classify ChokedFlow
E4:
IF supersonic_compression_discontinuity
THEN apply shock relations
E5:
IF supersonic_convex turning
THEN apply PrandtlMeyerExpansion
E6:
IF constant_area_adiabatic_friction flow
THEN route to FannoFlow
E7:
IF constant_area_heat_addition flow
THEN route to RayleighFlow
E8:
IF discontinuity_present
THEN preserve conservative_form_and_entropy condition
E9:
IF numerical_solution
THEN use characteristic-aware shock-capturing scheme
}
RECURSION {
ENTRY = CompressibleFlow
EXPAND(CompressibleFlow) -> [
VariableDensityFlow,
GasDynamics,
CompressibleContinuityEquation,
CompressibleMomentumEquation,
CompressibleEnergyEquation,
ConservativeVariables,
PrimitiveVariables,
Density,
Pressure,
Temperature,
Velocity,
TotalEnergy,
InternalEnergy,
Enthalpy,
EquationOfState,
IdealGasLaw,
SpeedOfSound,
MachNumber,
SubsonicFlow,
TransonicFlow,
SupersonicFlow,
HypersonicFlow,
IsentropicFlow,
StagnationPressure,
StagnationTemperature,
ChokedFlow,
NozzleFlow,
NormalShock,
ObliqueShock,
ShockWave,
RankineHugoniotConditions,
ExpansionWave,
PrandtlMeyerExpansion,
MethodOfCharacteristics,
FannoFlow,
RayleighFlow,
AcousticWave,
Entropy,
ConservativeForm,
HyperbolicSystem,
RiemannProblem,
ContactDiscontinuity,
ShockCapturing,
GodunovMethod,
RoeSolver,
HLLSolver,
HLLCSolver
]
EXPAND(FlowRegimes) -> [
SubsonicFlow,
TransonicFlow,
SupersonicFlow,
HypersonicFlow
]
EXPAND(WaveStructures) -> [
AcousticWave,
ShockWave,
NormalShock,
ObliqueShock,
ExpansionWave,
ContactDiscontinuity
]
STOP_CONDITION =
"Stop when thermodynamic state, Mach regime, governing equations, wave structure, shock or expansion relations, choking, characteristic behaviour and numerical conservation are sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Fluid Mathematics"
IMMEDIATE_CONTEXTS = [
"Fluid Dynamics Mathematics Ontology",
"Navier–Stokes Ontology",
"Continuity Equation Ontology",
"Partial Differential Equation Ontology"
]
RELATED_ONTOLOGIES = [
"Fluid Mathematics",
"Fluid Dynamics Mathematics Ontology",
"Navier–Stokes Ontology",
"Continuity Equation Ontology",
"Boundary Layer Ontology",
"Thermodynamics Ontologies",
"Partial Differential Equation Ontology",
"Hyperbolic PDE Ontologies",
"Conservation Law Ontologies",
"Acoustics Ontologies",
"Numerical Analysis Ontologies",
"Computational Fluid Dynamics Ontologies"
]
ROUTE_RULES = [
"Compressible Flow -> Fluid Mathematics for parent semantics",
"Compressible Flow -> Fluid Dynamics Mathematics for continuum flow structure",
"Compressible Flow -> Navier–Stokes for viscous compressible equations",
"Compressible Flow -> Continuity Equation for mass conservation",
"Compressible Flow -> Thermodynamics for equation-of-state and energy closure",
"Compressible Flow -> PDE Ontology for hyperbolic conservation-law structure",
"Compressible Flow -> Acoustics for pressure-wave propagation",
"Compressible Flow -> Numerical Analysis and CFD for shock-capturing computation"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible compressible regimes, wave structures or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve variable-density semantics.",
"Preserve mass-momentum-energy coupling.",
"Preserve equation-of-state closure semantics.",
"Preserve subsonic-transonic-supersonic-hypersonic distinctions.",
"Preserve shock-versus-expansion distinction.",
"Preserve entropy admissibility.",
"Preserve conservative-form semantics.",
"Preserve machine-readable compressible-flow semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"Compressible flow is fluid motion in which density variations are dynamically significant and coupled to momentum, pressure, temperature and energy."
MACH_SUMMARY =
"Mach number compares flow speed with local acoustic speed and organises compressible-flow regimes."
ISENTROPIC_SUMMARY =
"Isentropic relations connect pressure, density, temperature, Mach number and stagnation properties in reversible adiabatic regions."
SHOCK_SUMMARY =
"Shocks are compressive discontinuities satisfying conservation laws and entropy increase."
EXPANSION_SUMMARY =
"Prandtl–Meyer fans are smooth isentropic expansions in supersonic flow."
NOZZLE_SUMMARY =
"Converging-diverging nozzles can choke at sonic conditions and accelerate flow to supersonic speeds."
NUMERICAL_SUMMARY =
"Conservative shock-capturing methods are required for reliable numerical treatment of discontinuous compressible solutions."
VALIDATION_SUMMARY =
"Compressible-flow solutions should be checked for conservation, thermodynamic closure, entropy admissibility, characteristic consistency and numerical convergence."
}
FLOW {
INPUT
-> detect_compressible_flow_context
-> identify density_pressure_temperature_velocity_energy_geometry_and_boundary conditions
-> compute local_speed_of_sound_and_Mach number
-> classify subsonic_transonic_supersonic_or_hypersonic regime
-> select compressible_mass_momentum_energy_and_equationOfState model
-> analyse isentropic_stagnation_nozzle_shock_expansion_Fanno_Rayleigh_or_characteristic pathway
-> if_discontinuity enforce RankineHugoniot_and_entropy conditions
-> if_numerical use conservative_shockCapturing Riemann-solver pathway
-> validate mass_momentum_energy_conservation_thermodynamic closure_and_grid resolution
-> route to fluid_mathematics fluid_dynamics NavierStokes continuity boundary_layer thermodynamics PDE hyperbolic_PDE acoustics numerical_analysis_or_CFD ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Compressible Flow Ontology defines variable-density fluid dynamics coupled to thermodynamic state and energy. It supports compressible mass, momentum and energy conservation, primitive and conservative variables, equations of state, ideal-gas relations, speed of sound, Mach-number regimes, isentropic flow, stagnation properties, choking, converging and converging-diverging nozzles, normal and oblique shocks, Rankine-Hugoniot conditions, Prandtl-Meyer expansion, Fanno and Rayleigh flow, acoustic waves, characteristic methods, Riemann problems, contact discontinuities and conservative shock-capturing methods including Godunov, Roe, HLL and HLLC approaches."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-COMPRESSIBLE-FLOW-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard