From f4163bde6337787744df9f54205de56bb1a658d4 Mon Sep 17 00:00:00 2001 From: mzh Date: Wed, 30 Oct 2024 17:23:14 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=8C=E6=88=90=E2=80=9C=E7=B2=98?= =?UTF-8?q?=E6=80=A7=E6=A8=A1=E5=9E=8B=E2=80=9Dui=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CFDStructDataManager.pri | 2 + .../CFDStructDataSolverBasicModelManager.h | 24 ++-- .../CFDStructDataSolverKvislManager.cpp | 114 ++++++++++++++++++ .../CFDStructDataSolverKvislManager.h | 63 ++++++++++ 4 files changed, 191 insertions(+), 12 deletions(-) create mode 100644 CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp create mode 100644 CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.h diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri b/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri index 4affa13..af45609 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri +++ b/CFDStruct/CFDStructDataManager/CFDStructDataManager.pri @@ -2,6 +2,7 @@ SOURCES += \ $$PWD/CFDStructDataManagerBase.cpp \ $$PWD/CFDStructDataSolverTimeModeManager.cpp \ $$PWD/CFDStructDataSolverBasicModelManager.cpp \ + $$PWD/CFDStructDataSolverKvislManager.cpp \ $$PWD/CFDStructSigsCenter.cpp \ $$PWD/CFDStructDataManager.cpp \ @@ -9,6 +10,7 @@ HEADERS += \ $$PWD/CFDStructDataManagerBase.h \ $$PWD/CFDStructDataSolverTimeModeManager.h \ $$PWD/CFDStructDataSolverBasicModelManager.h \ + $$PWD/CFDStructDataSolverKvislManager.cpp \ $$PWD/CFDStructSigsCenter.h \ $$PWD/CFDStructDataManager_global.h \ $$PWD/CFDStructDataManager.h diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.h index 6f57112..1a82b0a 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBasicModelManager.h @@ -5,7 +5,7 @@ #include "CFDStructDataManager_global.h" class CUIConfig; -class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBasicModelManager : public QObject +class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBasicModelManager : public CFDStructDataManagerBase { Q_OBJECT public: @@ -22,17 +22,17 @@ private: signals: private: - // 鏃堕棿妯″紡 - int m_runtype = 0; - // 杩唬姝ユ暟锛>=1锛屽畾甯告椂锛氳凯浠f鏁帮紝闈炲畾甯革細鍐呰凯浠f鏁 int m_mcyc = 1000; - // 姝ラ暱妯″紡锛屽浐瀹氾紝涓嶅彲淇敼 - double m_alf0 = 1.0; - // 鏃堕棿姝ラ暱锛0 - double m_realdt = 1.0; - // 鏃堕棿姝ユ暟锛=1 - double m_nstep = 10; - // 鏃跺潎缁熻閲忔暟鎹噰鏍0,1 - int m_timeaverage = 0; + // // 鏃堕棿妯″紡 + // int m_runtype = 0; + // // 杩唬姝ユ暟锛>=1锛屽畾甯告椂锛氳凯浠f鏁帮紝闈炲畾甯革細鍐呰凯浠f鏁 int m_mcyc = 1000; + // // 姝ラ暱妯″紡锛屽浐瀹氾紝涓嶅彲淇敼 + // double m_alf0 = 1.0; + // // 鏃堕棿姝ラ暱锛0 + // double m_realdt = 1.0; + // // 鏃堕棿姝ユ暟锛=1 + // double m_nstep = 10; + // // 鏃跺潎缁熻閲忔暟鎹噰鏍0,1 + // int m_timeaverage = 0; CUIConfig* m_uiConfig = nullptr; }; diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp new file mode 100644 index 0000000..da7ae88 --- /dev/null +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.cpp @@ -0,0 +1,114 @@ +#include "CFDStructDataSolverKvislManager.h" + +CFDStructDataSolverKvislManager::CFDStructDataSolverKvislManager(QObject *parent) : CFDStructDataManagerBase(parent) +{ + m_uiConfig = nullptr; +} + +CFDStructDataSolverKvislManager::~CFDStructDataSolverKvislManager() +{ +} + +CUIConfig *CFDStructDataSolverKvisllManager::genInviscidUIConfig() +{ + return new CUIConfig( + {{"type", "widget"}}, + {new CUIConfig({{"type", "GroupBox"}, // 组:模型 + {"name", tr("Model")}}, + {new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 + {"name", tr("Inviscid")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 + {"name", tr("Laminar")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 + {"name", tr("RANS")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 + {"name", tr("DES")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 + {"name", tr("CLES")}})})}); + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genLaminarUIConfig() +{ + return new CUIConfig( + {{"type", "widget"}}, + {new CUIConfig({{"type", "GroupBox"}, // 组:模型 + {"name", tr("Model")}}, + {new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 + {"name", tr("Inviscid")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 + {"name", tr("Laminar")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 + {"name", tr("RANS")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 + {"name", tr("DES")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 + {"name", tr("CLES")}})})}); + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genRANSSAUIConfig() +{ + return new CUIConfig( + {{"type", "widget"}}, + { + new CUIConfig({{"type", "GroupBox"}, // 组:模型 + {"name", tr("Model")}}, + {new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 + {"name", tr("Inviscid")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 + {"name", tr("Laminar")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 + {"name", tr("RANS")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 + {"name", tr("DES")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 + {"name", tr("CLES")}})}), + new CUIConfig({{"type", "GroupBox"}, // 组:RANS模型 + {"name", tr("RANS Model")}}, + {new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) + {"name", tr("S-A")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) + {"name", tr("Menters's κ-ω")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程) + {"name", tr("κ-ε")}})}), + new CUIConfig({{"type", "GroupBox"}, // 组:S-A类型 + {"name", tr("S-A Type")}}, + {new CUIConfig({{"type", "RadioButton"}, // 按钮:standard + {"name", tr("standard")}}), + new CUIConfig({{"type", "RadioButton"}, // 按钮:Edwards + {"name", tr("Edwards")}})}), + }); + + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genRANSUIMentersConfig() +{ + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genRANSKEUIConfig() +{ + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genDESSAUIConfig() +{ + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genDESMentersUIConfig() +{ + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genCLESUIConfig() +{ + return nullptr; +} + +CUIConfig *CFDStructDataSolverKvisllManager::genCLESMentersUIConfig() +{ + return nullptr; +} diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.h new file mode 100644 index 0000000..550e889 --- /dev/null +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverKvislManager.h @@ -0,0 +1,63 @@ +/** + * 粘性模型 + */ + +#ifndef CFDSTRUCTDATASOLVERKVISLLMANAGER_H +#define CFDSTRUCTDATASOLVERKVISLLMANAGER_H + +#include +#include "CFDStructDataManager_global.h" + +class CUIConfig; + +class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverKvisllManager : public CFDStructDataManagerBase +{ + Q_OBJECT +public: + explicit CFDStructDataSolverKvislManager(QObject *parent = nullptr); + ~CFDStructDataSolverKvislManager(); + + CUIConfig* getParamUIConfig(); + +private: + // 生成无粘界面配置 + CUIConfig* genInviscidUIConfig(); + + // 生成层流界面配置 + CUIConfig* genLaminarUIConfig(); + + // 生成雷诺平均_S-A界面配置 + CUIConfig* genRANSSAUIConfig(); + // 生成雷诺平均_Menters's κ-ω界面配置 + CUIConfig* genRANSUIMentersConfig(); + // 生成雷诺平均_κ-ε界面配置 + CUIConfig* genRANSKEUIConfig(); + + // 生成分离涡模拟_S-A界面配置 + CUIConfig* genDESSAUIConfig(); + // 生成分离涡模拟_Menters's κ-ω界面配置 + CUIConfig* genDESMentersUIConfig(); + + // 生成约束大涡模拟_S-A界面配置 + CUIConfig* genCLESUIConfig(); + // 生成约束大涡模拟_Menters's κ-ω界面配置 + CUIConfig* genCLESMentersUIConfig(); +signals: + +private: + // // 鏃堕棿妯″紡 + // int m_runtype = 0; + // // 杩唬姝ユ暟锛>=1锛屽畾甯告椂锛氳凯浠f鏁帮紝闈炲畾甯革細鍐呰凯浠f鏁 int m_mcyc = 1000; + // // 姝ラ暱妯″紡锛屽浐瀹氾紝涓嶅彲淇敼 + // double m_alf0 = 1.0; + // // 鏃堕棿姝ラ暱锛0 + // double m_realdt = 1.0; + // // 鏃堕棿姝ユ暟锛=1 + // double m_nstep = 10; + // // 鏃跺潎缁熻閲忔暟鎹噰鏍0,1 + // int m_timeaverage = 0; + + CUIConfig* m_uiConfig = nullptr; +}; + +#endif // CFDSTRUCTDATASOLVERKvislLMANAGER_H