# baseURI: http://smartlab.elis.ugent.be/aimontologies/EN-12354-3:2000/rules20091028

# --------------------------------------------------------------------------------------------------------------------------
# European Standard EN 12354-3:2000
# ---------------------------------
# Building acoustics - Estimation of acoustic performance of buildings from the 
# performance of elements
# Part 3: Airborne sound insulation against outdoor sound
#
# Norme Européenne EN 12354-3:2000
# --------------------------------
# Acoustique du bâtiment - Calcul de la performance acoustique des bâtiments 
# à partir de la performance des éléments
# Partie 3: Isolement aux bruits aériens venus de l'extérieur
#
# Europäische Norm EN 12354-3:2000
# --------------------------------
# Bauakustik - Berechnung der akustischen Eigenschaften von Gebäuden aus den 
# Bauteileigenschaften
# Teil 3: Luftschalldämmung von Aussenbauteilen gegen aussenlärm
# --------------------------------------------------------------------------------------------------------------------------
#
# This European Standard was approved by CEN on 22 January 2000.
#
# CEN members are bound to comply with the CEN/CENELEC Internal Regulations which stipulate the conditions for giving this 
# European Standard the status of a national standard without any alteration. Up-to-date lists and bibliographical references 
# concerning such national standards may be obtained on application to the Central Secretariat or to any CEN member.
#
# CEN members are the national standards bodies of Austria, Belgium, Czech Republic, Denmark, Finland, France, Germany, Greece,
# Iceland, Ireland, Italy, Luxembourg, Netherlands, Normay, Portugal, Spain, Sweden, Switzerland and United Kingdom.
# --------------------------------------------------------------------------------------------------------------------------

@prefix EN12354_rules: <http://smartlab.elis.ugent.be/aimontologies/EN-12354-3:2000/rules20091028#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix list: <http://www.co-ode.org/ontologies/lists/2008/09/11/list.owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix inst: <http://multimedialab.elis.ugent.be/ontologies/ifc/instances#> .
@prefix ifc: <http://multimedialab.elis.ugent.be/ontologies/ifc/ontology#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> . 
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#> .
@prefix EN12354: <http://smartlab.elis.ugent.be/aimontologies/EN-12354-3:2000/ontology20091028#> .


# Input:
# ------

# Sound Reduction Index R --> LayerSet Property  
# Element Surface Area A --> Geometric Property  
# Facade Surface Area As --> Geometric Property
  
                                             
  


  # --------------------------------------
  # Part 1: Infer Input
  # --------------------------------------
  


  

  # Input Reference Reverberation Time, given as 0.5 for dwellings according to EN12354-3:2000
  {
       # Find Required Input 
       ?B a EN12354:Building
  }
  =>
  {
       ?B EN12354:refReverberationTime "0.5"^^xsd:double
  }.


# -------------------------------------------------------------------------------




  # Input Tf_63Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_63Hz "0"^^xsd:double
  }.


  # Input Tf_125Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_125Hz "0"^^xsd:double
  }.


  # Input Tf_250Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_250Hz "0"^^xsd:double
  }.


  # Input Tf_500Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_500Hz "0"^^xsd:double
  }.


  # Input Tf_1000Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_1000Hz "0"^^xsd:double
  }.


  # Input Tf_2000Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_2000Hz "0"^^xsd:double
  }.


  # Input Tf_4000Hz of Acoustic Boundary Elements
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement
  }
  =>
  {
       ?BE EN12354:flankingSoundPowerRatio_4000Hz "0"^^xsd:double
  }.

  

  # --------------------------------------
  # Part 2: Calculation
  # --------------------------------------
  
  # Calculate Te,i_63Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_63Hz ?R_63 .
       
       # Check: area >= 1m2
        ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_63 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_63Hz ?l
  }.
    
  # Calculate Te,i_125Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_125Hz ?R_125 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_125 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_125Hz ?l
  }.
    
  # Calculate Te,i_250Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_250Hz ?R_250 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_250 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_250Hz ?l
  }.
    
  # Calculate Te,i_500Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_500Hz ?R_500 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_500 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_500Hz ?l
  }.
    
  # Calculate Te,i_1000Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_1000Hz ?R_1000 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_1000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_1000Hz ?l
  }.
    
  # Calculate Te,i_2000Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_2000Hz ?R_2000 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_2000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_2000Hz ?l
  }.
    
  # Calculate Te,i_4000Hz of Acoustic Boundary Elements with: area >= 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_4000Hz ?R_4000 .
       
       # Check: area >= 1m2
       ?a math:notLessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_4000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_4000Hz ?l
  }.
  
  

