|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
#include "CFDStructDataSolverKvislManager.h"
|
|
|
|
|
#include "CFDStructDataManager.h"
|
|
|
|
|
#include "CFDStructMain/CFDStructDefine.h"
|
|
|
|
|
#include "CFDStructSigsCenter.h"
|
|
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
|
|
|
|
|
|
CFDStructDataSolverKvislManager::CFDStructDataSolverKvislManager(QObject *parent) : CFDStructDataManagerBase(parent) {
|
|
|
|
|
m_uiConfig = nullptr;
|
|
|
|
|
|
|
|
|
|
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) {
|
|
|
|
|
if (semaphore == (int)SolutionAnalysisModuleProperty::Viscosity_Model) {
|
|
|
|
|
emit CFDStructSigsCenter::getInstance()->sig_solverKvislDataChanged();
|
|
|
|
@ -15,40 +17,63 @@ CFDStructDataSolverKvislManager::~CFDStructDataSolverKvislManager() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig() {
|
|
|
|
|
if (m_Model == 0) {
|
|
|
|
|
return genInviscidUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 1) {
|
|
|
|
|
return genLaminarUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 2) {
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
m_runTime = CFDStructDataManager::getInstance()->getTimeModeRunTime();
|
|
|
|
|
qDebug() << m_runTime << "runtime";
|
|
|
|
|
if (m_runTime == 1) {
|
|
|
|
|
if (m_Model == 0) {
|
|
|
|
|
return genInviscidUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 1) {
|
|
|
|
|
return genLaminarUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 2) {
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
return genRANSSAUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genRANSUIMentersConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
return genRANSKEUIConfig();
|
|
|
|
|
return genRANSSAUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genRANSUIMentersConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
return genRANSKEUIConfig();
|
|
|
|
|
return genRANSSAUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 3) {
|
|
|
|
|
m_SAType = 0;
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 3) {
|
|
|
|
|
m_SAType = 0;
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
return genDESSAUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genDESMentersUIConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
m_RNSModel = 0;
|
|
|
|
|
return genDESSAUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genDESMentersUIConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
m_RNSModel = 0;
|
|
|
|
|
return genDESSAUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 4) {
|
|
|
|
|
m_SAType = 0;
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 4) {
|
|
|
|
|
m_SAType = 0;
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
return genCLESUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genCLESMentersUIConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
m_RNSModel = 0;
|
|
|
|
|
return genCLESUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genCLESMentersUIConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
m_RNSModel = 0;
|
|
|
|
|
return genCLESUIConfig();
|
|
|
|
|
}
|
|
|
|
|
} else if (m_runTime == 0) {
|
|
|
|
|
if (m_Model == 0) {
|
|
|
|
|
return genSteadyInviscidUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 1) {
|
|
|
|
|
return genSteadyLaminarUIConfig();
|
|
|
|
|
}
|
|
|
|
|
if (m_Model == 2) {
|
|
|
|
|
if (m_RNSModel == 0)
|
|
|
|
|
return genSteadyRANSSAUIConfig();
|
|
|
|
|
if (m_RNSModel == 1)
|
|
|
|
|
return genSteadyRANSUIMentersConfig();
|
|
|
|
|
if (m_RNSModel == 2)
|
|
|
|
|
return genSteadyRANSKEUIConfig();
|
|
|
|
|
return genRANSSAUIConfig();
|
|
|
|
|
} else {
|
|
|
|
|
m_Model = 0;
|
|
|
|
|
return genSteadyInviscidUIConfig();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return this->genInviscidUIConfig();
|
|
|
|
|
}
|
|
|
|
@ -597,3 +622,196 @@ CUIConfig *CFDStructDataSolverKvislManager::genCLESMentersUIConfig() {
|
|
|
|
|
});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::genSteadyInviscidUIConfig() {
|
|
|
|
|
return new CUIConfig(
|
|
|
|
|
{{"type", "Widget"}}, {
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "RadioComponent"}, // 组:模型
|
|
|
|
|
{"name", tr("Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_Model)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
|
|
|
|
|
{"name", tr("Inviscid")}}),
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
|
|
|
|
|
{"name", tr("Laminar")}}),
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
|
|
|
|
|
{"name", tr("RANS")}}),
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::genSteadyLaminarUIConfig() {
|
|
|
|
|
return new CUIConfig(
|
|
|
|
|
{{"type", "Widget"}}, {new CUIConfig({
|
|
|
|
|
{"type", "RadioComponent"}, // 组:模型
|
|
|
|
|
{"name", tr("Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_Model)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
|
|
|
|
|
{"name", tr("Inviscid")}}),
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
|
|
|
|
|
{"name", tr("Laminar")}}),
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
|
|
|
|
|
{"name", tr("RANS")}}),
|
|
|
|
|
})});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::genSteadyRANSSAUIConfig() {
|
|
|
|
|
return new CUIConfig(
|
|
|
|
|
{{"type", "Widget"}}, {
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "RadioComponent"}, // 组:模型
|
|
|
|
|
{"name", tr("Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_Model)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:RANS模型
|
|
|
|
|
{"name", tr("RANS Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_RNSModel)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:S-A类型
|
|
|
|
|
{"name", tr("S-A Type")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_SAType)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
|
|
|
|
|
},
|
|
|
|
|
{new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
|
|
|
|
|
{"name", tr("standard")}}),
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:Edwards
|
|
|
|
|
{"name", tr("Edwards")}})}),
|
|
|
|
|
});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::genSteadyRANSUIMentersConfig() {
|
|
|
|
|
return new CUIConfig(
|
|
|
|
|
{{"type", "Widget"}}, {
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "RadioComponent"}, // 组:模型
|
|
|
|
|
{"name", tr("Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_Model)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:RANS模型
|
|
|
|
|
{"name", tr("RANS Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_RNSModel)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:κ-ω类型
|
|
|
|
|
{"name", tr("κ-ω Type")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_kwType)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
|
|
|
|
|
{"name", tr("standard")}}),
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverKvislManager::genSteadyRANSKEUIConfig() {
|
|
|
|
|
return new CUIConfig(
|
|
|
|
|
{{"type", "Widget"}}, {
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "RadioComponent"}, // 组:模型
|
|
|
|
|
{"name", tr("Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_Model)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:RANS模型
|
|
|
|
|
{"name", tr("RANS Model")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_RNSModel)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_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", "RadioComponent"}, // 组:κ-ε类型
|
|
|
|
|
{"name", tr("κ-ε Type")},
|
|
|
|
|
{"widget", "GroupBox"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_keType)},
|
|
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
|
|
|
|
|
{"name", tr("standard")}}),
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|