@prefix sdsp: <https://tools.ontozoo.io/sdsp-ontology#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .



<https://tools.ontozoo.io/sdsp-ontology> a owl:Ontology ;
    rdfs:label "Simple downstream separation process (DSP) ontology"@en ;
    owl:versionInfo "0.2" ;
    rdfs:comment "A simple ontology for downstream separation processes."@en .



sdsp:Mixture a owl:Class ;
    rdfs:label "Mixture"@en ;
    rdfs:comment "Material at one point in the process; it is described by its components, phases and conditions."@en .


sdsp:MixtureComponent a owl:Class ;
    rdfs:label "Mixture component"@en ;
    rdfs:comment "One substance in one particular mixture (with a concentration)."@en .


sdsp:TargetComponent a owl:Class ;
    rdfs:subClassOf sdsp:MixtureComponent ;
    rdfs:label "Target component"@en ;
    rdfs:comment "The product we want (e.g. lactic acid)."@en .


sdsp:ByProduct a owl:Class ;
    rdfs:subClassOf sdsp:MixtureComponent ;
    rdfs:label "By-product"@en ;
    rdfs:comment "A mixture component made alongside the target."@en .


sdsp:ReusableByProduct a owl:Class ;
    rdfs:subClassOf sdsp:ByProduct ;
    rdfs:label "Re-usable by-product"@en ;
    rdfs:comment "A by-product that can be recovered or reused."@en .


sdsp:Impurity a owl:Class ;
    rdfs:subClassOf sdsp:MixtureComponent ;
    rdfs:label "Impurity"@en ;
    rdfs:comment "Anything unwanted that is neither the target nor a by-product."@en .


sdsp:Reagent a owl:Class ;
    rdfs:subClassOf sdsp:MixtureComponent ;
    rdfs:label "Reagent"@en ;
    rdfs:comment "Something the process deliberately adds. For example, an acid, a base, a solvent, and so forth."@en .


sdsp:Substance a owl:Class ;
    rdfs:label "Substance"@en ;
    rdfs:comment "A kind of chemical or material, independent of any mixture. For example: lactic acid, water, glucose."@en .


sdsp:Quantity a owl:Class ;
    rdfs:label "Quantity"@en ;
    rdfs:comment "A number with its unit."@en .


sdsp:UnitSpecification a owl:Class ;
    rdfs:label "Unit specification"@en ;
    rdfs:comment "One step in one particular process. A unit specifications 'applies' a unit operation ('appliesOperation') and describes the input, output and operational parameters (setting)."@en .


sdsp:FlowsheetSpecification a owl:Class ;
    rdfs:label "Flowsheet specification"@en ;
    rdfs:comment "One whole process (this could be as it is described by a particular paper, for instance)."@en .


sdsp:TargetSpecification a owl:Class ;
    rdfs:subClassOf
        [ a owl:Restriction ; owl:onProperty sdsp:hasTargetSubstance ; owl:someValuesFrom sdsp:Substance ] ,
        [ a owl:Restriction ; owl:onProperty sdsp:hasPurity ; owl:someValuesFrom sdsp:Quantity ] ,
        [ a owl:Restriction ; owl:onProperty sdsp:hasYield ; owl:someValuesFrom sdsp:Quantity ] ;
    rdfs:label "Target specification"@en ;
    rdfs:comment "What the product must meet, i.e., which substance, and the required purity and yield."@en .




# classes that are openly enumerable


sdsp:UnitOperation a owl:Class ;
    rdfs:label "Unit operation"@en ;
    rdfs:comment "The type of technique a step applies, for example: distillation, filtration, and so forth. We assume this can be extended (if an operation is not listed it can be added)."@en .


sdsp:PhysicoChemicalProperty a owl:Class ;
    rdfs:label "Physicochemical property"@en ;
    rdfs:comment "A property in which substances can differ (which a separation can exploit). For example, size, density, and so forth."@en .


sdsp:Phase a owl:Class ;
    rdfs:label "Phase"@en ;
    rdfs:comment "Solid, liquid or gas."@en .




# disjointness axioms (classes)


[] a owl:AllDisjointClasses ;
    owl:members ( 
        sdsp:Mixture 
        sdsp:MixtureComponent 
        sdsp:Substance 
        sdsp:Quantity 
        sdsp:UnitSpecification
        sdsp:FlowsheetSpecification 
        sdsp:TargetSpecification 
        sdsp:UnitOperation 
        sdsp:PhysicoChemicalProperty
        sdsp:Phase ) .




# Object Properties (associated with mixtures).


sdsp:hasComponent a owl:ObjectProperty ;
    rdfs:label "has component"@en ;
    rdfs:comment ""@en ;
    rdfs:domain sdsp:Mixture ;
    rdfs:range sdsp:MixtureComponent .


