diff --git a/docs/src/equation_sets.md b/docs/src/equation_sets.md index 7ff9973..18f0ca4 100644 --- a/docs/src/equation_sets.md +++ b/docs/src/equation_sets.md @@ -117,7 +117,44 @@ dflt = plume(scn, GaussianPlume(), DefaultSet) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{DefaultWind, Nothing, Defaultσy, Defaultσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 1.150112899011524, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{DefaultWind, Nothing, Defaultσy, Defaultσz}(DefaultWind(), nothing, Defaultσy(), Defaultσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 1.150112899011524 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: DefaultWind() + σx equation: nothing + σy equation: Defaultσy() + σz equation: Defaultσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -128,7 +165,44 @@ ccps_rurl = plume(scn, GaussianPlume(), CCPSRural) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{IrwinRural, Nothing, BriggsRuralσy, BriggsRuralσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 0.8420321686971456, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{IrwinRural, Nothing, BriggsRuralσy, BriggsRuralσz}(IrwinRural(), nothing, BriggsRuralσy(), BriggsRuralσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 0.8420321686971456 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: IrwinRural() + σx equation: nothing + σy equation: BriggsRuralσy() + σz equation: BriggsRuralσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -137,7 +211,44 @@ ccps_urb = plume(scn, GaussianPlume(), CCPSUrban) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{IrwinUrban, Nothing, BriggsUrbanσy, BriggsUrbanσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 0.7989729675905327, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{IrwinUrban, Nothing, BriggsUrbanσy, BriggsUrbanσz}(IrwinUrban(), nothing, BriggsUrbanσy(), BriggsUrbanσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 0.7989729675905327 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: IrwinUrban() + σx equation: nothing + σy equation: BriggsUrbanσy() + σz equation: BriggsUrbanσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -146,7 +257,44 @@ isc3_rurl = plume(scn, GaussianPlume(), ISC3Rural) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{IrwinRural, Nothing, ISC3Ruralσy, ISC3Ruralσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 0.8420321686971456, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{IrwinRural, Nothing, ISC3Ruralσy, ISC3Ruralσz}(IrwinRural(), nothing, ISC3Ruralσy(), ISC3Ruralσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 0.8420321686971456 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: IrwinRural() + σx equation: nothing + σy equation: ISC3Ruralσy() + σz equation: ISC3Ruralσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -155,7 +303,44 @@ isc3_urb = plume(scn, GaussianPlume(), ISC3Urban) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{ISC3UrbanWind, Nothing, BriggsUrbanσy, BriggsUrbanσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 1.0947417281650496, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{ISC3UrbanWind, Nothing, BriggsUrbanσy, BriggsUrbanσz}(ISC3UrbanWind(), nothing, BriggsUrbanσy(), BriggsUrbanσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 1.0947417281650496 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: ISC3UrbanWind() + σx equation: nothing + σy equation: BriggsUrbanσy() + σz equation: BriggsUrbanσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -164,7 +349,44 @@ tno = plume(scn, GaussianPlume(), TNOPlume) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{TNOWind, Nothing, TNOPlumeσy, TNOPlumeσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 0.8753751236458281, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{TNOWind, Nothing, TNOPlumeσy, TNOPlumeσz}(TNOWind(), nothing, TNOPlumeσy(), TNOPlumeσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 0.8753751236458281 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: TNOWind() + σx equation: nothing + σy equation: TNOPlumeσy() + σz equation: TNOPlumeσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -173,7 +395,44 @@ turner = plume(scn, GaussianPlume(), Turner) # output -GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.SimpleCrossTerm, GasDispersion.SimpleVerticalTerm, GasDispersion.NoPlumeRise, BasicEquationSet{DefaultWind, Nothing, Turnerσy, Turnerσz}, GasDispersion.ProblemDomain{Float64}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 1.150112899011524, 3.5, GasDispersion.SimpleCrossTerm(), GasDispersion.SimpleVerticalTerm(), GasDispersion.NoPlumeRise(), BasicEquationSet{DefaultWind, Nothing, Turnerσy, Turnerσz}(DefaultWind(), nothing, Turnerσy(), Turnerσz()), GasDispersion.ProblemDomain{Float64}(0.0, Inf, -Inf, Inf, 0.0, Inf)) +Gaussian Plume model - subtype gaussian: + mass rate: 0.08991798763471508 kg/s + windspeed: 1.150112899011524 m/s + effective stack height: 3.5 m + plume rise model: GasDispersion.NoPlumeRise() +Basic Equation Set: + wind equation: DefaultWind() + σx equation: nothing + σy equation: Turnerσy() + σz equation: Turnerσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` diff --git a/docs/src/plume.md b/docs/src/plume.md index 76418ee..82d0e82 100644 --- a/docs/src/plume.md +++ b/docs/src/plume.md @@ -285,8 +285,47 @@ the initial concentration is calculated from the mass flowrate and volumetric fl Suppose we wish to model the dispersion of gaseous propane using the same scenario, `scn`, worked out above. -```jldoctest gaussplume; output = true, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" +```jldoctest gaussplume; output = false, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" j = plume(scn, SimpleJet()) + +# output + +Plume model - subtype simple_jet: + k2: 6.0 + k3: 5.0 + angle: -0.0 rad +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: Inf s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() + +``` + +```jldoctest gaussplume; output = true, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" j(100,0,2) # output @@ -394,9 +433,46 @@ SimpleAtmosphere atmosphere: Generating a solution using the Britter-McQuaid model is quite simple -```jldoctest burro; output = true, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" +```jldoctest burro; output = false, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" bm = plume(scn, BritterMcQuaidPlume()) +# output + +Plume model - subtype brittermcquaid: +Substance: LNG + MW: 0.01604 kg/mol + P_v: GasDispersion.Antoine{Float64}(8.814018574933064, 983.6444729625298, 0.0) Pa + ρ_g: 1.76 kg/m^3 + ρ_l: 425.6 kg/m^3 + T_ref: 111.14999999999998 K + P_ref: 101325.0 Pa + k: 1.4 + T_b: 111.6 K + Δh_v: 509880.0 J/kg + Cp_g: 2240.0 J/kg/K + Cp_l: 3349.0 J/kg/K +HorizontalJet release: + ṁ: 97.888 kg/s + Δt: 174.0 s + d: 1.0 m + u: 70.81526849717933 m/s + h: 0.0 m + P: 101325.0 Pa + T: 111.14999999999998 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.0 K + u: 10.9 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() + + +``` + +```jldoctest burro; output = true, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***" + bm(367,0,0) # output diff --git a/docs/src/puff.md b/docs/src/puff.md index 7f88444..08c61d3 100644 --- a/docs/src/puff.md +++ b/docs/src/puff.md @@ -156,7 +156,43 @@ g = puff(scn, GaussianPuff()) # output -GasDispersion.GaussianPuffSolution{Float64, BasicEquationSet{DefaultWind, CCPSPuffσx, CCPSPuffσy, CCPSPuffσz}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, 10.0, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :gaussian, 0.8991798763471508, 1.8023818673116125, 3.5, 1.150112899011524, BasicEquationSet{DefaultWind, CCPSPuffσx, CCPSPuffσy, CCPSPuffσz}(DefaultWind(), CCPSPuffσx(), CCPSPuffσy(), CCPSPuffσz())) +Gaussian Puff model - subtype gaussian: + total mass: 0.8991798763471508 kg + release windspeed: 1.150112899011524 m/s + release height: 3.5 m +Basic Equation Set: + wind equation: DefaultWind() + σx equation: CCPSPuffσx() + σy equation: CCPSPuffσy() + σz equation: CCPSPuffσz() +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: 10.0 s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` @@ -273,7 +309,35 @@ ig = puff(scn, IntPuff(); n=100) # output -GasDispersion.IntPuffSolution{Float64, Int64, BasicEquationSet{DefaultWind, CCPSPuffσx, CCPSPuffσy, CCPSPuffσz}}(Scenario{Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, Float64, GasDispersion.Antoine{Float64}, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, 10.0, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF())), :intpuff, 0.08991798763471508, 1.8023818673116125, 10.0, 3.5, 1.150112899011524, 100, BasicEquationSet{DefaultWind, CCPSPuffσx, CCPSPuffσy, CCPSPuffσz}(DefaultWind(), CCPSPuffσx(), CCPSPuffσy(), CCPSPuffσz())) +Puff model - subtype intpuff: +Substance: propane + MW: 0.044096 kg/mol + P_v: GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0) Pa + ρ_g: 1.864931992847327 kg/m^3 + ρ_l: 526.13 kg/m^3 + T_ref: 288.15 K + P_ref: 101325.0 Pa + k: 1.142 + T_b: 231.02 K + Δh_v: 425740 J/kg + Cp_g: 1678 J/kg/K + Cp_l: 2520 J/kg/K +HorizontalJet release: + ṁ: 0.08991798763471508 kg/s + Δt: 10.0 s + d: 0.01 m + u: 208.10961399327573 m/s + h: 3.5 m + P: 288765.2212333958 Pa + T: 278.3846872082166 K + f_l: 0.0 +SimpleAtmosphere atmosphere: + P: 101325.0 Pa + T: 298.15 K + u: 1.5 m/s + h: 10.0 m + rh: 0.0 % + stability: ClassF() ``` At the same point as above the concentration has dropped @@ -287,7 +351,7 @@ ig(100,0,2,86) ``` ```@setup propaneleak -ig = puff(scn, IntPuff; n=100) +ig = puff(scn, IntPuff(); n=100) ``` ```@example propaneleak @@ -299,7 +363,7 @@ plot(ig, 86; xlims=(90,110), ylims=(-10,10), aspect_ratio=:equal) For short duration releases the model approximates the integral when $n \to \infty$ this is the default behaviour or when `n=Inf` ```@example propaneleak -ig_inf = puff(scn, IntPuff) +ig_inf = puff(scn, IntPuff()) plot(ig_inf, 86; xlims=(90,110), ylims=(-10,10), aspect_ratio=:equal) ``` diff --git a/src/base/base_types.jl b/src/base/base_types.jl index fae09d3..afbe92a 100644 --- a/src/base/base_types.jl +++ b/src/base/base_types.jl @@ -340,7 +340,29 @@ struct BasicEquationSet{WIND,SIGMAX,SIGMAY,SIGMAZ} <: EquationSet sigmaz::SIGMAZ end +function Base.show(io::IO, mime::MIME"text/plain", eqs::BasicEquationSet) + print(io, "Basic Equation Set:\n") + print(io, " wind equation: $(eqs.wind)\n") + print(io, " σx equation: $(eqs.sigmax)\n") + print(io, " σy equation: $(eqs.sigmay)\n") + print(io, " σz equation: $(eqs.sigmaz)\n") +end + _wind_equation(eqs::BasicEquationSet) = eqs.wind _sigma_x(eqs::BasicEquationSet) = eqs.sigmax _sigma_y(eqs::BasicEquationSet) = eqs.sigmay -_sigma_z(eqs::BasicEquationSet) = eqs.sigmaz \ No newline at end of file +_sigma_z(eqs::BasicEquationSet) = eqs.sigmaz + + +# Plume and Puff utils +function Base.show(io::IO, mime::MIME"text/plain", p::Plume) + p_type = string(p.model) + print(io, "Plume model - subtype $p_type:\n") + show(io,mime,p.scenario) +end + +function Base.show(io::IO, mime::MIME"text/plain", p::Puff) + p_type = string(p.model) + print(io, "Puff model - subtype $p_type:\n") + show(io,mime,p.scenario) +end \ No newline at end of file diff --git a/src/models/gaussian_plume.jl b/src/models/gaussian_plume.jl index 66009a1..924c1bf 100644 --- a/src/models/gaussian_plume.jl +++ b/src/models/gaussian_plume.jl @@ -22,6 +22,17 @@ struct GaussianPlumeSolution{F<:Number,C<:GaussianCrossTerm,V<:GaussianVerticalT end GaussianPlumeSolution(s,m,Q,c,ρ,u,h_eff,cross,vert,pr,es,dom) = GaussianPlumeSolution(s,m,promote(Q,c,ρ,u,h_eff)...,cross,vert,pr,es,dom) +function Base.show(io::IO, mime::MIME"text/plain", p::GaussianPlumeSolution) + p_type = string(p.model) + print(io, "Gaussian Plume model - subtype $p_type:\n") + print(io, " mass rate: $(p.rate) kg/s\n") + print(io, " windspeed: $(p.windspeed) m/s\n") + print(io, " effective stack height: $(p.effective_stack_height) m\n") + print(io, " plume rise model: $(p.plumerise)\n") + show(io,mime,p.equationset) + show(io,mime,p.scenario) +end + struct SimpleCrossTerm <: GaussianCrossTerm end cross_term(y, σy, ::SimpleCrossTerm) = exp(-0.5*(y/σy)^2)/(√(2π)*σy) diff --git a/src/models/gaussian_puff.jl b/src/models/gaussian_puff.jl index ba04c67..f8a0d92 100644 --- a/src/models/gaussian_puff.jl +++ b/src/models/gaussian_puff.jl @@ -13,6 +13,16 @@ struct GaussianPuffSolution{F<:Number,E<:EquationSet} <: Puff end GaussianPuffSolution(s,m,q,ρ,h,u,es) = GaussianPuffSolution(s,m,promote(q,ρ,h,u)...,es) +function Base.show(io::IO, mime::MIME"text/plain", p::GaussianPuffSolution) + p_type = string(p.model) + print(io, "Gaussian Puff model - subtype $p_type:\n") + print(io, " total mass: $(p.mass) kg\n") + print(io, " release windspeed: $(p.windspeed) m/s\n") + print(io, " release height: $(p.height) m\n") + show(io,mime,p.equationset) + show(io,mime,p.scenario) +end + # for reverse compatibility function puff(s::Scenario, ::Type{<:GaussianPuff}, eqs=DefaultPuffSet; kwargs...) @warn "puff(scenario, GaussianPuff, eqs) is deprecated, use puff(scenario, GaussianPuff(), eqs) instead." diff --git a/src/models/simple_jet.jl b/src/models/simple_jet.jl index 3e057bc..5709dbf 100644 --- a/src/models/simple_jet.jl +++ b/src/models/simple_jet.jl @@ -14,6 +14,15 @@ struct SimpleJetSolution{F<:Number} <: Plume end SimpleJetSolution(s,m,d,h,θ,c0,kd,k2,k3) = SimpleJetSolution(s,m,promote(d,h,θ,c0,kd,k2,k3)...) +function Base.show(io::IO, mime::MIME"text/plain", p::SimpleJetSolution) + p_type = string(p.model) + print(io, "Plume model - subtype $p_type:\n") + print(io, " k2: $(p.k2)\n") + print(io, " k3: $(p.k3)\n") + print(io, " angle: $(p.angle) rad\n") + show(io,mime,p.scenario) +end + _release_angle(::HorizontalJet) = 0.0 _release_angle(::VerticalJet) = π/2 diff --git a/src/models/slab_puff.jl b/src/models/slab_puff.jl index 9a3931f..9e6d285 100644 --- a/src/models/slab_puff.jl +++ b/src/models/slab_puff.jl @@ -123,7 +123,7 @@ function puff(scenario::Scenario, ::SLAB, eqs::EquationSet=DefaultSet; # since v8.0.1 this causes DataInterpolations to error xperm = sortperm(out.cc.x) tperm = sortperm(out.cc.t) - return SLABSolution(scenario,:SLAB,inp,out,c_max, + return SLABSolution(scenario,:SLAB_HorizontalJet,inp,out,c_max, AkimaInterpolation(out.cc.cc[xperm], out.cc.x[xperm]), AkimaInterpolation(out.cc.b[xperm], out.cc.x[xperm]), AkimaInterpolation(out.cc.betac[xperm], out.cc.x[xperm]), @@ -188,7 +188,7 @@ function puff(scenario::Scenario{<:AbstractSubstance,<:VerticalJet,<:Atmosphere} # since v8.0.1 this causes DataInterpolations to error xperm = sortperm(out.cc.x) tperm = sortperm(out.cc.t) - return SLABSolution(scenario,:SLAB,inp,out,c_max, + return SLABSolution(scenario,:SLAB_VerticalJet,inp,out,c_max, AkimaInterpolation(out.cc.cc[xperm], out.cc.x[xperm]), AkimaInterpolation(out.cc.b[xperm], out.cc.x[xperm]), AkimaInterpolation(out.cc.betac[xperm], out.cc.x[xperm]),