| | |
| | | string statusString = x.LinkStatus == PipeStatus.Closed ? "CLOSED" : ""; |
| | | double minorLoss = x.MinorLossCoeff + x.EndMinorLossCoeff + x.StartMinorLossCoeff; |
| | | pipeSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Length}\t{x.Diameter}\t{x.Roughness}\t{minorLoss}\t{statusString}\t;\t");// + $"{p.Level}"); |
| | | if (x.LinkStatus != PipeStatus.Open) |
| | | if (x.LinkStatus != PipeStatus.Open ) |
| | | { |
| | | statusSb.AppendLine(x.Id + "\t" + statusString); |
| | | } |
| | |
| | | } |
| | | if (string.IsNullOrEmpty(settings)) settings = "Undefined"; |
| | | valveSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Diameter:F4}\t{x.ValveType}\t{settings}\t{x.MinorLoss:F4}\t;\t");// + $"0"); |
| | | if (!string.IsNullOrEmpty(x.LinkStatus)) |
| | | if (!string.IsNullOrEmpty(x.LinkStatus) && x.LinkStatus != ValveStatus.None) |
| | | { |
| | | statusSb.AppendLine(x.Id + "\t" + x.LinkStatus); |
| | | } |
| | |
| | | { |
| | | type = "Compressor"; |
| | | } |
| | | valveSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Diameter:F4}\tGPV\t{x.CurveQL}\t{x.MinorLoss:F4}\t;\t{type}");// + $"0"); |
| | | if (!string.IsNullOrEmpty(x.LinkStatus)) |
| | | string settings; |
| | | if (x.LinkStatus == ValveStatus.None) |
| | | { |
| | | settings = x.CurveQL; |
| | | } |
| | | else |
| | | { |
| | | settings = "Undefined"; |
| | | } |
| | | if (string.IsNullOrEmpty(settings)) settings = "Undefined"; |
| | | |
| | | valveSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Diameter:F4}\tGPV\t{settings}\t{x.MinorLoss:F4}\t;\t{type}");// + $"0"); |
| | | if (!string.IsNullOrEmpty(x.LinkStatus) && x.LinkStatus != ValveStatus.None) |
| | | { |
| | | statusSb.AppendLine(x.Id + "\t" + x.LinkStatus); |
| | | } |
| | |
| | | else |
| | | statusString = $"\t{o.SpeedRatio}"; |
| | | } |
| | | statusSb.AppendLine(o.Id + statusString); |
| | | if (!string.IsNullOrEmpty(o.LinkStatus) ) |
| | | { |
| | | statusSb.AppendLine(o.Id + statusString); |
| | | } |
| | | |
| | | }); |
| | | string pumpString = pumpSb.ToString(); |
| | | |