sdsp:ofSubstance a owl:ObjectProperty ;
    rdfs:label "of substance"@en ;
    rdfs:comment "Which substance this component is. Usually one value, but deliberately not declared functional (extracted data with several values stays consistent)."@en ;
    rdfs:domain sdsp:MixtureComponent ;
    rdfs:range sdsp:Substance .


sdsp:hasConcentration a owl:ObjectProperty ;
    rdfs:label "has concentration"@en ;
    rdfs:comment "How much of the substance is in this mixture."@en ;
    rdfs:domain sdsp:MixtureComponent ;
    rdfs:range sdsp:Quantity .


sdsp:hasPhase a owl:ObjectProperty ;
    rdfs:label "has phase"@en ;
    rdfs:comment "A mixture can have several phases. For instance, a broth is liquid plus solid cells."@en ;
    rdfs:domain sdsp:Mixture ; 
    rdfs:range sdsp:Phase .


sdsp:hasCondition a owl:ObjectProperty ;
    rdfs:label "has condition"@en ;
    rdfs:comment "Temperature, pH, etc."@en ;
    rdfs:domain sdsp:Mixture ; 
    rdfs:range sdsp:Quantity .




# Object Properties (associated with UnitSpecifications, which 'wrap' UnitOperations).


sdsp:appliesOperation a owl:ObjectProperty ;
    rdfs:label "applies operation"@en ;
    rdfs:comment "Which kind of operation the step is."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range sdsp:UnitOperation .


sdsp:hasInput a owl:ObjectProperty ;
    rdfs:label "has input"@en ;
    rdfs:comment "A mixture as input."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range sdsp:Mixture .


sdsp:isInputOf a owl:ObjectProperty ;
    rdfs:label "is input of"@en ;
    owl:inverseOf sdsp:hasInput ;
    rdfs:comment "The inverse of hasInput (allows 'precedes' to be defined by a property chain)."@en ;
    rdfs:domain sdsp:Mixture ; 
    rdfs:range sdsp:UnitSpecification .


sdsp:hasOutput a owl:ObjectProperty ;
    rdfs:label "has output"@en ;
    rdfs:comment "A mixture as output."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range sdsp:Mixture .


sdsp:precedes a owl:ObjectProperty ;
    rdfs:label "precedes"@en ;
    rdfs:comment "A precedes B when material flows directly from A into B; i.e., A's output is B's input."@en ;
    owl:propertyChainAxiom ( sdsp:hasOutput sdsp:isInputOf ) ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range sdsp:UnitSpecification .


sdsp:hasParameter a owl:ObjectProperty ;
    rdfs:label "has parameter"@en ;
    rdfs:comment "An operational setting or parameter for a step (such as temperature)."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range sdsp:Quantity .


sdsp:exploitsProperty a owl:ObjectProperty ;
    rdfs:label "exploits property (difference)"@en ;
    rdfs:comment "The property for which substances differ, exploitable by the UnitOperation for separation."@en ;
    rdfs:domain sdsp:UnitOperation ; 
    rdfs:range sdsp:PhysicoChemicalProperty .




# Object properties associated with a flowsheet and a target specification.


sdsp:hasStep a owl:ObjectProperty ;
    rdfs:label "has step"@en ;
    rdfs:comment "A set of UnitSpecifications (that wrap operations)."@en ;
    rdfs:domain sdsp:FlowsheetSpecification ; 
    rdfs:range sdsp:UnitSpecification .


sdsp:hasFeed a owl:ObjectProperty ;
    rdfs:label "has feed"@en ;
    rdfs:comment "Mixture which is coming from the upstream production step, e.g. the fermentation broth (m_0)."@en ;
    rdfs:domain sdsp:FlowsheetSpecification ; 
    rdfs:range sdsp:Mixture .


sdsp:hasProduct a owl:ObjectProperty ;
    rdfs:label "has product"@en ;
    rdfs:comment "The final product mixture."@en ;
    rdfs:domain sdsp:FlowsheetSpecification ; 
    rdfs:range sdsp:Mixture .


sdsp:hasTarget a owl:ObjectProperty ;
    rdfs:label "has target (specification)"@en ;
    rdfs:comment "A flowsheet specification has a target specification that it must meet to be acceptable."@en ;
    rdfs:domain sdsp:FlowsheetSpecification ; 
    rdfs:range sdsp:TargetSpecification .


sdsp:hasTargetSubstance a owl:ObjectProperty ;
    rdfs:label "has target (substance)"@en ;
    rdfs:comment "The target specification has a target substance (with a target purity)."@en ;
    rdfs:domain sdsp:TargetSpecification ;
    rdfs:range sdsp:Substance .


sdsp:hasPurity a owl:ObjectProperty ;
    rdfs:label "has purity"@en ;
    rdfs:comment "Purity (of a product) as a quantity. Note that when applied to a TargetSpecification it is the required value, to a FlowsheetSpecification it is the achieved value. No domain is declared."@en ;
    rdfs:range sdsp:Quantity .


