You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
658 lines
48 KiB
C++
658 lines
48 KiB
C++
#include "CFDStructDataSolverNumericalMethodManager.h"
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
CFDStructDataSolverNumericalMethodManager::CFDStructDataSolverNumericalMethodManager(QObject *parent):CFDStructDataManagerBase(parent)
|
|
{
|
|
m_uiConfig = nullptr;
|
|
}
|
|
|
|
CFDStructDataSolverNumericalMethodManager::~CFDStructDataSolverNumericalMethodManager()
|
|
{
|
|
|
|
}
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::getParamUIConfig()
|
|
{
|
|
return this->genRoeModeUIConfig();
|
|
}
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig()
|
|
{
|
|
return new CUIConfig({
|
|
{"type", "Widget"},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "GroupBox"}, // 空间离散
|
|
{"name", tr("Spatial discretization")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 通量格式
|
|
{"name", tr("Flux format")},
|
|
},
|
|
{
|
|
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")},
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 四阶人工粘性
|
|
{"name", tr("Fourth order artificial viscosity")},
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 空间精度
|
|
{"name", tr("Spatial accuracy")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "Item"}, // LUSGS
|
|
{"name", tr("LUSGS")},
|
|
}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
{"name", tr("Relaxation factor")},
|
|
},
|
|
{}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
{"name", tr("Accelerate convergence")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 多重网格层数
|
|
{"name", tr("Multi grid layers")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 循环类型
|
|
{"name", tr("Loop type")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
{"name", tr("Fine grid CFL number")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
{"name", tr("Turbulent CFL number")},
|
|
},
|
|
{}),
|
|
}),
|
|
});
|
|
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "Item"}, // LUSGS
|
|
{"name", tr("LUSGS")},
|
|
}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
{"name", tr("Relaxation factor")},
|
|
},
|
|
{}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
{"name", tr("Accelerate convergence")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 多重网格层数
|
|
{"name", tr("Multi grid layers")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 循环类型
|
|
{"name", tr("Loop type")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
{"name", tr("Fine grid CFL number")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
{"name", tr("Turbulent CFL number")},
|
|
},
|
|
{}),
|
|
}),
|
|
});
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "Item"}, // LUSGS
|
|
{"name", tr("LUSGS")},
|
|
}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
{"name", tr("Relaxation factor")},
|
|
},
|
|
{}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
{"name", tr("Accelerate convergence")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 多重网格层数
|
|
{"name", tr("Multi grid layers")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 循环类型
|
|
{"name", tr("Loop type")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
{"name", tr("Fine grid CFL number")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
{"name", tr("Turbulent CFL number")},
|
|
},
|
|
{}),
|
|
}),
|
|
});
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "Item"}, // LUSGS
|
|
{"name", tr("LUSGS")},
|
|
}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 松弛因子
|
|
{"name", tr("Relaxation factor")},
|
|
},
|
|
{}),
|
|
}),
|
|
new CUIConfig({
|
|
{"type", "GroupBox"}, // 加速收敛
|
|
{"name", tr("Accelerate convergence")},
|
|
},
|
|
{
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 多重网格层数
|
|
{"name", tr("Multi grid layers")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "ComboBox"}, // 循环类型
|
|
{"name", tr("Loop type")},
|
|
},
|
|
{
|
|
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")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 细网格CFL数
|
|
{"name", tr("Fine grid CFL number")},
|
|
},
|
|
{}),
|
|
new CUIConfig({
|
|
{"type", "LineEdit"}, // 湍流CFL数
|
|
{"name", tr("Turbulent CFL number")},
|
|
},
|
|
{}),
|
|
}),
|
|
});
|
|
return nullptr;
|
|
}
|