Hi everyone,
I am new with Vensim.
I am developing a Water balance Model which reads Daily rainfall data from an XL wortksheet. The model works fine when the time step is one day, but that still is too coarse for some processes and I need to refine the output by setting Time Step to 0.125 of a day.
Does any one know how I can get the model to distribute the input data so that the model reads only the correspondent portion for each time step for that specific day?
I have been able to do it yet, I'll appreciate any suggestions, I don't want to rework my XL work sheets!
Thanks a lot!
Julio Masis
Help
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi Julio,
You simply need to think of the data as flows rather than accumulations. I am guessing that in the spreadsheet you have rainfall by day measured in millimeters. The units of measure for that are Millimeters/Day. This is all Vensim needs - whenever it inegrates it will integrate only over the portion of the day you have selected TIME STEP to be. Thus, unless you have done something very odd, you should not have to make any changes to either the model or the spreadsheet when you change time step.
You simply need to think of the data as flows rather than accumulations. I am guessing that in the spreadsheet you have rainfall by day measured in millimeters. The units of measure for that are Millimeters/Day. This is all Vensim needs - whenever it inegrates it will integrate only over the portion of the day you have selected TIME STEP to be. Thus, unless you have done something very odd, you should not have to make any changes to either the model or the spreadsheet when you change time step.
Hi Bob,
Everytime I set the Time Sep to lower than 1, I obtain quite different behaviours, Vensim will distribute daily rainfal in an uneven way to each time fraction in a kind of triangular distribution rather than uniformly.
You will understand me easily if you compare the time series of computed variable "Runoff Volume" in the model attached before and after changing the time step from 1 to 0.125 for instance.
I also suspect that I have to correct my rates by a factor of "1/Time Step", but I can not find out until I solve the first issue.
I appreciate very much any help on this.
Julio
PS: Zip file attached with Vensim Model and XL spreadsheet
[Edited on 6-4-2006 by jmasis]
Everytime I set the Time Sep to lower than 1, I obtain quite different behaviours, Vensim will distribute daily rainfal in an uneven way to each time fraction in a kind of triangular distribution rather than uniformly.
You will understand me easily if you compare the time series of computed variable "Runoff Volume" in the model attached before and after changing the time step from 1 to 0.125 for instance.
I also suspect that I have to correct my rates by a factor of "1/Time Step", but I can not find out until I solve the first issue.
I appreciate very much any help on this.
Julio
PS: Zip file attached with Vensim Model and XL spreadsheet
[Edited on 6-4-2006 by jmasis]
- Attachments
-
- waterbalance.zip
- (53.81 KiB) Downloaded 493 times
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi Julio,
I took your model and ran it once with TIME STEP of 1 and then again with time step of 0.125 and there is absolutely no difference in "Runoff Volume" - though the 0.125 run causes a floating point error. Lowering TIME STEP to 0.0625 fixes that.
Other things change a lot.
I would recommend you do 2 things
1. Add units of measurement for all variables in the model and make sure units check passes.
2. Remove any numbers directly embedded in equations and replace them with named constants.
These should help clarify what is happening in the model and identify errors that might be there.
I took your model and ran it once with TIME STEP of 1 and then again with time step of 0.125 and there is absolutely no difference in "Runoff Volume" - though the 0.125 run causes a floating point error. Lowering TIME STEP to 0.0625 fixes that.
Other things change a lot.
I would recommend you do 2 things
1. Add units of measurement for all variables in the model and make sure units check passes.
2. Remove any numbers directly embedded in equations and replace them with named constants.
These should help clarify what is happening in the model and identify errors that might be there.
Thanks Bob,
I definitively have to do those corrections.
I have attached the model again and added a custom graph of runoff in a short interval to illustrate the triangular distribution of points around the input data instead of flat distributing when time step is less than one.
When DT is less than one the model behaviour is different, pond levels rise too much and I think that is because of the additional runoff coming from this distributions. The odd thing I see contradicting this is that the accumulated total runoff at the end of the simulation does not change....????
At the end, what I need to do is simply have similar runoff values distributed during the current day that after summed up are the same to the corresponding input data.
Sorry for the hard time explaining these silly things!
Julio
I definitively have to do those corrections.
I have attached the model again and added a custom graph of runoff in a short interval to illustrate the triangular distribution of points around the input data instead of flat distributing when time step is less than one.
When DT is less than one the model behaviour is different, pond levels rise too much and I think that is because of the additional runoff coming from this distributions. The odd thing I see contradicting this is that the accumulated total runoff at the end of the simulation does not change....????
At the end, what I need to do is simply have similar runoff values distributed during the current day that after summed up are the same to the corresponding input data.
Sorry for the hard time explaining these silly things!
Julio
- Attachments
-
- WaterBalanceV5b.mdl
- (12.29 KiB) Downloaded 424 times
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Bob,
It worked just as I wanted!
Thanks a lot for your prompt replies!
Julio
It worked just as I wanted!
Thanks a lot for your prompt replies!
Julio
Originally posted by bob@vensim.com
PLE Plus supports hold backwards - just type it in after the variable name - that is
Precipitation :HOLD BACKWARD:
check the Reference manual for details.