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.
AppFlow/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundary...

574 lines
43 KiB
C++

#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverBoundaryConditionManager.h"
CFDStructDataSolverBoundaryConditionManager::CFDStructDataSolverBoundaryConditionManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
}
CFDStructDataSolverBoundaryConditionManager::~CFDStructDataSolverBoundaryConditionManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
m_uiConfig = this->genFarFieldModeUIConfig();
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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("mach number")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 密度
{"name", tr("density")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 温度
{"name", tr("temperature")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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("Total pressure")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 总温
{"name", tr("Total temperature")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
},
{}),
// TODO 用户自定义
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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("static pressure")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 对应面
{"name", tr("Corresponding surface")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 周期类型
{"name", tr("Cycle type")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转中心
{"name", tr("Rotation center")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 转轴方向
{"name", tr("Axis direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转角
{"name", tr("Rotation angle")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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", "RadioComponent"}, // 壁面类型
{"name", tr("Wall type")},
{"widget","GroupBox"},
},
{
new CUIConfig({
{"type", "RadioButton"}, // 绝热壁
{"name", tr("Adiabatic wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 等温壁
{"name", tr("Isothermal wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 热流壁
{"name", tr("Hot flow wall")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"widget","GroupBox"},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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", "RadioComponent"}, // 壁面类型
{"name", tr(("Wall type"))},
{"widget","GroupBox"},
},
{
new CUIConfig({
{"type", "RadioButton"}, // 绝热壁
{"name", tr("Adiabatic wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 等温壁
{"name", tr("Isothermal wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 热流壁
{"name", tr("Hot flow wall")},
}),
new CUIConfig({
{"type","LineEidt"},//壁面温度
{"name",tr("Wall temperature")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
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", "RadioComponent"}, // 壁面类型
{"name", tr("Wall type")},
{"widget","GroupBox"},
},
{
new CUIConfig({
{"type", "RadioButton"}, // 绝热壁
{"name", tr("Adiabatic wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 等温壁
{"name", tr("Isothermal wall")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 热流壁
{"name", tr("Hot flow wall")},
}),
new CUIConfig({
{"type","LineEidt"},//壁面热流
{"name",tr("Wall heat flux")},
}),
}),
});
return nullptr;
}