# -------------------------------------------------------------------------------



  # Calculate Te,i_63Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_63Hz ?R_63 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_63 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_63Hz ?l
  }.
    
  # Calculate Te,i_125Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_125Hz ?R_125 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_125 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_125Hz ?l
  }.
    
  # Calculate Te,i_250Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_250Hz ?R_250 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_250 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_250Hz ?l
  }.
    
  # Calculate Te,i_500Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_500Hz ?R_500 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_500 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_500Hz ?l
  }.
    
  # Calculate Te,i_1000Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_1000Hz ?R_1000 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_1000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_1000Hz ?l
  }.
    
  # Calculate Te,i_2000Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_2000Hz ?R_2000 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_2000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_2000Hz ?l
  }.
    
  # Calculate Te,i_4000Hz of Acoustic Boundary Elements with: area < 1m2
  {
       # Find Required Input 
       ?BE a EN12354:BoundaryElement .
       ?BE EN12354:elementSurfaceArea ?a .
       ?BE EN12354:partOfRoomBoundary ?RB .
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?BE EN12354:soundReductionIndex_4000Hz ?R_4000 .
       
       # Check: area < 1m2
       ?a math:lessThan 1 .
       
       # Do Calculation
       (?a ?atot) math:quotient ?_i .
       (?R_4000 -10) math:quotient ?_j .
       (10 ?_j) math:exponentiation ?_k .
       (?_i ?_k) math:product ?l
  }
  =>
  {
       ?BE EN12354:directSoundPowerRatio_4000Hz ?l
  }.  
  
  
  


  
# -------------------------------------------------------------------------------


      

  # Calculate R'_63Hz of Acoustic Room Boundaries
  {
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_63Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_63Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_63Hz ?m
  }.
  
  # Calculate R'_125Hz of Acoustic Room Boundaries
  {
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_125Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_125Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_125Hz ?m
  }.
  
  # Calculate R'_250Hz of Acoustic Room Boundaries
  {
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_250Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_250Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_250Hz ?m
  }.
  
  # Calculate R'_500Hz of Acoustic Room Boundaries
  {
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_500Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_500Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_500Hz ?m
  }.
  
  # Calculate R'_1000Hz of Acoustic Room Boundaries
  {
       
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_1000Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_1000Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_1000Hz ?m
  }.
  
  # Calculate R'_2000Hz of Acoustic Room Boundaries
  {
       
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_2000Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_2000Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_2000Hz ?m
  }.
  
  # Calculate R'_4000Hz of Acoustic Room Boundaries
  {
       # Find Required Input 
       ?RB a EN12354:RoomBoundary .
      
       (?SCOPE 1) e:findall (?directSPR {[EN12354:directSoundPowerRatio_4000Hz ?directSPR] EN12354:partOfRoomBoundary ?RB.} ?directSPRList) .
       (?SCOPE 1) e:findall (?flankingSPR  {[EN12354:flankingSoundPowerRatio_4000Hz ?flankingSPR] EN12354:partOfRoomBoundary ?RB.} ?flankingSPRList) .
       
       ?directSPRList math:sum ?i .
       ?flankingSPRList math:sum ?j .
       (?i ?j) math:sum ?k .        
       (10 ?l) math:exponentiation ?k .
       (-10 ?l) math:product ?m
  }
  =>
  {
       ?RB EN12354:apparentSoundReductionIndex_4000Hz ?m
  }.
  
  
# -------------------------------------------------------------------------------
  
  
  
  # Calculate D2m,nT_63Hz of Acoustic Room Boundaries
  {
       # Find Required Input         
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_63Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
       
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {
       ?RB EN12354:standardizedSoundLevelDifference_63Hz ?m
  }.
  
  
  # Calculate D2m,nT_125Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_125Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_125Hz ?m}.
  
  
  # Calculate D2m,nT_250Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_250Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_250Hz ?m}.
  
  
  # Calculate D2m,nT_500Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_500Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_500Hz ?m}.
  
  
  # Calculate D2m,nT_1000Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_1000Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_1000Hz ?m}.
  
  
  # Calculate D2m,nT_2000Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_2000Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_2000Hz ?m}.
  
  
  # Calculate D2m,nT_4000Hz of Acoustic Room Boundaries
  {
       # Find Required Input    
       ?RB a EN12354:RoomBoundary .
       ?RB EN12354:boundaryOfRoom ?R .
       ?R a EN12354:Room .
       ?R EN12354:partOfBuilding ?B .
       ?B a EN12354:Building .
       
       ?RB EN12354:apparentSoundReductionIndex_4000Hz ?SRI .
       ?RB EN12354:facadeShapeCoeff ?DLfs .
       ?RB EN12354:facadeSurfaceArea ?atot .
       ?R EN12354:volume ?vol .
       ?B EN12354:refReverberationTime ?T .
      
       # Calculate D2m,nT
       (6 ?T ?atot) math:product ?i .
       (?vol ?i) math:quotient ?j .
       (10 ?k) math:exponentiation ?j .
       (10 ?k) math:product ?l .
       (?SRI ?DLfs ?l) math:sum ?m     
  }
  =>
  {?RB EN12354:standardizedSoundLevelDifference_4000Hz ?m}.