The initial tank level

Hi Everyone,
I am trying to add a 48-hours time-series pattern for initial tank levels. My network has 3 tanks that initial water level changes over time.
How can I set these patterns for each tank?
I do appreciate any help on this Regards.
Fatemeh

Here are my data and Net3.inp file.

net3_ok_End.inp (28.3 KB)

Tank(1) 3.9929 4.5852 5.6925 6.5614 7.4021 8.1256 9.3998 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.579 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.7215 9.5675 9.052 8.578 8.3069 8.29 8.3135 8.3975 8.6975 9.4552 9.2861 8.7994 8.3105 7.9642 7.6739 7.5858 7.6703 7.7359 7.8457 8.0047 8.2591 8.5115 8.8815 9.0271 8.8844 8.4873

Tank(2) 7.1628 7.3711 8.1533 8.8451 9.5451 10.1168 11.1119 12.1961 12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 12.0999 12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 11.8966 11.6761 11.1534 10.7819 10.8493 11.0577 11.3549 11.626 11.8027 12.2834 12.1806 11.5746 10.9799 10.5334 10.1593 9.9531 9.7293 9.7925 9.8409 9.7067 9.796 9.6842 9.7396 9.7106 9.6286 9.4848

Tank(3) 8.8392 9.1308 9.7488 10.0682 10.4266 10.753 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.7478 10.6002 10.5345 10.5624 10.5965 10.6456 10.8171 10.8204 10.8204 10.7026 10.5096 10.3718 10.2296 10.1697 10.1766 10.1916 10.2461 10.344 10.4972 10.6633 10.8204 10.8204 10.8204 10.7094

Hi @Fatemeh,

You can try the following example:

EMT version: v2.2.0-beta.9

d.classversion
ans = ‘v2.2.0-beta.9’

start_toolkit; 

d = epanet('net3_ok_End.inp');

pat1 = [3.9929 4.5852 5.6925 6.5614 7.4021 8.1256 9.3998 9.7841 9.7841, ... 
    9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.7841 9.579 9.7841 9.7841, ...
    9.7841 9.7841 9.7841 9.7841 9.7215 9.5675 9.052 8.578 8.3069 8.29 8.3135 , ...
    8.3975 8.6975 9.4552 9.2861 8.7994 8.3105 7.9642 7.6739 7.5858 7.6703 , ...
    7.7359 7.8457 8.0047 8.2591 8.5115 8.8815 9.0271 8.8844 8.4873];

pat2 = [7.1628 7.3711 8.1533 8.8451 9.5451 10.1168 11.1119 12.1961 12.2834, ... 
    12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 12.2834 12.0999 12.2834, ... 
    12.2834 12.2834 12.2834 12.2834 12.2834 11.8966 11.6761 11.1534 10.7819, ... 
    10.8493 11.0577 11.3549 11.626 11.8027 12.2834 12.1806 11.5746 10.9799 10.5334, ... 
    10.1593 9.9531 9.7293 9.7925 9.8409 9.7067 9.796 9.6842 9.7396 9.7106 9.6286 9.4848];

pat3 = [8.8392 9.1308 9.7488 10.0682 10.4266 10.753 10.8204 10.8204 10.8204 10.8204, ... 
    10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204 10.8204, ... 
    10.8204 10.8204 10.8204 10.8204 10.8204 10.7478 10.6002 10.5345 10.5624 10.5965, ... 
    10.6456 10.8171 10.8204 10.8204 10.7026 10.5096 10.3718 10.2296 10.1697 10.1766, ... 
    10.1916 10.2461 10.344 10.4972 10.6633 10.8204 10.8204 10.8204 10.7094];

indPat1 = d.addPattern('patT1', pat1);
indPat2 = d.addPattern('patT2', pat1);
indPat3 = d.addPattern('patT3', pat1);

% Conver tanks to reservoirs
for i=d.getNodeTankIndex
    d.setNodeTankData(i, 0, 0, 0, 0, 0, 0, 0)
end

% Set demand pattern index to reservoirs
d.setNodeDemandPatternIndex(d.getNodeIndex('T1'), indPat1);
d.setNodeDemandPatternIndex(d.getNodeIndex('T2'), indPat2);
d.setNodeDemandPatternIndex(d.getNodeIndex('T3'), indPat1);

d.saveInputFile('new_file.inp');
d.unload;

Thanks,
Marios