# Density Ontology — Flow Algebra
URL: https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/measurement-units-ontologies/mechanical-measurements/density-ontology.html
FLOW DensityOntology {
DOMAIN:
Mathematical Ontologies
-> Measurement & Units Ontologies
-> Mechanical Measurements
-> Density Ontology
PURPOSE:
Represent mass density as a measurable physical quantity describing mass per unit volume, including homogeneous and non-homogeneous materials, local and average density, units, dimensional structure, temperature and pressure dependence, fluid and solid contexts, measurement conditions, uncertainty, and relationships to mass, volume, specific volume, hydrostatic pressure and buoyancy.
ENTITY Density {
TYPE: DerivedPhysicalQuantity
SYMBOL: rho
DIMENSION: M * L^-3
SI_UNIT: kilogram_per_cubic_metre
SI_SYMBOL: kg/m^3
DEFINITION:
density := Mass / Volume
UNIFORM_FORM:
rho = m / V
LOCAL_CONTINUUM_FORM:
rho = dm/dV
PROPERTIES:
is_scalar
has_value
has_unit
has_dimension
may_vary_with_position
may_vary_with_time
may_depend_on_temperature
may_depend_on_pressure
may_have_uncertainty
}
ENTITY Mass {
TYPE: BasePhysicalQuantity
SYMBOL: m
DIMENSION: M
SI_UNIT: kilogram
SI_SYMBOL: kg
RELATION:
Mass / Volume -> Density
}
ENTITY Volume {
TYPE: DerivedGeometricQuantity
SYMBOL: V
DIMENSION: L^3
SI_UNIT: cubic_metre
SI_SYMBOL: m^3
RELATION:
Mass / Volume -> Density
}
ENTITY SpecificVolume {
TYPE: DerivedPhysicalQuantity
SYMBOL: v_specific
DIMENSION: L^3 * M^-1
DEFINITION:
specific_volume := Volume / Mass
RELATION:
specific_volume = 1 / Density
WHEN density != 0
}
ENTITY Pressure {
TYPE: DerivedPhysicalQuantity
SYMBOL: p
DIMENSION: M * L^-1 * T^-2
RELATION:
fluid_density MAY_DEPEND_ON Pressure
}
ENTITY Temperature {
TYPE: BasePhysicalQuantity
SYMBOL: T
RELATION:
material_density MAY_DEPEND_ON Temperature
}
UNIT_SYSTEM {
SI {
canonical_unit: kilogram_per_cubic_metre
symbol: kg/m^3
}
COMMON_ALTERNATIVES {
gram_per_cubic_centimetre
gram_per_millilitre
kilogram_per_litre
pound_per_cubic_foot
pound_per_cubic_inch
}
COMMON_EQUIVALENCE:
1 g/cm^3 = 1000 kg/m^3
1 g/mL = 1000 kg/m^3
CONVERSION_RULE:
density_value(target_unit)
= density_value(source_unit)
* conversion_factor(source_unit, target_unit)
}
CLASSIFICATION {
by_spatial_behaviour:
uniform_density
nonuniform_density
local_density
average_density
by_material_context:
solid_density
liquid_density
gas_density
bulk_density
mixture_density
related_but_distinct:
relative_density
specific_gravity
number_density
energy_density
charge_density
}
RELATIONSHIPS {
Density -> RATIO_OF -> Mass
Density -> PER -> Volume
Density -> HAS_DIMENSION -> M*L^-3
Density -> MEASURED_IN -> KilogramPerCubicMetre
Density -> INVERSE_RELATION_WITH -> SpecificVolume
Density -> MAY_DEPEND_ON -> Temperature
Density -> MAY_DEPEND_ON -> Pressure
FluidDensity -> CONTRIBUTES_TO -> HydrostaticPressure
FluidDensity -> CONTRIBUTES_TO -> BuoyantForce
DensityField -> MAY_VARY_OVER -> Position
}
SEMANTIC_EQUIVALENCE {
"mass density" ~= density WHEN mechanical_measurement_context
"kg per cubic metre" ~= "kg/m^3"
"g per cubic centimetre" ~= "g/cm^3"
"specific gravity" != density
"relative density" != absolute_mass_density
"bulk density" != intrinsic_material_density
density != mass
density != volume
density != weight_density
}
AVERAGE_LOCAL_MODEL {
AVERAGE_DENSITY:
rho_avg = total_mass / total_volume
LOCAL_DENSITY:
rho = dm/dV
MASS_FROM_DENSITY_FIELD:
m = integral_over_volume(rho dV)
RULE:
average_density NEED_NOT equal density_at_every_point
}
TEMPERATURE_PRESSURE_MODEL {
GENERAL:
rho = rho(T, p, composition)
LIQUIDS_AND_SOLIDS:
density_often_changes_with_thermal_expansion
under_temperature_change
GASES:
density_can_depend_strongly_on_temperature_and_pressure
IDEAL_GAS_CONTEXT:
rho = p*M_molar/(R*T)
WHEN ideal_gas_assumptions_apply
RULE:
density_comparisons SHOULD preserve temperature_pressure_and_composition_context
}
HYDROSTATIC_MODEL {
RELATION:
dp/dh = rho*g
under_defined_depth_coordinate_and_sign_convention
CONSTANT_DENSITY_APPROXIMATION:
delta_p = rho*g*delta_h
CONDITIONS:
fluid_at_rest
gravitational_field_defined
}
BUOYANCY_MODEL {
ARCHIMEDES_RELATION:
buoyant_force = displaced_fluid_density * gravitational_acceleration * displaced_volume
FORM:
F_b = rho_fluid * g * V_displaced
RULE:
buoyancy_analysis requires_fluid_density_and_displaced_volume
}
RELATIVE_DENSITY_MODEL {
DEFINITION:
relative_density = material_density / reference_density
PROPERTY:
dimensionless = true
COMMON_CONTEXT:
specific_gravity often_uses_water_as_reference_for_liquids_and_solids
RULE:
reference_material_and_reference_conditions MUST be identified
}
CONSTRAINTS {
density_is_scalar_quantity = true
dimensional_formula = M*L^-3
SI_unit = kg/m^3
volume_must_be_nonzero_for_average_density_calculation = true
density_and_mass_are_not_semantically_equivalent = true
density_and_specific_gravity_are_not_semantically_equivalent = true
density_value_may_require_temperature_pressure_and_composition_context = true
local_density_and_average_density_must_not_be_assumed_equal_in_nonuniform_material = true
}
MEASUREMENT_MODEL {
OBSERVABLE:
Density
DIRECT_OR_INSTRUMENTAL_MEASUREMENT:
densitometer
hydrometer
pycnometer
digital_density_meter
INDIRECT_MEASUREMENT:
mass_divided_by_volume
displacement_volume_method
hydrostatic_weighing
equation_of_state_inference
RECORD:
numerical_value
unit
density_type
material_or_medium
mass
volume
temperature
pressure
composition_when_relevant
spatial_location_when_local
timestamp
measurement_method
instrument
calibration_state
uncertainty
UNCERTAINTY:
measured_or_inferred_density = best_estimate +/- uncertainty
}
REASONING_RULES {
IF mass_known AND volume_known AND volume != 0
THEN average_density = mass / volume
IF density_known AND volume_known
THEN mass = density * volume
WHEN density_uniform_or_density_represents_average_for_volume
IF mass_known AND density_known AND density != 0
THEN volume = mass / density
IF density_field_known
THEN total_mass = integral_over_volume(density dV)
IF density_known AND density != 0
THEN specific_volume = 1 / density
IF fluid_density_constant AND depth_difference_known
THEN hydrostatic_pressure_difference = density * g * depth_difference
IF displaced_fluid_density_known AND displaced_volume_known
THEN buoyant_force = density * g * displaced_volume
IF material_density_known AND reference_density_known AND reference_density != 0
THEN relative_density = material_density / reference_density
}
FIELD_MODEL {
density_field:
rho = rho(x, y, z, t)
total_mass:
m = integral_V(rho dV)
conservation_context:
density MAY participate_in mass_continuity_equations
RULE:
spatially_varying_density requires_location_or_field_representation
}
MATERIAL_CONTEXT_MODEL {
REQUIRE_WHEN_RELEVANT:
material_identity
phase
composition
temperature
pressure
RULE:
tabulated_density_value SHOULD_NOT be treated_as_universal_constant
unless applicable_conditions_are_preserved
}
CONFIDENCE {
definition_confidence: 1.00
dimensional_confidence: 1.00
SI_unit_confidence: 1.00
mass_volume_relationship_confidence: 1.00
environmental_dependence_confidence: 0.99
measurement_context_confidence: 0.98
RULE:
confidence decreases when unit, material, volume definition,
temperature, pressure, composition, measurement method,
calibration state or uncertainty is missing or ambiguous
}
VALIDATION {
CHECK dimensional_consistency
CHECK unit_consistency
CHECK volume_nonzero_for_ratio_calculation
CHECK average_vs_local_density_semantics
CHECK material_or_medium_identity
CHECK temperature_and_pressure_when_relevant
CHECK composition_when_relevant
CHECK density_relative_density_distinction
CHECK bulk_vs_intrinsic_density_distinction
CHECK instrument_calibration_when_measured
CHECK uncertainty_representation_when_required
}
UPDATE_MODEL {
ON new_measurement:
validate_unit
identify_density_type
identify_material_or_medium
validate_mass_and_volume_when_used
attach_temperature_and_pressure_when_relevant
normalize_to_canonical_unit
preserve_original_value_and_unit
attach_timestamp
attach_uncertainty
update_density_state
ON environmental_condition_change:
update_temperature
update_pressure
update_phase_or_composition_when_required
recompute_density_if_model_available
preserve_previous_state
ON spatial_sampling_update:
attach_location
update_density_field
recompute_average_density_when_required
recompute_total_mass_when_required
ON revised_calibration:
preserve_provenance
recompute_affected_measurements
update_confidence
ON semantic_revision:
preserve_previous_definition
record_revision
recompute_FLOW_HASH
}
AI_CONSUMPTION {
canonical_entity: Density
canonical_symbol: rho
canonical_dimension: M*L^-3
canonical_SI_unit: kg/m^3
interpretation_order:
identify_quantity
identify_density_type
identify_value
identify_unit
identify_mass_and_volume_context
identify_material_or_medium
identify_phase_and_composition
identify_temperature
identify_pressure
identify_local_or_average_context
identify_measurement_method
identify_uncertainty
validate_dimensions
infer_relationships
ambiguity_controls:
distinguish_density_from_mass
distinguish_density_from_volume
distinguish_mass_density_from_weight_density
distinguish_density_from_specific_gravity
distinguish_absolute_density_from_relative_density
distinguish_bulk_from_intrinsic_material_density
distinguish_local_from_average_density
distinguish_mass_density_from_other_density_types
}
PROVENANCE {
ontology_scope:
mathematical_measurement_and_mechanical_quantity_semantics
parent_path:
Ontologies
-> Mathematical Ontologies
-> Measurement & Units Ontologies
-> Mechanical Measurements
-> Density Ontology
authorship:
Mark Higgins
Sky (Recursive AI)
site:
https://kirethresearch.org
}
FLOW_HASH {
INPUTS:
canonical_entity
ontology_path
definitions
dimensions
units
relationships
constraints
average_local_model
temperature_pressure_model
hydrostatic_model
buoyancy_model
relative_density_model
field_model
material_context_model
reasoning_rules
measurement_model
confidence_model
update_model
PURPOSE:
deterministic_semantic_integrity_identifier
RECOMPUTE_WHEN:
ontology_definition_changes
relationship_model_changes
environmental_context_model_changes
field_model_changes
constraint_model_changes
reasoning_rule_changes
unit_model_changes
}
}
END FLOW
Download Code
Copy to Clipboard