-- | Defines concepts used in the field of thermodynamics.
module Data.Drasil.Concepts.Thermodynamics where

import Language.Drasil
--import Utils.Drasil
import Language.Drasil.Chunk.Concept.NamedCombinators

import Data.Drasil.Concepts.Documentation (source, theory)
import Data.Drasil.Concepts.Physics (energy)

-- | Collects all thermodynamics-related concepts.
thermocon :: [ConceptChunk]
thermocon :: [ConceptChunk]
thermocon = [ConceptChunk
boilPt, ConceptChunk
boiling, ConceptChunk
degree_', ConceptChunk
enerSrc, ConceptChunk
heat, ConceptChunk
heatCapSpec, ConceptChunk
heatTrans,
  ConceptChunk
htFlux, ConceptChunk
htTransTheo, ConceptChunk
latentHeat, ConceptChunk
lawConsEnergy, ConceptChunk
lawConvCooling, ConceptChunk
meltPt,
  ConceptChunk
melting, ConceptChunk
phaseChange, ConceptChunk
sensHeat, ConceptChunk
temp, ConceptChunk
thermalAnalysis, ConceptChunk
thermalConduction,
  ConceptChunk
thermalConductor, ConceptChunk
thermalEnergy]

boilPt, boiling, degree_', enerSrc, heat, heatCapSpec, heatTrans, htFlux,
  htTransTheo, latentHeat, lawConsEnergy, lawConvCooling, meltPt, melting,
  phaseChange, sensHeat, temp, thermalAnalysis, thermalConduction,
  thermalConductor, thermalEnergy :: ConceptChunk
  
-- FIXME: "Boiling" is not a noun. How should we deal with it?
--    Same for "Melting"
boiling :: ConceptChunk
boiling           = String -> NP -> String -> ConceptChunk
dcc "boiling"           (String -> NP
cn "boiling")
                      "the phase change from liquid to vapour"
boilPt :: ConceptChunk
boilPt            = String -> NP -> String -> ConceptChunk
dcc "boilPt"           (String -> NP
cn' "boiling point temperature")
                      "the temperature at which a substance changes from liquid to vapour"
degree_' :: ConceptChunk
degree_'          = String -> NP -> String -> ConceptChunk
dcc "degree"            (String -> NP
cn' "degree")
                      "a measure of the warmth or coldness of an object or substance"
heat :: ConceptChunk
heat              = String -> NP -> String -> ConceptChunk
dcc "heat"              (String -> NP
cn "heat")
                      ("Noun: The amount of heat energy inside a body. " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "Verb: To transfer thermal energy to a body") -- FIXME: there shouldn't be two definitions in one
heatTrans :: ConceptChunk
heatTrans         = String -> NP -> String -> ConceptChunk
dcc "heatTrans"         (String -> NP
cn' "heat transfer")
                      ("the generation, use, conversion, and exchange of thermal " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "energy and heat between physical systems")
heatCapSpec :: ConceptChunk
heatCapSpec       = String -> NP -> String -> ConceptChunk
dcc "heatCapSpec"       (String -> NP
cnIES "specific heat capacity")
                      ("the amount of energy required to raise the temperature " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "of the unit mass of a given substance by a given amount")
htFlux :: ConceptChunk
htFlux            = String -> NP -> String -> ConceptChunk
dcc "htFlux"            (String -> NP
cn'' "heat flux") 
                      ("the rate of thermal energy transfer through a given " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "surface per unit time")
latentHeat :: ConceptChunk
latentHeat        = String -> NP -> String -> ConceptChunk
dcc "latentHeat"        (String -> NP
cn' "latent heat")
                      ("the heat required to convert a solid into a liquid or " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "vapor, or a liquid into a vapor, without change of temperature")
lawConsEnergy :: ConceptChunk
lawConsEnergy     = String -> NP -> String -> ConceptChunk
dcc "lawConsEnergy"     (String -> NP
nounPhraseSP "law of conservation of energy")
                      "the law that energy is conserved"
lawConvCooling :: ConceptChunk
lawConvCooling    = String -> NP -> String -> ConceptChunk
dcc "lawConvCooling"    (String -> NP
nounPhraseSP "Newton's law of cooling")
                      "Newton's law of convective cooling"
melting :: ConceptChunk
melting           = String -> NP -> String -> ConceptChunk
dcc "melting"           (String -> NP
cn "melting")
                      "the phase change from solid to liquid"
meltPt :: ConceptChunk
meltPt            = String -> NP -> String -> ConceptChunk
dcc "meltPt"            (String -> NP
cn' "melting point temperature")
                      "the temperature at which a substance changes from liquid to vapour"
phaseChange :: ConceptChunk
phaseChange       = String -> NP -> String -> ConceptChunk
dcc "phaseChange"       (String -> NP
cn' "phase change")
                      "a change of state"
sensHeat :: ConceptChunk
sensHeat          = String -> NP -> String -> ConceptChunk
dcc "sensHeat"          (String -> NP
cn' "sensible heat")
                      ("heat exchanged by a body in which the exchange of heat " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "changes the temperature and some macroscopic variables of " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "the body or system, but leaves others unchanged")
temp :: ConceptChunk
temp              = String -> NP -> String -> ConceptChunk
dcc "temperature"       (String -> NP
cn' "temperature")
                      "the degree or intensity of heat present in a substance or object"
thermalAnalysis :: ConceptChunk
thermalAnalysis   = String -> NP -> String -> ConceptChunk
dcc "thermalAnalysis"
                      (String -> PluralRule -> NP
cnIP "thermal analysis" ((String -> String) -> PluralRule
IrregPlur (\x :: String
x -> String -> String
forall a. [a] -> [a]
init (String -> String
forall a. [a] -> [a]
init String
x) String -> String -> String
forall a. [a] -> [a] -> [a]
++ "es")))
                      "the study of material properties as they change with temperature"
thermalConduction :: ConceptChunk
thermalConduction = String -> NP -> String -> ConceptChunk
dcc "thermalConduction" (String -> NP
nounPhraseSP "thermal conduction")
                      "the transfer of heat energy through a substance"
thermalConductor :: ConceptChunk
thermalConductor  = String -> NP -> String -> ConceptChunk
dcc "thermalConductor"  (String -> NP
cn' "thermal conductor")
                      "an object through which thermal energy can be transferred easily"
thermalEnergy :: ConceptChunk
thermalEnergy     = String -> NP -> String -> ConceptChunk
dcc "thermalEnergy"     (String -> NP
cnIES "thermal energy")
                      "the energy that comes from heat"

enerSrc :: ConceptChunk
enerSrc           = String -> NP -> String -> ConceptChunk
dcc "enerSrc"     (ConceptChunk -> NamedChunk -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
combineNINI ConceptChunk
energy NamedChunk
source)
                      "a source from which useful energy can be extracted"
htTransTheo :: ConceptChunk
htTransTheo       = String -> NP -> String -> ConceptChunk
dcc "htTransTheo" (ConceptChunk -> NamedChunk -> NP
forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP
combineNINI ConceptChunk
heatTrans NamedChunk
theory)
                      ("the theory predicting the energy transfer that may take " String -> String -> String
forall a. [a] -> [a] -> [a]
++
                      "place between material bodies as a result of temperature difference")