1、修改了界面类型的部分bug

2、创建了界面类型新增界面的函数定义
3、完善计算控制的界面
4、修复了粘性模型选择sa类型时,切换界面导致访问未定义内存而导致闪退的bug
5、将数值e方法界面中的多重网格数修改为下拉框
6、修改运动属性的渲染逻辑,使其能够展示界面
7、时间模式添加时间平均选项
feature/struct-menu-20241023
mzh 2 weeks ago
parent f1a0f7a3fb
commit 3ffefb04cf

@ -26,24 +26,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig()
m_uiConfig = nullptr; m_uiConfig = nullptr;
} }
qDebug()<<"in manager"; qDebug() << "in manager " << m_BoundaryType;
if(m_BoundaryType == 0) if (m_BoundaryType == 0)
return genFarFieldModeUIConfig(); return genFarFieldModeUIConfig();
if(m_BoundaryType == 1) if (m_BoundaryType == 1)
return genPressureInletModeUIConfig(); return genPressureInletModeUIConfig();
if(m_BoundaryType == 2) if (m_BoundaryType == 2)
return genPressureOutletUIConfig(); return genPressureOutletUIConfig();
if(m_BoundaryType == 3) if (m_BoundaryType == 3)
return genSymmetricUIConfig(); return genSymmetricUIConfig();
if(m_BoundaryType == 4) if (m_BoundaryType == 4)
return genCycleUIConfig(); {
if(m_BoundaryType == 5){ if (m_PeriodicType == 0)
if(m_WallType == 0) return genCycleTranslationUIConfig();
if (m_PeriodicType == 1)
return genCycleRotationUIConfig();
return genCycleTranslationUIConfig();
}
if (m_BoundaryType == 5)
{
qDebug() << "walltype is :" << m_WallType;
if (m_WallType == 0)
return genWallAdiabaticWallUIConfig(); return genWallAdiabaticWallUIConfig();
if(m_WallType == 1) if (m_WallType == 1)
return genWallIsothermalWallUIConfig(); return genWallIsothermalWallUIConfig();
if(m_WallType == 2) if (m_WallType == 2)
return genWallHotFlowWallUIConfig(); return genWallHotFlowWallUIConfig();
return genWallAdiabaticWallUIConfig(); return genWallAdiabaticWallUIConfig();
@ -73,7 +81,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig(
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -111,10 +119,10 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig(
}, },
{}), {}),
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 密度 {"type", "LineEdit"}, // 压强
{"name", tr("density")}, {"name", tr("Pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Density)}, {"value_origin", QVA_GLOBAL(&m_Pressure)},
}, },
{}), {}),
new CUIConfig({ new CUIConfig({
@ -170,7 +178,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUICo
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -267,7 +275,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -298,12 +306,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi
}), }),
}), }),
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 静压 {"type", "GroupBox"},
{"name", tr("static pressure")}, {"name", ""},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_StaticPressure)},
}, },
{}), {
new CUIConfig({
{"type", "RadioComponent"},
{"widget", "Component"},
{"layout", "QHBoxLayout"},
},
{
new CUIConfig({
{"name", "Constant Static Pressure"},
}),
new CUIConfig({
{"name", "Average Static Pressure"},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_StaticPressure)},
},
{}),
}),
}); });
return nullptr; return nullptr;
} }
@ -328,7 +356,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig()
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -362,7 +390,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig()
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig() CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUIConfig()
{ {
return new CUIConfig({{"type", "Widget"}}, { return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({ new CUIConfig({
@ -382,7 +410,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -431,8 +459,110 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
{"name", tr("Cycle type")}, {"name", tr("Cycle type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_PeriodicType)}, {"value_origin", QVA_GLOBAL(&m_PeriodicType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
{"type", "Item"},
{"name", tr("Translation ")},
}),
new CUIConfig({
{"type", "Item"},
{"name", tr("Rotation")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 平移距离
{"name", tr("TranslationDistance")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_TranslationDistance)},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleRotationUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
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_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
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")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING},
{"value_origin", QVA_GLOBAL(&m_PairingName)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 对应面
{"name", tr("Corresponding surface")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_CorrespondingSurface)},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 周期类型
{"name", tr("Cycle type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_PeriodicType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
},
{
new CUIConfig({
{"type", "Item"},
{"name", tr("Translation ")},
}),
new CUIConfig({
{"type", "Item"},
{"name", tr("Rotation")},
}),
}),
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 旋转中心 {"type", "LineEdit"}, // 旋转中心
{"name", tr("Rotation center")}, {"name", tr("Rotation center")},
@ -478,7 +608,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
@ -551,6 +681,9 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },
{ {
new CUIConfig({ new CUIConfig({
@ -631,7 +764,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf
new CUIConfig({ new CUIConfig({
{"type", "ComboBox"}, // 边界类型 {"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")}, {"name", tr("Boundary type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_BoundaryType)}, {"value_origin", QVA_GLOBAL(&m_BoundaryType)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions},
}, },

@ -15,29 +15,45 @@ public:
explicit CFDStructDataSolverBoundaryConditionManager(QObject *parent = nullptr); explicit CFDStructDataSolverBoundaryConditionManager(QObject *parent = nullptr);
~CFDStructDataSolverBoundaryConditionManager(); ~CFDStructDataSolverBoundaryConditionManager();
CUIConfig* getParamUIConfig(); CUIConfig *getParamUIConfig();
private: private:
// 生成界面配置 壁面 绝热壁
CUIConfig *genWallAdiabaticWallUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig *genWallIsothermalWallUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig *genWallHotFlowWallUIConfig();
// 生成界面配置 远场 // 生成界面配置 远场
CUIConfig* genFarFieldModeUIConfig(); CUIConfig *genFarFieldModeUIConfig();
// 生成界面配置 压强入口 // 生成界面配置 压强入口
CUIConfig* genPressureInletModeUIConfig(); CUIConfig *genPressureInletModeUIConfig();
// 生成界面配置 压强出口 // 生成界面配置 压强出口
CUIConfig* genPressureOutletUIConfig(); CUIConfig *genPressureOutletUIConfig();
// 生成界面配置 对称 // 生成界面配置 对称
CUIConfig* genSymmetricUIConfig(); CUIConfig *genSymmetricUIConfig();
// 生成界面配置 周期
CUIConfig* genCycleUIConfig(); // 超音速出口/外推
// 生成界面配置 壁面 绝热壁 CUIConfig* genSupersonicOutlet_ExtrapolateUIConfig();
CUIConfig* genWallAdiabaticWallUIConfig();
// 生成界面配置 壁面 绝热壁 // 网格交界面
CUIConfig* genWallIsothermalWallUIConfig(); CUIConfig* genMeshInterfaceUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig* genWallHotFlowWallUIConfig(); // 生成界面配置 周期 平移
CUIConfig *genCycleTranslationUIConfig();
// 生成界面配置 周期 旋转
CUIConfig *genCycleRotationUIConfig();
// 流量出口
CUIConfig* genMassFlowOutletUIConfig();
signals: signals:
private: private:
// 边界名称 // 边界名称
QString m_BoundaryName; // Boundary Name QString m_BoundaryName; // Boundary Name
@ -47,13 +63,14 @@ private:
// 边界类型 // 边界类型
int m_BoundaryType = 0; // Boundary Type int m_BoundaryType = 0; // Boundary Type
// 马赫数 // 马赫数
double m_MachNumber; // Mach Number double m_MachNumber; // Mach Number
// 密度 // // 密度
double m_Density; // Density // double m_Density; // Density
// 压强
double m_Pressure;
// 温度 // 温度
double m_Temperature; // Temperature double m_Temperature; // Temperature
@ -67,7 +84,7 @@ private:
// 湍流强度 // 湍流强度
double m_TurbulentIntensity; // Turbulent Intensity double m_TurbulentIntensity; // Turbulent Intensity
// 总压 // 总压
double m_TotalPressure; // Total Pressure double m_TotalPressure; // Total Pressure
// 总温 // 总温
@ -76,20 +93,19 @@ private:
// 静压 // 静压
double m_StaticPressure; // Static Pressure double m_StaticPressure; // Static Pressure
// 配对名称
// 配对名称
double m_PairingName; // Pairing Name double m_PairingName; // Pairing Name
// 对应面 // 对应面
int m_CorrespondingSurface; // Corresponding Surface int m_CorrespondingSurface; // Corresponding Surface
// 周期类型 // 周期类型
int m_PeriodicType; // Periodic Type int m_PeriodicType = 0; // Periodic Type
// 平移距离 // 平移距离
QString m_TranslationDistance; // Translation Distance QString m_TranslationDistance; // Translation Distance
// 旋转中心 // 旋转中心
QString m_RotationCenter; // Rotation Center QString m_RotationCenter; // Rotation Center
// 转轴方向 // 转轴方向
@ -99,9 +115,9 @@ private:
QString m_RotationAngle; // Rotation Angle QString m_RotationAngle; // Rotation Angle
// 壁面类型 // 壁面类型
QString m_WallType = 0; // Wall Type int m_WallType = 0; // Wall Type
// 壁面温度 // 壁面温度
double m_WallTemperature; // Wall Temperature double m_WallTemperature; // Wall Temperature
// 壁面热流 // 壁面热流

@ -57,15 +57,31 @@ CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig()
}, },
{ {
new CUIConfig({ new CUIConfig({
{"type", "CheckButton"}, // 并行 {"type", "CheckBox"}, // 并行
{"name", tr("parallel")}, {"name", tr("parallel")},
}), }),
new CUIConfig({ new CUIConfig({
{"type", "CheckButton"}, // MPI库 {"type", "ComboBox"}, // MPI库
{"name", tr("MPI library")}, {"name", tr("MPI library")},
},
{
new CUIConfig({
{"type", "Item"},
{"name", tr("Microsoft MPI")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 数值计算核数
{"name", tr("Numerical Computation Cores")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_NumericalComputationCores)},
}),
new CUIConfig({
{"type", "LineEdit"}, // 网格组装核数
{"name", tr("Mesh Assembly Cores")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_MeshAssemblyCores)},
}), }),
// TODO 数值计算核数
// TODO 网格组装核数
}), }),
}); });
return nullptr; return nullptr;

@ -25,6 +25,12 @@ signals:
private: private:
// 数据保存频率 // 数据保存频率
int m_DataSaveFrequency; // Data Save Frequency int m_DataSaveFrequency; // Data Save Frequency
// 数值计算核数
int m_NumericalComputationCores = 0;
// 网格组装核数
int m_MeshAssemblyCores = 0;
}; };
#endif // CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H #endif // CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H

@ -35,6 +35,7 @@ CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig()
return genRANSSAUIConfig(); return genRANSSAUIConfig();
} }
if(m_Model == 3) { if(m_Model == 3) {
m_SAType = 0;
if(m_RNSModel == 0) if(m_RNSModel == 0)
return genDESSAUIConfig(); return genDESSAUIConfig();
if(m_RNSModel == 1) if(m_RNSModel == 1)
@ -44,6 +45,7 @@ CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig()
return genDESSAUIConfig(); return genDESSAUIConfig();
} }
if(m_Model == 4) { if(m_Model == 4) {
m_SAType = 0;
if(m_RNSModel == 0) if(m_RNSModel == 0)
return genCLESUIConfig(); return genCLESUIConfig();
if(m_RNSModel == 1) if(m_RNSModel == 1)
@ -483,10 +485,10 @@ CUIConfig *CFDStructDataSolverKvislManager::genCLESUIConfig()
{"type", "RadioButton"}, // 按钮:standard {"type", "RadioButton"}, // 按钮:standard
{"name", tr("standard")}, {"name", tr("standard")},
}), }),
new CUIConfig({ // new CUIConfig({
{"type", "RadioButton"}, // 按钮:Edwards // {"type", "RadioButton"}, // 按钮:Edwards
{"name", tr("Edwards")}, // {"name", tr("Edwards")},
}) // }),
}), }),
}); });
return nullptr; return nullptr;

