You are here

Sign of flow rates

Hi,

I find the sign (positive or negative) used for flows a bit confusing. A flow filling a compartment is positive when going from a cloud into a compartment, and a flow draining a compartment into a cloud, negative. In other words the sign of the flow is defined based on the effect on the compartment and not on the direction of the arrow. I would expect flows to be positive when going in the direction of the arrow (and take and implicit negative sign when affecting the source) and be negative only when going in a direction opposite to the arrow. How is the sign defined when a flow goes from one compartment to another one?

I got caught by this when using a var_delay between an inflow and outflow.

Of course by now this must be a feature, but could you please explain the logic behind this behaviour?

Best regards,

Pedro.

Forums: 

Hello,

I cannot reproduce the problem with a simple model. In this case it work as I expected... I'll keep investigating and I'll try to upload the models somewhere.

Pedro.

Hello again,

Now I cannot reproduce the problem with the original model either... (after editing it).

I'll let you know if it happens again.

Pedro.

Do let us know if you find another confusing example.

The logic behind flows is that a positive value is in the direction of the arrow and negative value would be in the reverse direction. Whether the flow value is positive or negative will depend on the equation for the flow.

Jonathan

Maybe it was just me getting confused in a complicated model, but I will keep my eyes open and report if I find something unusual.

Best wishes,

Pedro.