From 3ffefb04cff2b2c83a0851da2f055d35c171a9cd Mon Sep 17 00:00:00 2001 From: mzh Date: Mon, 4 Nov 2024 12:00:03 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=B1=BB=E5=9E=8B=E7=9A=84=E9=83=A8=E5=88=86bug=202?= =?UTF-8?q?=E3=80=81=E5=88=9B=E5=BB=BA=E4=BA=86=E7=95=8C=E9=9D=A2=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=96=B0=E5=A2=9E=E7=95=8C=E9=9D=A2=E7=9A=84=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=AE=9A=E4=B9=89=203=E3=80=81=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=8E=A7=E5=88=B6=E7=9A=84=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=204=E3=80=81=E4=BF=AE=E5=A4=8D=E4=BA=86=E7=B2=98=E6=80=A7?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=80=89=E6=8B=A9sa=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=88=87=E6=8D=A2=E7=95=8C=E9=9D=A2=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=AE=BF=E9=97=AE=E6=9C=AA=E5=AE=9A=E4=B9=89=E5=86=85?= =?UTF-8?q?=E5=AD=98=E8=80=8C=E5=AF=BC=E8=87=B4=E9=97=AA=E9=80=80=E7=9A=84?= =?UTF-8?q?bug=205=E3=80=81=E5=B0=86=E6=95=B0=E5=80=BCe=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=B8=AD=E7=9A=84=E5=A4=9A=E9=87=8D=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E6=95=B0=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=206=E3=80=81=E4=BF=AE=E6=94=B9=E8=BF=90=E5=8A=A8?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=85=B6=E8=83=BD=E5=A4=9F=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=207=E3=80=81=E6=97=B6=E9=97=B4=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4=E5=B9=B3=E5=9D=87?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ructDataSolverBoundaryConditionManager.cpp | 187 +++++++++++++++--- ...StructDataSolverBoundaryConditionManager.h | 66 ++++--- ...tructDataSolverComputingControlManager.cpp | 26 ++- ...DStructDataSolverComputingControlManager.h | 6 + .../CFDStructDataSolverKvislManager.cpp | 10 +- ...StructDataSolverNumericalMethodManager.cpp | 116 +++++++++-- ...FDStructDataSolverNumericalMethodManager.h | 5 +- ...tructDataSolverSportsAttributesManager.cpp | 2 + .../CFDStructDataSolverTimeModeManager.cpp | 8 +- 9 files changed, 343 insertions(+), 83 deletions(-) diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp index 343d8c6..816e1ff 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp @@ -26,24 +26,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig() m_uiConfig = nullptr; } - qDebug()<<"in manager"; + qDebug() << "in manager " << m_BoundaryType; - if(m_BoundaryType == 0) + if (m_BoundaryType == 0) return genFarFieldModeUIConfig(); - if(m_BoundaryType == 1) + if (m_BoundaryType == 1) return genPressureInletModeUIConfig(); - if(m_BoundaryType == 2) + if (m_BoundaryType == 2) return genPressureOutletUIConfig(); - if(m_BoundaryType == 3) + if (m_BoundaryType == 3) return genSymmetricUIConfig(); - if(m_BoundaryType == 4) - return genCycleUIConfig(); - if(m_BoundaryType == 5){ - if(m_WallType == 0) + if (m_BoundaryType == 4) + { + if (m_PeriodicType == 0) + return genCycleTranslationUIConfig(); + if (m_PeriodicType == 1) + return genCycleRotationUIConfig(); + return genCycleTranslationUIConfig(); + } + if (m_BoundaryType == 5) + { + qDebug() << "walltype is :" << m_WallType; + if (m_WallType == 0) return genWallAdiabaticWallUIConfig(); - if(m_WallType == 1) + if (m_WallType == 1) return genWallIsothermalWallUIConfig(); - if(m_WallType == 2) + if (m_WallType == 2) return genWallHotFlowWallUIConfig(); return genWallAdiabaticWallUIConfig(); @@ -73,7 +81,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig( new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -111,10 +119,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig( }, {}), new CUIConfig({ - {"type", "LineEdit"}, // 密度 - {"name", tr("density")}, + {"type", "LineEdit"}, // 压强 + {"name", tr("Pressure")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_Density)}, + {"value_origin", QVA_GLOBAL(&m_Pressure)}, }, {}), new CUIConfig({ @@ -170,7 +178,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUICo new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -267,7 +275,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -298,12 +306,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi }), }), new CUIConfig({ - {"type", "LineEdit"}, // 静压 - {"name", tr("static pressure")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_StaticPressure)}, + {"type", "GroupBox"}, + {"name", ""}, }, - {}), + { + new CUIConfig({ + {"type", "RadioComponent"}, + {"widget", "Component"}, + {"layout", "QHBoxLayout"}, + }, + { + new CUIConfig({ + {"name", "Constant Static Pressure"}, + }), + new CUIConfig({ + {"name", "Average Static Pressure"}, + }), + }), + new CUIConfig({ + {"type", "LineEdit"}, // 静压 + {"name", tr("static pressure")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_StaticPressure)}, + }, + {}), + }), + }); return nullptr; } @@ -328,7 +356,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -362,7 +390,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() return nullptr; } -CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig() +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUIConfig() { return new CUIConfig({{"type", "Widget"}}, { new CUIConfig({ @@ -382,7 +410,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig() new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -431,8 +459,110 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig() {"name", tr("Cycle type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_PeriodicType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, + }, + { + new CUIConfig({ + {"type", "Item"}, + {"name", tr("Translation ")}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", tr("Rotation")}, + }), + }), + new CUIConfig({ + {"type", "LineEdit"}, // 平移距离 + {"name", tr("TranslationDistance")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_origin", QVA_GLOBAL(&m_TranslationDistance)}, + }, + {}), + }); + return nullptr; +} + +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleRotationUIConfig() +{ + return new CUIConfig({{"type", "Widget"}}, { + new CUIConfig({ + {"type", "LineEdit"}, // 边界名称 + {"name", tr("Boundary name")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_origin", QVA_GLOBAL(&m_BoundaryName)}, }, {}), + new CUIConfig({ + {"type", "LineEdit"}, // 所属计算域 + {"name", tr("Belonging to the computing domain")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_origin", QVA_GLOBAL(&m_ComputationalDomain)}, + }, + {}), + new CUIConfig({ + {"type", "ComboBox"}, // 边界类型 + {"name", tr("Boundary type")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, + }, + { + new CUIConfig({ + {"type", "Item"}, // 远场 + {"name", tr("far field")}, + }), + new CUIConfig({ + {"type", "Item"}, // 压强入口 + {"name", tr("Pressure inlet")}, + }), + new CUIConfig({ + {"type", "Item"}, // 压强出口 + {"name", tr("Pressure outlet")}, + }), + new CUIConfig({ + {"type", "Item"}, // 对称 + {"name", tr("symmetric")}, + }), + new CUIConfig({ + {"type", "Item"}, // 周期 + {"name", tr("cycle")}, + }), + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall surface")}, + }), + }), + new CUIConfig({ + {"type", "LineEdit"}, // 配对名称 + {"name", tr("Pairing Name")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_origin", QVA_GLOBAL(&m_PairingName)}, + }, + {}), + new CUIConfig({ + {"type", "ComboBox"}, // 对应面 + {"name", tr("Corresponding surface")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_CorrespondingSurface)}, + }, + {}), + new CUIConfig({ + {"type", "ComboBox"}, // 周期类型 + {"name", tr("Cycle type")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_PeriodicType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, + }, + { + new CUIConfig({ + {"type", "Item"}, + {"name", tr("Translation ")}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", tr("Rotation")}, + }), + }), new CUIConfig({ {"type", "LineEdit"}, // 旋转中心 {"name", tr("Rotation center")}, @@ -478,7 +608,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, @@ -551,6 +681,9 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ @@ -631,7 +764,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf new CUIConfig({ {"type", "ComboBox"}, // 边界类型 {"name", tr("Boundary type")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h index d9ce5a0..0d9f4b4 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h @@ -15,29 +15,45 @@ public: explicit CFDStructDataSolverBoundaryConditionManager(QObject *parent = nullptr); ~CFDStructDataSolverBoundaryConditionManager(); - CUIConfig* getParamUIConfig(); + CUIConfig *getParamUIConfig(); private: + + // 生成界面配置 壁面 绝热壁 + CUIConfig *genWallAdiabaticWallUIConfig(); + // 生成界面配置 壁面 绝热壁 + CUIConfig *genWallIsothermalWallUIConfig(); + // 生成界面配置 壁面 绝热壁 + CUIConfig *genWallHotFlowWallUIConfig(); + // 生成界面配置 远场 - CUIConfig* genFarFieldModeUIConfig(); + CUIConfig *genFarFieldModeUIConfig(); + // 生成界面配置 压强入口 - CUIConfig* genPressureInletModeUIConfig(); + CUIConfig *genPressureInletModeUIConfig(); + // 生成界面配置 压强出口 - CUIConfig* genPressureOutletUIConfig(); + CUIConfig *genPressureOutletUIConfig(); + // 生成界面配置 对称 - CUIConfig* genSymmetricUIConfig(); - // 生成界面配置 周期 - CUIConfig* genCycleUIConfig(); - // 生成界面配置 壁面 绝热壁 - CUIConfig* genWallAdiabaticWallUIConfig(); - // 生成界面配置 壁面 绝热壁 - CUIConfig* genWallIsothermalWallUIConfig(); - // 生成界面配置 壁面 绝热壁 - CUIConfig* genWallHotFlowWallUIConfig(); + CUIConfig *genSymmetricUIConfig(); + + // 超音速出口/外推 + CUIConfig* genSupersonicOutlet_ExtrapolateUIConfig(); + + // 网格交界面 + CUIConfig* genMeshInterfaceUIConfig(); + + // 生成界面配置 周期 平移 + CUIConfig *genCycleTranslationUIConfig(); + // 生成界面配置 周期 旋转 + CUIConfig *genCycleRotationUIConfig(); + + // 流量出口 + CUIConfig* genMassFlowOutletUIConfig(); signals: private: - // 边界名称 QString m_BoundaryName; // Boundary Name @@ -47,13 +63,14 @@ private: // 边界类型 int m_BoundaryType = 0; // Boundary Type - - // 马赫数 double m_MachNumber; // Mach Number - // 密度 - double m_Density; // Density + // // 密度 + // double m_Density; // Density + + // 压强 + double m_Pressure; // 温度 double m_Temperature; // Temperature @@ -67,7 +84,7 @@ private: // 湍流强度 double m_TurbulentIntensity; // Turbulent Intensity - // 总压 + // 总压 double m_TotalPressure; // Total Pressure // 总温 @@ -76,20 +93,19 @@ private: // 静压 double m_StaticPressure; // Static Pressure - - // 配对名称 + // 配对名称 double m_PairingName; // Pairing Name // 对应面 int m_CorrespondingSurface; // Corresponding Surface // 周期类型 - int m_PeriodicType; // Periodic Type + int m_PeriodicType = 0; // Periodic Type // 平移距离 QString m_TranslationDistance; // Translation Distance - // 旋转中心 + // 旋转中心 QString m_RotationCenter; // Rotation Center // 转轴方向 @@ -99,9 +115,9 @@ private: QString m_RotationAngle; // Rotation Angle // 壁面类型 - QString m_WallType = 0; // Wall Type + int m_WallType = 0; // Wall Type - // 壁面温度 + // 壁面温度 double m_WallTemperature; // Wall Temperature // 壁面热流 diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp index 7f52874..d6615e4 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.cpp @@ -57,15 +57,31 @@ CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig() }, { new CUIConfig({ - {"type", "CheckButton"}, // 并行 + {"type", "CheckBox"}, // 并行 {"name", tr("parallel")}, }), new CUIConfig({ - {"type", "CheckButton"}, // MPI库 - {"name", tr("MPI library")}, + {"type", "ComboBox"}, // MPI库 + {"name", tr("MPI library")}, + }, + { + new CUIConfig({ + {"type", "Item"}, + {"name", tr("Microsoft MPI")}, + }), + }), + new CUIConfig({ + {"type", "LineEdit"}, // 数值计算核数 + {"name", tr("Numerical Computation Cores")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_NumericalComputationCores)}, + }), + new CUIConfig({ + {"type", "LineEdit"}, // 网格组装核数 + {"name", tr("Mesh Assembly Cores")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_MeshAssemblyCores)}, }), - // TODO 数值计算核数 - // TODO 网格组装核数 }), }); return nullptr; diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h index 7953ee7..a4a9d39 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverComputingControlManager.h @@ -25,6 +25,12 @@ signals: private: // 数据保存频率 int m_DataSaveFrequency; // Data Save Frequency + + // 数值计算核数 + int m_NumericalComputationCores = 0; + + // 网格组装核数 + int m_MeshAssemblyCores = 0; }; #endif // CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp index a4b3aca..5b4c188 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp @@ -35,6 +35,7 @@ CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig() return genRANSSAUIConfig(); } if(m_Model == 3) { + m_SAType = 0; if(m_RNSModel == 0) return genDESSAUIConfig(); if(m_RNSModel == 1) @@ -44,6 +45,7 @@ CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig() return genDESSAUIConfig(); } if(m_Model == 4) { + m_SAType = 0; if(m_RNSModel == 0) return genCLESUIConfig(); if(m_RNSModel == 1) @@ -483,10 +485,10 @@ CUIConfig *CFDStructDataSolverKvislManager::genCLESUIConfig() {"type", "RadioButton"}, // 按钮:standard {"name", tr("standard")}, }), - new CUIConfig({ - {"type", "RadioButton"}, // 按钮:Edwards - {"name", tr("Edwards")}, - }) +// new CUIConfig({ +// {"type", "RadioButton"}, // 按钮:Edwards +// {"name", tr("Edwards")}, +// }), }), }); return nullptr; diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.cpp index 76a443c..d8069ac 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.cpp @@ -14,13 +14,13 @@ CFDStructDataSolverNumericalMethodManager::~CFDStructDataSolverNumericalMethodMa CUIConfig *CFDStructDataSolverNumericalMethodManager::getParamUIConfig() { - if(m_fluxFormat == 0) + if (m_fluxFormat == 0) return this->genJamesonModeUIConfig(); - if(m_fluxFormat == 1) + if (m_fluxFormat == 1) return this->genRoeModeUIConfig(); - if(m_fluxFormat == 2) + if (m_fluxFormat == 2) return this->genAUSMDYModeUIConfig(); - if(m_fluxFormat == 3) + if (m_fluxFormat == 3) return this->genAUSMPWPModeUIConfig(); return this->genRoeModeUIConfig(); } @@ -173,17 +173,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig() }, { new CUIConfig({ - {"type", "LineEdit"}, // 多重网格层数 + {"type", "ComboBox"}, // 多重网格层数 {"name", tr("Multi grid layers")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, }, - {}), + { + new CUIConfig({ + {"type", "Item"}, + {"name", "1"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "2"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "3"}, + }), + }), new CUIConfig({ {"type", "ComboBox"}, // 循环类型 {"name", tr("Loop type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, - {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, + {"value_origin", QVA_GLOBAL(&m_cycleType)}, }, { new CUIConfig({ @@ -216,6 +229,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig() {"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, }, {}), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("Convergence Stabilization")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_ConvergenceStabilization)}, + }), }), }); @@ -375,17 +394,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genRoeModeUIConfig() }, { new CUIConfig({ - {"type", "LineEdit"}, // 多重网格层数 + {"type", "ComboBox"}, // 多重网格层数 {"name", tr("Multi grid layers")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, }, - {}), + { + new CUIConfig({ + {"type", "Item"}, + {"name", "1"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "2"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "3"}, + }), + }), new CUIConfig({ {"type", "ComboBox"}, // 循环类型 {"name", tr("Loop type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, - {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, + {"value_origin", QVA_GLOBAL(&m_cycleType)}, }, { new CUIConfig({ @@ -418,6 +450,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genRoeModeUIConfig() {"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, }, {}), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("Convergence Stabilization")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_ConvergenceStabilization)}, + }), }), }); return nullptr; @@ -557,17 +595,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMDYModeUIConfig() }, { new CUIConfig({ - {"type", "LineEdit"}, // 多重网格层数 + {"type", "ComboBox"}, // 多重网格层数 {"name", tr("Multi grid layers")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, }, - {}), + { + new CUIConfig({ + {"type", "Item"}, + {"name", "1"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "2"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "3"}, + }), + }), new CUIConfig({ {"type", "ComboBox"}, // 循环类型 {"name", tr("Loop type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, - {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, + {"value_origin", QVA_GLOBAL(&m_cycleType)}, }, { new CUIConfig({ @@ -600,6 +651,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMDYModeUIConfig() {"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, }, {}), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("Convergence Stabilization")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_ConvergenceStabilization)}, + }), }), }); return nullptr; @@ -741,17 +798,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMPWPModeUIConfig() }, { new CUIConfig({ - {"type", "LineEdit"}, // 多重网格层数 + {"type", "ComboBox"}, // 多重网格层数 {"name", tr("Multi grid layers")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, }, - {}), + { + new CUIConfig({ + {"type", "Item"}, + {"name", "1"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "2"}, + }), + new CUIConfig({ + {"type", "Item"}, + {"name", "3"}, + }), + }), new CUIConfig({ {"type", "ComboBox"}, // 循环类型 {"name", tr("Loop type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, - {"value_origin", QVA_GLOBAL(&m_multigridLevels)}, + {"value_origin", QVA_GLOBAL(&m_cycleType)}, }, { new CUIConfig({ @@ -784,6 +854,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMPWPModeUIConfig() {"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, }, {}), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("Convergence Stabilization")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, + {"value_origin", QVA_GLOBAL(&m_ConvergenceStabilization)}, + }), }), }); return nullptr; diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.h index 90f9ec3..0990af7 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverNumericalMethodManager.h @@ -85,7 +85,7 @@ private: double m_relaxationFactor = 0.5; // 多重网格层数 - double m_multigridLevels = 0.5; + int m_multigridLevels = 0; // 循环类型 /** @@ -113,6 +113,9 @@ private: */ int m_EntropyCorrectionType; + //收敛稳定化 + int m_ConvergenceStabilization = 0; + }; #endif // CFDSTRUCTDATASOLVERNUMERICALMETHODMANAGER_H diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.cpp index 6bbd51e..54b82d8 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverSportsAttributesManager.cpp @@ -156,6 +156,7 @@ CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genRigidBodyModeUICon CFDStructDataSolverSportsAttributesManager::CFDStructDataSolverSportsAttributesManager(QObject *parent) { + m_itemList.push_back(new CFDStructDataSolverSportsAttributesItemManager); } CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributesManager() @@ -164,6 +165,7 @@ CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributes CUIConfig *CFDStructDataSolverSportsAttributesManager::getParamUIConfig() { + return m_itemList[0]->getParamUIConfig(); return NULL; } diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp index a6fe5ac..92a3d14 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverTimeModeManager.cpp @@ -107,6 +107,12 @@ CUIConfig *CFDStructDataSolverTimeModeManager::genUnsteadyModeUIConfig() {"name", "mcyc"}, {"value_type", "Int"}, {"value_origin", QVA_GLOBAL(&m_mcyc)}, - }) + }), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", "Time Average"}, + {"value_type", "Int"}, + {"value_origin", QVA_GLOBAL(&m_timeaverage)}, + }) }); }