@ -14,13 +14,13 @@ CFDStructDataSolverNumericalMethodManager::~CFDStructDataSolverNumericalMethodMa
CUIConfig *CFDStructDataSolverNumericalMethodManager::getParamUIConfig() CUIConfig *CFDStructDataSolverNumericalMethodManager::getParamUIConfig()
{ {
if(m_fluxFormat == 0) if (m_fluxFormat == 0)
return this->genJamesonModeUIConfig(); return this->genJamesonModeUIConfig();
if(m_fluxFormat == 1) if (m_fluxFormat == 1)
return this->genRoeModeUIConfig(); return this->genRoeModeUIConfig();
if(m_fluxFormat == 2) if (m_fluxFormat == 2)
return this->genAUSMDYModeUIConfig(); return this->genAUSMDYModeUIConfig();
if(m_fluxFormat == 3) if (m_fluxFormat == 3)
return this->genAUSMPWPModeUIConfig(); return this->genAUSMPWPModeUIConfig();
return this->genRoeModeUIConfig(); return this->genRoeModeUIConfig();
} }
@ -173,17 +173,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig()
}, },
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 多重网格层数 {"type", "ComboBox"}, // 多重网格层数
{"name", tr("Multi grid layers")}, {"name", tr("Multi grid layers")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"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({ new CUIConfig({
{"type", "ComboBox"}, // 循环类型 {"type", "ComboBox"}, // 循环类型
{"name", tr("Loop type")}, {"name", tr("Loop type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"value_origin", QVA_GLOBAL(&m_cycleType)},
}, },
{ {
new CUIConfig({ new CUIConfig({
@ -216,6 +229,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig()
{"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, {"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)},
}),
}), }),
}); });
@ -375,17 +394,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genRoeModeUIConfig()
}, },
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 多重网格层数 {"type", "ComboBox"}, // 多重网格层数
{"name", tr("Multi grid layers")}, {"name", tr("Multi grid layers")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"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({ new CUIConfig({
{"type", "ComboBox"}, // 循环类型 {"type", "ComboBox"}, // 循环类型
{"name", tr("Loop type")}, {"name", tr("Loop type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"value_origin", QVA_GLOBAL(&m_cycleType)},
}, },
{ {
new CUIConfig({ new CUIConfig({
@ -418,6 +450,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genRoeModeUIConfig()
{"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, {"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; return nullptr;
@ -557,17 +595,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMDYModeUIConfig()
}, },
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 多重网格层数 {"type", "ComboBox"}, // 多重网格层数
{"name", tr("Multi grid layers")}, {"name", tr("Multi grid layers")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"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({ new CUIConfig({
{"type", "ComboBox"}, // 循环类型 {"type", "ComboBox"}, // 循环类型
{"name", tr("Loop type")}, {"name", tr("Loop type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"value_origin", QVA_GLOBAL(&m_cycleType)},
}, },
{ {
new CUIConfig({ new CUIConfig({
@ -600,6 +651,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMDYModeUIConfig()
{"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, {"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; return nullptr;
@ -741,17 +798,30 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMPWPModeUIConfig()
}, },
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"}, // 多重网格层数 {"type", "ComboBox"}, // 多重网格层数
{"name", tr("Multi grid layers")}, {"name", tr("Multi grid layers")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"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({ new CUIConfig({
{"type", "ComboBox"}, // 循环类型 {"type", "ComboBox"}, // 循环类型
{"name", tr("Loop type")}, {"name", tr("Loop type")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_multigridLevels)}, {"value_origin", QVA_GLOBAL(&m_cycleType)},
}, },
{ {
new CUIConfig({ new CUIConfig({
@ -784,6 +854,12 @@ CUIConfig *CFDStructDataSolverNumericalMethodManager::genAUSMPWPModeUIConfig()
{"value_origin", QVA_GLOBAL(&m_turbulentCFL)}, {"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; return nullptr;

@ -85,7 +85,7 @@ private:
double m_relaxationFactor = 0.5; double m_relaxationFactor = 0.5;
// 多重网格层数 // 多重网格层数
double m_multigridLevels = 0.5; int m_multigridLevels = 0;
// 循环类型 // 循环类型
/** /**
@ -113,6 +113,9 @@ private:
*/ */
int m_EntropyCorrectionType; int m_EntropyCorrectionType;
//收敛稳定化
int m_ConvergenceStabilization = 0;
}; };
#endif // CFDSTRUCTDATASOLVERNUMERICALMETHODMANAGER_H #endif // CFDSTRUCTDATASOLVERNUMERICALMETHODMANAGER_H

@ -156,6 +156,7 @@ CUIConfig *CFDStructDataSolverSportsAttributesItemManager::genRigidBodyModeUICon
CFDStructDataSolverSportsAttributesManager::CFDStructDataSolverSportsAttributesManager(QObject *parent) CFDStructDataSolverSportsAttributesManager::CFDStructDataSolverSportsAttributesManager(QObject *parent)
{ {
m_itemList.push_back(new CFDStructDataSolverSportsAttributesItemManager);
} }
CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributesManager() CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributesManager()
@ -164,6 +165,7 @@ CFDStructDataSolverSportsAttributesManager::~CFDStructDataSolverSportsAttributes
CUIConfig *CFDStructDataSolverSportsAttributesManager::getParamUIConfig() CUIConfig *CFDStructDataSolverSportsAttributesManager::getParamUIConfig()
{ {
return m_itemList[0]->getParamUIConfig();
return NULL; return NULL;
} }

@ -107,6 +107,12 @@ CUIConfig *CFDStructDataSolverTimeModeManager::genUnsteadyModeUIConfig()
{"name", "mcyc"}, {"name", "mcyc"},
{"value_type", "Int"}, {"value_type", "Int"},
{"value_origin", QVA_GLOBAL(&m_mcyc)}, {"value_origin", QVA_GLOBAL(&m_mcyc)},
}) }),
new CUIConfig({
{"type", "CheckBox"},
{"name", "Time Average"},
{"value_type", "Int"},
{"value_origin", QVA_GLOBAL(&m_timeaverage)},
})
}); });
} }

Loading…
Cancel
Save