#include "CFDStructDataSolverBoundaryConditionManager.h" #include "CFDStructDataSolverTimeModeManager.h" #include "CFDStructMain/CFDStructDefine.h" #include "CFDStructSigsCenter.h" #include "CUIProperty/CUIConfig.h" #include "CUIProperty/CUISigsCenter.h" #include 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; } qDebug() << "in manager " << m_BoundaryType; if (m_BoundaryType == 0) { qDebug() << "walltype is :" << m_WallType; if (m_WallType == 0) return genWallAdiabaticWallUIConfig(); if (m_WallType == 1) return genWallIsothermalWallUIConfig(); if (m_WallType == 2) return genWallHotFlowWallUIConfig(); return genWallAdiabaticWallUIConfig(); } if (m_BoundaryType == 1) return genFarFieldModeUIConfig(); if (m_BoundaryType == 2) { if (m_BoundaryType_sub == 0) { if (m_VelocityDirectionType == 0) { return genPressureInletModeSupersonicCylindricalUIConfig(); } if (m_VelocityDirectionType == 1) { return genPressureInletModeSupersonicCartesianUIConfig(); } if (m_VelocityDirectionType == 2) { return genPressureInletModeSupersonicSurfaceUIConfig(); } } if (m_BoundaryType_sub == 1) { if (m_VelocityDirectionType == 0) { return genPressureInletModeSubsonicCylindricalUIConfig(); } if (m_VelocityDirectionType == 1) { return genPressureInletModeSubsonicCartesianUIConfig(); } if (m_VelocityDirectionType == 2) { return genPressureInletModeSubsonicSurfaceUIConfig(); } } } if (m_BoundaryType == 3) return genPressureOutletUIConfig(); if (m_BoundaryType == 4) return genSymmetricUIConfig(); if (m_BoundaryType == 5) { return genSupersonicOutlet_ExtrapolateUIConfig(); } if (m_BoundaryType == 6) { return genMeshInterfaceUIConfig(); } if (m_BoundaryType == 7) { if (m_PeriodicType == 0) return genCycleTranslationUIConfig(); if (m_PeriodicType == 1) return genCycleRotationUIConfig(); return genCycleTranslationUIConfig(); } if (m_BoundaryType == 8) { return genMassFlowOutletUIConfig(); } return m_uiConfig; } void CFDStructDataSolverBoundaryConditionManager::saveDataToDom(rapidjson::Document &dom) { // TODO } void CFDStructDataSolverBoundaryConditionManager::readDataFromDom(rapidjson::Document &dom) { // TODO } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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("Pressure")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_Pressure)}, }, {}), 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", "GroupBox"}, // 来流方向 {"name", tr("Flow direction")}, {"layout", "QHBoxLayout"}, // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, // {"value_origin", QVA_GLOBAL(&m_InflowDirection)}, }, { new CUIConfig({ {"type", "LineEdit"}, {"name", "X:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_InflowDirectionX}, }), new CUIConfig({ {"type", "LineEdit"}, {"name", "Y:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_InflowDirectionY}, }), new CUIConfig({ {"type", "LineEdit"}, {"name", "Z:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_InflowDirectionZ}, }), }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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)}, // }, // {}), }), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupersonicCylindricalUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), new CUIConfig({ {"type", "LineEdit"}, // 方向矢量 {"name", tr("Direction Vector(r,theta,z)")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, }, {}), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupersonicCartesianUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), new CUIConfig({ {"type", "LineEdit"}, // 方向矢量 {"name", tr("Direction Vector(x,y,z)")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, }, {}), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupersonicSurfaceUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubsonicCylindricalUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), new CUIConfig({ {"type", "LineEdit"}, // 方向矢量 {"name", tr("Direction Vector(r,theta,z)")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, }, {}), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubsonicCartesianUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), new CUIConfig({ {"type", "LineEdit"}, // 方向矢量 {"name", tr("Direction Vector(x,y,z)")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_DirectionVector)}, }, {}), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSubsonicSurfaceUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "ComboBox"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_BoundaryType_sub)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr("Supersonic")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Subsonic")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { 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", "ComboBox"}, // 速度方向类型 {"name", tr("Velocity Direction Type")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_VelocityDirectionType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ {"type", "Item"}, {"name", tr(" Specified Direction (Cylindrical Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Specified Direction (Cartesian Coordinate System)")}, }), new CUIConfig({ {"type", "Item"}, {"name", tr("Surface Normal")}, }), }), }), // TODO 用户自定义 new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "GroupBox"}, {"name", ""}, }, { 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)}, }, {}), }), new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSupersonicOutlet_ExtrapolateUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genMeshInterfaceUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { new CUIConfig({ {"type", "LineEdit"}, // 配对名称 {"name", tr("Paired Name")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_PairedName)}, }), new CUIConfig({ {"type", "ComboBox"}, // 对应面 {"name", tr("Matching Surface")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_MatchingSurface)}, }), }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), 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({ {"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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), 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({ {"type", "LineEdit"}, // 旋转中心 {"name", tr("Rotation center")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, {"value_origin", QVA_GLOBAL(&m_RotationCenter)}, }, {}), new CUIConfig({ {"type", "GroupBox"}, // 转轴方向 {"name", tr("Axis direction")}, {"layout", "QHBoxLayout"}, // {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_STRING}, // {"value_origin", QVA_GLOBAL(&m_RotationAxisDirection)}, }, { new CUIConfig({ {"type", "LineEdit"}, {"name", "X:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_per_rot_aixsX}, }), new CUIConfig({ {"type", "LineEdit"}, {"name", "Y:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_per_rot_aixsY}, }), new CUIConfig({ {"type", "LineEdit"}, {"name", "Z:"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", m_per_rot_aixsZ}, }), }), new CUIConfig({ {"type", "LineEdit"}, // 旋转角 {"name", tr("Rotation angle")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_RotationAngle)}, }, {}), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genMassFlowOutletUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "GroupBox"}, }, { new CUIConfig({ {"type", "GroupBox"}, }, { new CUIConfig({ {"type", "LineEdit"}, {"name", tr("Flow Rate (Single Channel)")}, // 流量(单流道 {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_FlowRate)}, }), new CUIConfig({ {"type", "LineEdit"}, // 初始压强: {"name", tr("Initial Pressure")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_InitialPressure)}, }), new CUIConfig({ {"type", "LineEdit"}, {"name", tr("Pressure Relaxation Factor")}, // 压强松弛因子 {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_PressureRelaxationFactor)}, }), }), new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, }), }), }); } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "RadioComponent"}, // 壁面类型 {"name", tr("Wall type")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { 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", "RadioComponent"}, // 运动属性 {"name", tr("Motion Properties")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, }, { new CUIConfig({ {"name", tr("No Motion")} // 无运动 }), new CUIConfig({ {"name", tr("Rotational Motion")} // 旋转运动 }), }), new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); 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")}, {"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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "RadioComponent"}, // 壁面类型 {"name", tr("Wall type")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { 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", "LineEdit"}, // 壁面温度 {"name", tr("Wall temperature")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_WallTemperature)}, }), new CUIConfig({ {"type", "RadioComponent"}, // 运动属性 {"name", tr("Motion Properties")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, }, { new CUIConfig({ {"name", tr("No Motion")} // 无运动 }), new CUIConfig({ {"name", tr("Rotational Motion")} // 旋转运动 }), }), new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConfig() { 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("Wall")}, }), new CUIConfig({ {"type", "Item"}, // 远场 {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 {"name", tr("Symmetric")}, }), new CUIConfig({ {"type", "Item"}, // 超音速出口/外推 {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ {"type", "Item"}, // 网格交界面 {"name", tr("Mesh-Interface")}, }), new CUIConfig({ {"type", "Item"}, // 周期 {"name", tr("Periodic")}, }), new CUIConfig({ {"type", "Item"}, // 流量出口 {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ {"type", "RadioComponent"}, // 壁面类型 {"name", tr("Wall type")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { 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", "LineEdit"}, // 壁面热流 {"name", tr("Wall heat flux")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, {"value_origin", QVA_GLOBAL(&m_WallHeatFlux)}, }), new CUIConfig({ {"type", "RadioComponent"}, // 运动属性 {"name", tr("Motion Properties")}, {"widget", "GroupBox"}, {"layout", "QHBoxLayout"}, }, { new CUIConfig({ {"name", tr("No Motion")} // 无运动 }), new CUIConfig({ {"name", tr("Rotational Motion")} // 旋转运动 }), }), new CUIConfig({ {"type", "CheckBox"}, {"name", tr("User-Defined")}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_UserDefined)}, }), }); return nullptr; }