Skip to content

Commit

Permalink
Merge pull request #6 from braamvandyk:RebuildHistory
Browse files Browse the repository at this point in the history
RebuildHistory
  • Loading branch information
braamvandyk authored Dec 1, 2023
2 parents 9e0a234 + 20cc574 commit dd9e500
Show file tree
Hide file tree
Showing 22 changed files with 1,710 additions and 1,241 deletions.
334 changes: 274 additions & 60 deletions Manifest.toml

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ version = "0.1.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
ChangePointDetection = "68f453bf-a161-50e8-aafe-8ad75c8d6944"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
HypothesisTests = "09f84164-cd44-5f33-b23f-e6b0d136a0d5"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Loess = "4345ca2d-374a-55d4-8d30-97f9976e7612"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TimeSeries = "9e3dc215-6440-5c97-bce1-76c03772f85e"

[compat]
julia = "1"
DelimitedFiles = "1"
Downloads = "1"
Statistics = "1"
Optim = "1.7"
MacroTools = "0.5"
Optim = "1.7"
PrettyTables = "2"

Statistics = "1"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
5 changes: 5 additions & 0 deletions components/nitrogen.comp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Nitrogen
1
N
2
28.0134
46 changes: 46 additions & 0 deletions demo2.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using FlowsheetTools

syscomps = ComponentList()
count = readcomponentlist!(syscomps, "components", ["Ethylene", "Ethane", "Hydrogen"])




# The next one should error
# sysstreams["Wrong"] = readstreamhistory(joinpath("streamhistories", "WrongStream.csv"), "Wrong", syscomps; ismoleflow=true)

dummy = emptystream(sysstreams, "Dummy")
dummy = sysstreams["Feed"]
dummies = sysstreams[["Feed", "Product"]]

count = length(sysstreams)

dummy = dummies[1] + dummies[2]
dummy = 2 * dummy
dummy = dummy * 2

shortstreams = StreamList()
shortstreams["Feed"] = readstreamhistory(joinpath("streamhistories", "FeedStreamShort.csv"), "Feed", syscomps; ismoleflow=true)

# Iterate through the CompList - returns pairs of names and Component objects
for (compname, comp) in syscomps
println(compname)
end

# Iterate through the StreamList - returns pairs of names and Stream objects
for (streamname, stream) in sysstreams
println(streamname)
end

sysunits = UnitOpList()

@unitop begin
inlets --> ["Feed"]
outlets --> ["Product"]
calc --> mixer!
end "Mixer" sysstreams sysunits

# Iterate through the UnitOpList - returns pairs of names and UnitOp objects
for (unitopname, unitop) in sysunits
println(unitopname)
end
Loading

0 comments on commit dd9e500

Please sign in to comment.