void LocalPointValueView::doShowPoint() { logMessage("LocalPointValueView::doShowPoint()"); trvWidget->clear(); // point QTreeWidgetItem *pointNode = new QTreeWidgetItem(trvWidget); pointNode->setText(0, tr("Point")); pointNode->setExpanded(true); addTreeWidgetItemValue(pointNode, Util::scene()->problemInfo()->labelX() + ":", QString("%1").arg(point.x, 0, 'f', 5), tr("m")); addTreeWidgetItemValue(pointNode, Util::scene()->problemInfo()->labelY() + ":", QString("%1").arg(point.y, 0, 'f', 5), tr("m")); trvWidget->insertTopLevelItem(0, pointNode); if (Util::scene()->sceneSolution()->isSolved()) { LocalPointValue *value = Util::scene()->problemInfo()->hermes()->localPointValue(point); Util::scene()->problemInfo()->hermes()->showLocalValue(trvWidget, value); delete value; } trvWidget->resizeColumnToContents(2); }
void HermesHeat::showSurfaceIntegralValue(QTreeWidget *trvWidget, SurfaceIntegralValue *surfaceIntegralValue) { SurfaceIntegralValueHeat *surfaceIntegralValueHeat = dynamic_cast<SurfaceIntegralValueHeat *>(surfaceIntegralValue); // heat QTreeWidgetItem *heatNode = new QTreeWidgetItem(trvWidget); heatNode->setText(0, tr("Heat Transfer")); heatNode->setExpanded(true); addTreeWidgetItemValue(heatNode, tr("Temperature avg.:"), QString("%1").arg(surfaceIntegralValueHeat->averageTemperature, 0, 'e', 3), tr("K")); addTreeWidgetItemValue(heatNode, tr("Temperature dif.:"), QString("%1").arg(surfaceIntegralValueHeat->temperatureDifference, 0, 'e', 3), tr("K")); addTreeWidgetItemValue(heatNode, tr("Heat flux:"), QString("%1").arg(surfaceIntegralValueHeat->heatFlux, 0, 'e', 3), tr("W")); }
void HermesHeat::showVolumeIntegralValue(QTreeWidget *trvWidget, VolumeIntegralValue *volumeIntegralValue) { VolumeIntegralValueHeat *volumeIntegralValueHeat = dynamic_cast<VolumeIntegralValueHeat *>(volumeIntegralValue); // heat QTreeWidgetItem *heatNode = new QTreeWidgetItem(trvWidget); heatNode->setText(0, tr("Heat transfer")); heatNode->setExpanded(true); addTreeWidgetItemValue(heatNode, tr("Temperature avg.:"), QString("%1").arg(volumeIntegralValueHeat->averageTemperature, 0, 'e', 3), tr("K")); }
void HermesHeat::showLocalValue(QTreeWidget *trvWidget, LocalPointValue *localPointValue) { LocalPointValueHeat *localPointValueHeat = dynamic_cast<LocalPointValueHeat *>(localPointValue); // heat QTreeWidgetItem *heatNode = new QTreeWidgetItem(trvWidget); heatNode->setText(0, tr("Heat transfer")); heatNode->setExpanded(true); // Thermal Conductivity addTreeWidgetItemValue(heatNode, tr("Thermal conductivity:"), QString("%1").arg(localPointValueHeat->thermal_conductivity, 0, 'f', 2), tr("W/m.K")); // Volume Heat addTreeWidgetItemValue(heatNode, tr("Volume heat:"), QString("%1").arg(localPointValueHeat->volume_heat, 0, 'e', 3), tr("W/m3")); // Temperature addTreeWidgetItemValue(heatNode, tr("Temperature:"), QString("%1").arg(localPointValueHeat->temperature, 0, 'f', 2), tr("K")); // Heat Flux QTreeWidgetItem *itemHeatFlux = new QTreeWidgetItem(heatNode); itemHeatFlux->setText(0, tr("Heat flux")); itemHeatFlux->setExpanded(true); addTreeWidgetItemValue(itemHeatFlux, "F" + Util::scene()->problemInfo()->labelX().toLower() + ":", QString("%1").arg(localPointValueHeat->F.x, 0, 'e', 3), tr("W/m2")); addTreeWidgetItemValue(itemHeatFlux, "F" + Util::scene()->problemInfo()->labelY().toLower() + ":", QString("%1").arg(localPointValueHeat->F.y, 0, 'e', 3), tr("W/m2")); addTreeWidgetItemValue(itemHeatFlux, "F:", QString("%1").arg(localPointValueHeat->F.magnitude(), 0, 'e', 3), "W/m2"); // Temperature Gradient QTreeWidgetItem *itemTemperatureGradient = new QTreeWidgetItem(heatNode); itemTemperatureGradient->setText(0, tr("Temperature gradient")); itemTemperatureGradient->setExpanded(true); addTreeWidgetItemValue(itemTemperatureGradient, "G" + Util::scene()->problemInfo()->labelX().toLower() + ":", QString("%1").arg(localPointValueHeat->G.x, 0, 'f', 5), tr("K/m")); addTreeWidgetItemValue(itemTemperatureGradient, "G" + Util::scene()->problemInfo()->labelY().toLower() + ":", QString("%1").arg(localPointValueHeat->G.y, 0, 'f', 5), tr("K/m")); addTreeWidgetItemValue(itemTemperatureGradient, "G:", QString("%1").arg(localPointValueHeat->G.magnitude(), 0, 'f', 5), "K/m"); }