From 20710f595be7e6e1a337878c66ccc6cf4ecae750 Mon Sep 17 00:00:00 2001 From: mzh Date: Fri, 8 Nov 2024 16:56:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E8=BE=B9=E7=95=8C?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6-=E6=9D=A5=E6=B5=81=E6=96=B9=E5=90=91?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ructDataSolverBoundaryConditionManager.cpp | 29 ++++++++++++++++--- ...StructDataSolverBoundaryConditionManager.h | 5 +++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp index a8bf7c5..1314406 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp @@ -185,12 +185,33 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig( }, {}), new CUIConfig({ - {"type", "LineEdit"}, // 来流方向 + {"type", "GroupBox"}, // 来流方向 {"name", tr("Flow direction")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_InflowDirection)}, + {"layout", "QHBoxLayout"}, + // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + // {"value_origin", QVA_GLOBAL(&m_InflowDirection)}, }, - {}), + { + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "X:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", m_InflowDirectionX}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Y:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", m_InflowDirectionY}, + }), + new CUIConfig({ + {"type", "LineEdit"}, + {"name", "Z:"}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", m_InflowDirectionZ}, + }), + + }), }), new CUIConfig({ {"type", "GroupBox"}, diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h index 6620e1f..366ef9f 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h @@ -86,7 +86,10 @@ class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBoundaryConditionManager : double m_Temperature; // Temperature // 来流方向 - double m_InflowDirection; // Inflow Direction + // double m_InflowDirection; // Inflow Direction + double m_InflowDirectionX = 0; + double m_InflowDirectionY = 0; + double m_InflowDirectionZ = 0; // 湍流粘性比 double m_TurbulentViscosityRatio; // Turbulent Viscosity Ratio