protected virtual string GetCrossSectionInfo(ParameterStructure.Component.Component _c) { if (_c == null) { return("[]"); } string cs = "["; ParameterStructure.Parameter.Parameter p_B = _c.GetFirstParamByName(Parameter.RP_WIDTH); ParameterStructure.Parameter.Parameter p_H = _c.GetFirstParamByName(Parameter.RP_HEIGHT); ParameterStructure.Parameter.Parameter p_D = _c.GetFirstParamByName(Parameter.RP_DIAMETER); if (p_B != null && p_H != null && p_B.ValueCurrent > 0 && p_H.ValueCurrent > 0) { cs += p_B.ValueCurrent.ToString("F0", FlNwElementVisualization.NR_FORMATTER) + " x " + p_H.ValueCurrent.ToString("F0", FlNwElementVisualization.NR_FORMATTER); } if (p_D != null && p_D.ValueCurrent > 0) { cs += "Ø " + p_D.ValueCurrent.ToString("F0", FlNwElementVisualization.NR_FORMATTER); } cs += "]"; return(cs); }
protected virtual string GetFlowInfo(ParameterStructure.Component.Component _c) { if (_c == null) { return("[...]"); } string flow = "["; ParameterStructure.Parameter.Parameter p_V = _c.GetFirstParamByName(Parameter.RP_FLOW); if (p_V != null) { flow += Parameter.ValueToString(p_V.ValueCurrent, "F3") + " " + p_V.Unit; } Parameter p_dP = _c.GetFirstParamByName(Parameter.RP_PRESS_IN); Parameter p_dP2 = _c.GetFirstParamByName(Parameter.RP_PRESS_IN_MAIN); Parameter p_dP3 = _c.GetFirstParamByName(Parameter.RP_PRESS_IN_BRANCH); if (p_dP != null) { flow += " " + Parameter.RP_PRESS_IN + ": " + Parameter.ValueToString(p_dP.ValueCurrent, "F2") + " " + p_dP.Unit; } if (p_dP2 != null) { flow += " " + Parameter.RP_PRESS_IN_MAIN + ": " + Parameter.ValueToString(p_dP2.ValueCurrent, "F2"); } if (p_dP3 != null) { flow += " " + Parameter.RP_PRESS_IN_BRANCH + ": " + Parameter.ValueToString(p_dP3.ValueCurrent, "F2"); } flow += "]"; return(flow); }