Skip to content

fix missing last flow/substance record#2

Open
fenclmar wants to merge 1 commit intoscheidan:masterfrom
fenclmar:master
Open

fix missing last flow/substance record#2
fenclmar wants to merge 1 commit intoscheidan:masterfrom
fenclmar:master

Conversation

@fenclmar
Copy link
Copy Markdown

@fenclmar fenclmar commented Oct 25, 2017

The last record of inflow was not considered in pumping as pumping is 'one step behind' inflow. V and S vectors are extended and one more loop added. In addition, flow volume left in a pump sump after pumping was added into flow object as a new attribute to enable better testing of mass balance. Here there is a test of the fixed function:

Q <- rep(10, 100) + rnorm(100,0,1)
Q <- data.frame('Q' = Q, 'S' = Q * .01)
attr(Q, "temp.res.sim") <- 60
plot(Q[ ,1], type='l')
V = sum(Q[ ,1])*60
Qout <- pump.trans(Q, 7777, 0, 23)
V2 <- sum(Qout[ ,1]) * 60 + attr(Qout, "V.in.sump")
print(V)
print(V2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant