|
|
#include "CFDStructDataSolverNumericalMethodManager.h"
|
|
|
#include "CFDStructMain/CFDStructDefine.h"
|
|
|
#include "CFDStructSigsCenter.h"
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
|
|
CFDStructDataSolverNumericalMethodManager::CFDStructDataSolverNumericalMethodManager(QObject *parent) : CFDStructDataManagerBase(parent) {
|
|
|
m_uiConfig = nullptr;
|
|
|
}
|
|
|
|
|
|
CFDStructDataSolverNumericalMethodManager::~CFDStructDataSolverNumericalMethodManager() {
|
|
|
}
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::getParamUIConfig() {
|
|
|
if (m_fluxFormat == 0)
|
|
|
return this->genJamesonModeUIConfig();
|
|
|
if (m_fluxFormat == 1)
|
|
|
return this->genRoeModeUIConfig();
|
|
|
if (m_fluxFormat == 2)
|
|
|
return this->genAUSMDYModeUIConfig();
|
|
|
if (m_fluxFormat == 3)
|
|
|
return this->genAUSMPWPModeUIConfig();
|
|
|
return this->genRoeModeUIConfig();
|
|
|
}
|
|
|
|
|
|
void CFDStructDataSolverNumericalMethodManager::saveDataToDom(rapidjson::Document &dom) {
|
|
|
jsonAdd(dom, m_fluxFormat,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "generalFmt"});
|
|
|
jsonAdd(dom, m_secondOrderArtificialViscosity,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "twojamson"});
|
|
|
jsonAdd(dom, m_fourthOrderArtificialViscosity,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fourjamson"});
|
|
|
jsonAdd(dom, m_spaceAccuracy,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "accuracy"});
|
|
|
jsonAdd(dom, m_limiter,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "limiter"});
|
|
|
jsonAdd(dom, m_timeFormat,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "timeType"});
|
|
|
// 此变量在ui中对应下拉框,但仅有一个选项,并且json值不为0,所以该变量不需要读取
|
|
|
// jsonAdd(dom, m_iterationMethod,
|
|
|
// {"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
if (m_timeFormat == 0) {
|
|
|
jsonAdd(dom, 2,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
} else if (m_timeFormat == 1) {
|
|
|
jsonAdd(dom, 1,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
}
|
|
|
jsonAdd(dom, m_relaxationFactor,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "lussor"});
|
|
|
jsonAdd(dom, m_multigridLevels,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "gridLevelNum"});
|
|
|
|
|
|
// 循环类型,如果是v循环的话写入1;如果是w循环的话写入2
|
|
|
if (m_cycleType == 0) {
|
|
|
jsonAdd(dom, 1,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cycleType"});
|
|
|
} else if (m_cycleType == 1) {
|
|
|
jsonAdd(dom, 2,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cycleType"});
|
|
|
}
|
|
|
jsonAdd(dom, m_coarseGridCFL,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "coarseGridNum"});
|
|
|
jsonAdd(dom, m_fineGridCFL,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fineGridNum"});
|
|
|
jsonAdd(dom, m_turbulentCFL,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cfl"});
|
|
|
jsonAdd(dom, m_EntropyCorrectionType,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "EntropyFixVal"});
|
|
|
}
|
|
|
|
|
|
void CFDStructDataSolverNumericalMethodManager::readDataFromDom(rapidjson::Document &dom) {
|
|
|
QVariant temp;
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "generalFmt"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_fluxFormat = temp.toInt();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "twojamson"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_secondOrderArtificialViscosity = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fourjamson"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_fourthOrderArtificialViscosity = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "accuracy"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_spaceAccuracy = temp.toInt();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "limiter"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_limiter = temp.toInt();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "timeType"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_timeFormat = temp.toInt();
|
|
|
}
|
|
|
// 此变量在ui中对应下拉框,但仅有一个选项,并且json值不为0,所以该变量不需要读取
|
|
|
// jsonRead(dom, m_iterationMethod,
|
|
|
// {"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "lussor"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_relaxationFactor = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "gridLevelNum"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_multigridLevels = temp.toInt();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cycleType"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_cycleType = temp.toInt();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "coarseGridNum"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_coarseGridCFL = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fineGridNum"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_fineGridCFL = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cfl"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_turbulentCFL = temp.toDouble();
|
|
|
}
|
|
|
jsonRead(dom, temp,
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "EntropyFixVal"});
|
|
|
if (temp != QVariant()) {
|
|
|
m_EntropyCorrectionType = temp.toInt();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig() {
|
|
|
return new CUIConfig({
|
|
|
{"type", "Widget"},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 空间离散
|
|
|
{"name", tr("Spatial discretization")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 通量格式
|
|
|
{"name", tr("Flux format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::NUumerical_Methods},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Jameson
|
|
|
{"name", "Jameson"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Roe
|
|
|
{"name", "Roe"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMDY
|
|
|
{"name", "AUSMDY"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMPWP
|
|
|
{"name", "AUSMPWP"},
|
|
|
}),
|
|
|
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 二阶人工粘性
|
|
|
{"name", tr("Second-order artificial viscosity")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_secondOrderArtificialViscosity)},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 四阶人工粘性
|
|
|
{"name", tr("Fourth order artificial viscosity")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fourthOrderArtificialViscosity)},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 空间精度
|
|
|
{"name", tr("Spatial accuracy")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_spaceAccuracy)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 一阶迎风
|
|
|
{"name", tr("First order windward")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风差分
|
|
|
{"name", tr("Second-order upwind difference")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风偏置
|
|
|
{"name", tr("Second-order windward bias")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 三阶迎风偏置
|
|
|
{"name", tr("Third order windward bias")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 限制器
|
|
|
{"name", tr("limiter")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_limiter)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // None
|
|
|
{"name", "None"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Vanalbda
|
|
|
{"name", "Vanalbda"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Minmod
|
|
|
{"name", "Minmod"},
|
|
|
}),
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 时间离散
|
|
|
{"name", tr("Time dispersion")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 时间格式
|
|
|
{"name", tr("Time format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_timeFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式
|
|
|
{"name", tr("Implicit")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式二阶差分
|
|
|
{"name", tr("Implicit second-order difference")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 迭代方法
|
|
|
{"name", tr("Iterative method")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_iterationMethod)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // LUSGS
|
|
|
{"name", tr("LUSGS")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
|
{"name", tr("Relaxation factor")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_relaxationFactor)},
|
|
|
},
|
|
|
{}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
|
{"name", tr("Accelerate convergence")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 多重网格层数
|
|
|
{"name", tr("Multi grid layers")},
|
|
|
{"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_cycleType)},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // V循环
|
|
|
{"name", tr("V cycle")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // W循环
|
|
|
{"name", tr("W cycle")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 粗网格CFL数
|
|
|
{"name", tr("Rough grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_coarseGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
|
{"name", tr("Fine grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fineGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
|
{"name", tr("Turbulent CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"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;
|
|
|
}
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genRoeModeUIConfig() {
|
|
|
|
|
|
return new CUIConfig({
|
|
|
{"type", "Widget"},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 空间离散
|
|
|
{"name", tr("Spatial discretization")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 通量格式
|
|
|
{"name", tr("Flux format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::NUumerical_Methods},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Jameson
|
|
|
{"name", "Jameson"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Roe
|
|
|
{"name", "Roe"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMDY
|
|
|
{"name", "AUSMDY"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMPWP
|
|
|
{"name", "AUSMPWP"},
|
|
|
}),
|
|
|
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 熵修正类型
|
|
|
{"name", tr("Entropy correction type")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_EntropyCorrectionType)},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Harten-Hyman
|
|
|
{"name", "Harten-Hyman"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Harten-Yee
|
|
|
{"name", "Harten-Yee"},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 空间精度
|
|
|
{"name", tr("Spatial accuracy")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_spaceAccuracy)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 一阶迎风
|
|
|
{"name", tr("First order windward")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风差分
|
|
|
{"name", tr("Second-order upwind difference")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风偏置
|
|
|
{"name", tr("Second-order windward bias")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 三阶迎风偏置
|
|
|
{"name", tr("Third order windward bias")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 限制器
|
|
|
{"name", tr("limiter")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_limiter)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // None
|
|
|
{"name", "None"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Vanalbda
|
|
|
{"name", "Vanalbda"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Minmod
|
|
|
{"name", "Minmod"},
|
|
|
}),
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 时间离散
|
|
|
{"name", tr("Time dispersion")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 时间格式
|
|
|
{"name", tr("Time format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_timeFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式
|
|
|
{"name", tr("Implicit")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式二阶差分
|
|
|
{"name", tr("Implicit second-order difference")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 迭代方法
|
|
|
{"name", tr("Iterative method")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_iterationMethod)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // LUSGS
|
|
|
{"name", tr("LUSGS")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
|
{"name", tr("Relaxation factor")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_relaxationFactor)},
|
|
|
},
|
|
|
{}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
|
{"name", tr("Accelerate convergence")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 多重网格层数
|
|
|
{"name", tr("Multi grid layers")},
|
|
|
{"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_cycleType)},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // V循环
|
|
|
{"name", tr("V cycle")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // W循环
|
|
|
{"name", tr("W cycle")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 粗网格CFL数
|
|
|
{"name", tr("Rough grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_coarseGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
|
{"name", tr("Fine grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fineGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
|
{"name", tr("Turbulent CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"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;
|
|
|
}
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMDYModeUIConfig() {
|
|
|
return new CUIConfig({
|
|
|
{"type", "Widget"},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 空间离散
|
|
|
{"name", tr("Spatial discretization")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 通量格式
|
|
|
{"name", tr("Flux format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::NUumerical_Methods},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Jameson
|
|
|
{"name", "Jameson"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Roe
|
|
|
{"name", "Roe"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMDY
|
|
|
{"name", "AUSMDY"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMPWP
|
|
|
{"name", "AUSMPWP"},
|
|
|
}),
|
|
|
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 空间精度
|
|
|
{"name", tr("Spatial accuracy")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_spaceAccuracy)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 一阶迎风
|
|
|
{"name", tr("First order windward")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风差分
|
|
|
{"name", tr("Second-order upwind difference")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风偏置
|
|
|
{"name", tr("Second-order windward bias")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 三阶迎风偏置
|
|
|
{"name", tr("Third order windward bias")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 限制器
|
|
|
{"name", tr("limiter")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_limiter)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // None
|
|
|
{"name", "None"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Vanalbda
|
|
|
{"name", "Vanalbda"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Minmod
|
|
|
{"name", "Minmod"},
|
|
|
}),
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 时间离散
|
|
|
{"name", tr("Time dispersion")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 时间格式
|
|
|
{"name", tr("Time format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_timeFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式
|
|
|
{"name", tr("Implicit")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式二阶差分
|
|
|
{"name", tr("Implicit second-order difference")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 迭代方法
|
|
|
{"name", tr("Iterative method")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_iterationMethod)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // LUSGS
|
|
|
{"name", tr("LUSGS")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
|
{"name", tr("Relaxation factor")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_relaxationFactor)},
|
|
|
},
|
|
|
{}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
|
{"name", tr("Accelerate convergence")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 多重网格层数
|
|
|
{"name", tr("Multi grid layers")},
|
|
|
{"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_cycleType)},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // V循环
|
|
|
{"name", tr("V cycle")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // W循环
|
|
|
{"name", tr("W cycle")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 粗网格CFL数
|
|
|
{"name", tr("Rough grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_coarseGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
|
{"name", tr("Fine grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fineGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
|
{"name", tr("Turbulent CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"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;
|
|
|
}
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMPWPModeUIConfig() {
|
|
|
return new CUIConfig({
|
|
|
{"type", "Widget"},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 空间离散
|
|
|
{"name", tr("Spatial discretization")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 通量格式
|
|
|
{"name", tr("Flux format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
{"semaphore", (int)SolutionAnalysisModuleProperty::NUumerical_Methods},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fluxFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Jameson
|
|
|
{"name", "Jameson"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Roe
|
|
|
{"name", "Roe"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMDY
|
|
|
{"name", "AUSMDY"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // AUSMPWP
|
|
|
{"name", "AUSMPWP"},
|
|
|
}),
|
|
|
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 空间精度
|
|
|
{"name", tr("Spatial accuracy")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_spaceAccuracy)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 一阶迎风
|
|
|
{"name", tr("First order windward")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风差分
|
|
|
{"name", tr("Second-order upwind difference")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 二阶迎风偏置
|
|
|
{"name", tr("Second-order windward bias")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 三阶迎风偏置
|
|
|
{"name", tr("Third order windward bias")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 限制器
|
|
|
{"name", tr("limiter")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_limiter)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // None
|
|
|
{"name", "None"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Vanalbda
|
|
|
{"name", "Vanalbda"},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // Minmod
|
|
|
{"name", "Minmod"},
|
|
|
}),
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 时间离散
|
|
|
{"name", tr("Time dispersion")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 时间格式
|
|
|
{"name", tr("Time format")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_timeFormat)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式
|
|
|
{"name", tr("Implicit")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // 隐式二阶差分
|
|
|
{"name", tr("Implicit second-order difference")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 迭代方法
|
|
|
{"name", tr("Iterative method")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
{"value_origin", QVA_GLOBAL(&m_iterationMethod)},
|
|
|
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // LUSGS
|
|
|
{"name", tr("LUSGS")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
|
{"name", tr("Relaxation factor")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_relaxationFactor)},
|
|
|
},
|
|
|
{}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
|
{"name", tr("Accelerate convergence")},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "ComboBox"}, // 多重网格层数
|
|
|
{"name", tr("Multi grid layers")},
|
|
|
{"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_cycleType)},
|
|
|
},
|
|
|
{
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // V循环
|
|
|
{"name", tr("V cycle")},
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "Item"}, // W循环
|
|
|
{"name", tr("W cycle")},
|
|
|
}),
|
|
|
}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 粗网格CFL数
|
|
|
{"name", tr("Rough grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_coarseGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
|
{"name", tr("Fine grid CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"value_origin", QVA_GLOBAL(&m_fineGridCFL)},
|
|
|
},
|
|
|
{}),
|
|
|
new CUIConfig({
|
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
|
{"name", tr("Turbulent CFL number")},
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
|
|
{"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;
|
|
|
}
|