sdsp:hasYield a owl:ObjectProperty ;
    rdfs:label "has yield"@en ;
    rdfs:comment "The share of the target in the feed that is present in the product. When applied to a TargetSpecification it is the required value, to a FlowsheetSpecification it is the achieved value. No domain is declared."@en ;
    rdfs:range sdsp:Quantity .




# Data Properties


sdsp:hasValue a owl:DatatypeProperty ;
    rdfs:label "has value"@en ;
    rdfs:comment "A 'literal' (decimal)."@en ;
    rdfs:domain sdsp:Quantity ; 
    rdfs:range xsd:decimal .


sdsp:hasUnit a owl:DatatypeProperty ;
    rdfs:label "has unit"@en ;
    rdfs:comment "The written unit, such as ml (a simple string literal)."@en ;
    rdfs:domain sdsp:Quantity ; 
    rdfs:range xsd:string .


sdsp:quantityKind a owl:DatatypeProperty ;
    rdfs:label "quantity kind"@en ;
    rdfs:comment "What the number (quantity) measures: temperature, pH (for example). Needed for hasCondition and hasParameter."@en ;
    rdfs:domain sdsp:Quantity ; 
    rdfs:range xsd:string .


sdsp:stepNumber a owl:DatatypeProperty ;
    rdfs:label "step number"@en ;
    rdfs:comment "Enumerates the application of a UnitSpecification. Recycle loops use 'precedes'."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range xsd:positiveInteger .


sdsp:operationLabel a owl:DatatypeProperty ;
    rdfs:label "operation label"@en ;
    rdfs:comment "The operation's name as written in the literature."@en ;
    rdfs:domain sdsp:UnitSpecification ; 
    rdfs:range xsd:string .


sdsp:reportedIn a owl:DatatypeProperty ;
    rdfs:label "reported in (citation)"@en ;
    rdfs:comment "A reference to the paper the process was extracted from (e.g. a DOI URL)."@en ;
    rdfs:domain sdsp:FlowsheetSpecification ; 
    rdfs:range xsd:anyURI .




# physicochemical properties as 'enumerable' individuals rather than subclasses


sdsp:size a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ;
    rdfs:label "size"@en .

sdsp:density a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ;
    rdfs:label "density"@en .

sdsp:charge a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ;
    rdfs:label "charge"@en .

sdsp:affinity a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ;
    rdfs:label "affinity"@en .

sdsp:volatility a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ; 
    rdfs:label "volatility"@en .

sdsp:solubility a owl:NamedIndividual , sdsp:PhysicoChemicalProperty ; 
    rdfs:label "solubility"@en .



[] a owl:AllDifferent ;
    owl:distinctMembers ( 
        sdsp:size 
        sdsp:density 
        sdsp:charge 
        sdsp:affinity 
        sdsp:volatility 
        sdsp:solubility ) .




# unit operations as 'enumerable' individuals rather than subclasses


sdsp:distillation a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "distillation"@en ;
    sdsp:exploitsProperty sdsp:volatility .

sdsp:centrifugation a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "centrifugation"@en ;
    sdsp:exploitsProperty sdsp:density .

sdsp:solventExtraction a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "solvent extraction"@en ;
    sdsp:exploitsProperty sdsp:solubility .

sdsp:crystallisation a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "crystallisation"@en ;
    sdsp:exploitsProperty sdsp:solubility .

sdsp:membraneSeparation a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "membrane separation"@en ;
    sdsp:exploitsProperty sdsp:size .

sdsp:filtration a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "filtration"@en ;
    sdsp:exploitsProperty sdsp:size .

sdsp:adsorption a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "adsorption"@en ;
    sdsp:exploitsProperty sdsp:affinity .

sdsp:otherOperation a owl:NamedIndividual , sdsp:UnitOperation ; 
    rdfs:label "other operation"@en .


[] a owl:AllDifferent ;
    owl:distinctMembers ( 
        sdsp:distillation 
        sdsp:centrifugation 
        sdsp:solventExtraction 
        sdsp:crystallisation
        sdsp:membraneSeparation
        sdsp:filtration
        sdsp:adsorption
        sdsp:otherOperation ) .




# phases as 'enumerable' individuals


sdsp:solid a owl:NamedIndividual , sdsp:Phase ; 
    rdfs:label "solid"@en .

sdsp:liquid a owl:NamedIndividual , sdsp:Phase ; 
    rdfs:label "liquid"@en .

sdsp:gas a owl:NamedIndividual , sdsp:Phase ; 
    rdfs:label "gas"@en .



[] a owl:AllDifferent ; 
    owl:distinctMembers ( 
        sdsp:solid 
        sdsp:liquid 
        sdsp:gas ) .
