How can I change Junction/Pipe Quality in each Qstep? (LAGRANGIAN TRANSPORT)


#1

Hi:

I´m working in “CHLORINE MIXING AT CROSS JUNCTIONS”.

I want to change NodeQuality or LinkQuality at certain Junction/Pipes in some “qsteps”, but I see that the
EPANET-MATLAB Tookit can only GET these results from epanet, but we CAN´T change (SET) them.

Specifically, I want to insert new concentrations at the “segments” that epanet improves every q step (The Lagrangian mass transport). When concentration leaves the cross junction, I need to modify concentration values in each outlet pipe in these “segments”.

Check this for more reference (do not refer about quantities, only see the procedure):

All this is in order to implement new chorine (or any other solute) distribution through this pipe cross junctions.

I hope this can have solution, thanks a lot.

Daniel Hernández
Water Science and Technology
México


#2

Hi @DanielHernandezCerva,
you can’t set NodeQuality or LinkQuality on a node which is defined as a “concentration” node. You must define this node as a “setpoint” node. See the example below:

d = epanet(‘Net1.inp’);
input_node = d.getNodeIndex(‘22’);

% % Initial zeros quality
d.setNodeInitialQuality(1:d.NodeCount, zeros(1, d.NodeCount));
d.setNodeInitialQuality(d.getNodeReservoirIndex, 2);

% Set node of interest as a setpoint
d.setNodeSourceType(input_node,‘SETPOINT’);

% Runs Quality Step-by-step
d.solveCompleteHydraulics;
d.openQualityAnalysis;
d.initializeQualityAnalysis;

tleft=1; k=1;
while (tleft>0)
t=d.runQualityAnalysis;
% get actual qualities
output_values(k, :)=d.getNodeActualQuality;

% Remove setpoint from node if it exists
if d.getNodeSourceQuality(input_node)>0
    d.setNodeSourceQuality(input_node, 0);
end

% Set new setpoint if condition is true
if output_values(k, input_node) < 0.1
    d.setNodeSourceQuality(input_node, 0.1)
end

k=k+1;
tleft = d.stepQualityAnalysisTimeLeft;

end
d.closeQualityAnalysis;

% Plot node of interest
i=input_node;
figure;
plot(output_values(:,i))
title(['Node ID: ', d.NodeNameID{i}])

d.unload;


#3

Hi Mariosmsk

Tank you for the answer, I will try this and if I get some problem, I will write you.

Thanks Again

-Daniel