Help

Use this forum to post Vensim related questions.
Post Reply
jmasis
Junior Member
Posts: 5
Joined: Fri Jun 02, 2006 5:34 pm

Help

Post by jmasis »

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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

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.
jmasis
Junior Member
Posts: 5
Joined: Fri Jun 02, 2006 5:34 pm

Post by jmasis »

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]
Attachments
waterbalance.zip
(53.81 KiB) Downloaded 493 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

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.
jmasis
Junior Member
Posts: 5
Joined: Fri Jun 02, 2006 5:34 pm

Post by jmasis »

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
Attachments
WaterBalanceV5b.mdl
(12.29 KiB) Downloaded 424 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Sorry, I think I understand you now. Just use :HOLD BACKWARD: on the rainfall data and align the data at midnight for the day. Then it will jump from one days value to the next at each day change.
jmasis
Junior Member
Posts: 5
Joined: Fri Jun 02, 2006 5:34 pm

Post by jmasis »

Bob,

I am glad you understood me, unfortunately my Vensim PLE PLUS version does not include :HOLD BACK: or LOOK FORWARD or GET DATA BETWEEN TIMES.

Do you know other work around?

Thanks

Julio
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
jmasis
Junior Member
Posts: 5
Joined: Fri Jun 02, 2006 5:34 pm

Post by jmasis »

Bob,

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.
Post Reply