1、完成边界条件配置

feature/struct-menu-20241023
mzh 2 weeks ago
parent 3789e34047
commit fb893a2569

@ -10,8 +10,7 @@ CFDStructDataSolverBoundaryConditionManager::CFDStructDataSolverBoundaryConditio
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
{ emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
}
CFDStructDataSolverBoundaryConditionManager::~CFDStructDataSolverBoundaryConditionManager()
@ -38,16 +37,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig(
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -78,31 +84,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig(
new CUIConfig({
{"type", "LineEdit"}, // 马赫数
{"name", tr("mach number")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_MachNumber)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 密度
{"name", tr("density")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Density)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 温度
{"name", tr("temperature")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Temperature)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_InflowDirection)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
},
{}),
});
@ -116,16 +134,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUICo
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -156,31 +181,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUICo
new CUIConfig({
{"type", "LineEdit"}, // 总压
{"name", tr("Total pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TotalPressure)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 总温
{"name", tr("Total temperature")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TotalTemperature)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_StaticPressure)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_InflowDirection)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
},
{}),
// TODO 用户自定义
@ -194,16 +231,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -234,6 +278,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_StaticPressure)},
},
{}),
});
@ -246,16 +292,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig()
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -293,16 +346,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -333,31 +393,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
new CUIConfig({
{"type", "LineEdit"}, // 配对名称
{"name", tr("Pairing Name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_PairingName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 对应面
{"type", "ComboBox"}, // 对应面
{"name", tr("Corresponding surface")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_CorrespondingSurface)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 周期类型
{"type", "ComboBox"}, // 周期类型
{"name", tr("Cycle type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_PeriodicType)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转中心
{"name", tr("Rotation center")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_RotationCenter)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 转轴方向
{"name", tr("Axis direction")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_RotationAxisDirection)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转角
{"name", tr("Rotation angle")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_RotationAngle)},
},
{}),
});
@ -370,16 +442,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -410,8 +489,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo
new CUIConfig({
{"type", "RadioComponent"}, // 壁面类型
{"name", tr("Wall type")},
{"widget","GroupBox"},
{"widget", "GroupBox"},
{"layout", "QHBoxLayout"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_WallType)},
},
{
new CUIConfig({
@ -437,7 +518,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"widget","GroupBox"},
{"widget", "GroupBox"},
},
{}),
new CUIConfig({
@ -477,8 +558,12 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC
}),
new CUIConfig({
{"type", "RadioComponent"}, // 壁面类型
{"name", tr(("Wall type"))},
{"widget","GroupBox"},
{"name", tr("Wall type")},
{"widget", "GroupBox"},
{"layout", "QHBoxLayout"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_WallType)},
},
{
new CUIConfig({
@ -494,8 +579,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC
{"name", tr("Hot flow wall")},
}),
new CUIConfig({
{"type","LineEidt"},//壁面温度
{"name",tr("Wall temperature")},
{"type", "LineEidt"}, // 壁面温度
{"name", tr("Wall temperature")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_WallTemperature)},
}),
}),
});
@ -508,16 +595,23 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryName)},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_ComputationalDomain)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
@ -548,7 +642,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf
new CUIConfig({
{"type", "RadioComponent"}, // 壁面类型
{"name", tr("Wall type")},
{"widget","GroupBox"},
{"widget", "GroupBox"},
{"layout", "QHBoxLayout"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_WallType)},
},
{
new CUIConfig({
@ -564,8 +661,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf
{"name", tr("Hot flow wall")},
}),
new CUIConfig({
{"type","LineEidt"},//壁面热流
{"name",tr("Wall heat flux")},
{"type", "LineEidt"}, // 壁面热流
{"name", tr("Wall heat flux")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_WallHeatFlux)},
}),
}),
});

@ -37,18 +37,78 @@ private:
signals:
private:
// 时间模式定常0非定常1
int m_runtype = 0;
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000;
// 步长模式 >=1
double m_alf0 = 1.0;
// 时间步长 >0
double m_realdt = 1.0;
// 时间步数 >=1
int m_nstep = 10;
// 时均统计量数据采样0 | 1
int m_timeaverage = 0;
// 边界名称
QString m_BoundaryName; // Boundary Name
// 所属计算域
QString m_ComputationalDomain; // Computational Domain
// 边界类型
int m_BoundaryType; // Boundary Type
// 马赫数
double m_MachNumber; // Mach Number
// 密度
double m_Density; // Density
// 温度
double m_Temperature; // Temperature
// 来流方向
double m_InflowDirection; // Inflow Direction
// 湍流粘性比
double m_TurbulentViscosityRatio; // Turbulent Viscosity Ratio
// 湍流强度
double m_TurbulentIntensity; // Turbulent Intensity
// 总压
double m_TotalPressure; // Total Pressure
// 总温
double m_TotalTemperature; // Total Temperature
// 静压
double m_StaticPressure; // Static Pressure
// 来流方向
double m_InflowDirection; // Inflow Directionn
// 配对名称
double m_PairingName; // Pairing Name
// 对应面
int m_CorrespondingSurface; // Corresponding Surface
// 周期类型
int m_PeriodicType; // Periodic Type
// 平移距离
QString m_TranslationDistance; // Translation Distance
// 旋转中心
QString m_RotationCenter; // Rotation Center
// 转轴方向
QString m_RotationAxisDirection; // Rotation Axis Direction
// 旋转角
QString m_RotationAngle; // Rotation Angle
// 壁面类型
std::string m_WallType; // Wall Type
// 壁面温度
double m_WallTemperature; // Wall Temperature
// 壁面热流
double m_WallHeatFlux; // Wall Heat Flux
};
#endif // CFDSTRUCTDATASOLVERBOUNDARYCONDITIONMANAGER_H

Loading…
Cancel
Save