Exemple #1
0
        public void Eigenzustand_Zeichnen(double[] zustand)
        {
            double maxTemp = 0, minTemp = 100;

            foreach (var item in modell.Knoten)
            {
                var knoten     = item.Value;
                var temperatur = zustand[knoten.SystemIndices[0]].ToString("N2");
                var temp       = zustand[knoten.SystemIndices[0]];
                if (temp > maxTemp)
                {
                    maxTemp = temp;
                }
                if (temp < minTemp)
                {
                    minTemp = temp;
                }
                var fensterKnoten = TransformKnoten(knoten, auflösung, maxY);

                var id = new TextBlock
                {
                    FontSize   = 12,
                    Background = Red,
                    FontWeight = Bold,
                    Text       = temperatur
                };
                Knotentemperaturen.Add(id);
                SetTop(id, fensterKnoten[1]);
                SetLeft(id, fensterKnoten[0]);
                VisualErgebnisse.Children.Add(id);
            }
        }
Exemple #2
0
        public void KnotentemperaturZeichnen(int index)
        {
            foreach (var item in modell.Knoten)
            {
                knoten = item.Value;
                var temperatur = knoten.NodalVariables[0][index].ToString("N2");
                temp = knoten.NodalDof[0];
                if (temp > maxTemp)
                {
                    maxTemp = temp;
                }
                if (temp < minTemp)
                {
                    minTemp = temp;
                }
                var fensterKnoten = TransformKnoten(knoten, auflösung, maxY);

                var id = new TextBlock
                {
                    FontSize   = 12,
                    Background = LightGray,
                    FontWeight = FontWeights.Bold,
                    Text       = temperatur
                };
                Knotentemperaturen.Add(id);
                SetTop(id, fensterKnoten.Y + RandOben);
                SetLeft(id, fensterKnoten.X + RandLinks);
                visualErgebnisse.Children.Add(id);
            }
        }