diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp index 816e1ff..91272ad 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.cpp @@ -29,14 +29,58 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig() qDebug() << "in manager " << m_BoundaryType; if (m_BoundaryType == 0) - return genFarFieldModeUIConfig(); + { + 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 genPressureInletModeUIConfig(); + return genFarFieldModeUIConfig(); if (m_BoundaryType == 2) - return genPressureOutletUIConfig(); + { + 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 genSymmetricUIConfig(); + 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(); @@ -44,17 +88,9 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig() return genCycleRotationUIConfig(); return genCycleTranslationUIConfig(); } - if (m_BoundaryType == 5) + if (m_BoundaryType == 8) { - 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(); + return genMassFlowOutletUIConfig(); } return m_uiConfig; @@ -86,79 +122,1045 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig( {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), + new CUIConfig({ - {"type", "LineEdit"}, // 马赫数 - {"name", tr("mach number")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_MachNumber)}, + {"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", "LineEdit"}, // 来流方向 + {"name", tr("Flow direction")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_InflowDirection)}, + }, + {}), + }), + 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("Pressure")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_Pressure)}, + {"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("temperature")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_Temperature)}, + {"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("Flow direction")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_InflowDirection)}, + {"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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); +} + +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("Turbulent viscosity ratio")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)}, + {"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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); +} + +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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); +} + +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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); + 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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); +} + +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", "CheckButton"}, + {"name", tr("User-Defined")}, + }), + + }); +} + +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", "LineEdit"}, // 湍流强度 - {"name", tr("Turbulence intensity")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)}, - }, - {}), - }); + {"type", "CheckBox"}, + {"name", tr("User-Defined")}, + }), + }); return nullptr; } -CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUIConfig() +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() { return new CUIConfig({{"type", "Widget"}}, { new CUIConfig({ @@ -183,79 +1185,50 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUICo {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), - 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 用户自定义 }); return nullptr; } -CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfig() +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSupersonicOutlet_ExtrapolateUIConfig() { return new CUIConfig({{"type", "Widget"}}, { new CUIConfig({ @@ -280,63 +1253,49 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"name", tr("Symmetric")}, }), new CUIConfig({ - {"type", "Item"}, // 周期 - {"name", tr("cycle")}, + {"type", "Item"}, // 超音速出口/外推 + {"name", tr("Supersonic outlet/Extrapolate")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 网格交界面 + {"name", tr("Mesh-Interface")}, }), - }), - 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"}, - }), - }), + {"type", "Item"}, // 周期 + {"name", tr("Periodic")}, + }), new CUIConfig({ - {"type", "LineEdit"}, // 静压 - {"name", tr("static pressure")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_StaticPressure)}, - }, - {}), + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, + }), }), - }); - return nullptr; } -CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genMeshInterfaceUIConfig() { return new CUIConfig({{"type", "Widget"}}, { new CUIConfig({ @@ -361,33 +1320,63 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig() {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"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)}, }), }), }); - return nullptr; } CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUIConfig() @@ -415,29 +1404,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleTranslationUICon {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ @@ -507,29 +1510,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleRotationUIConfig {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ @@ -588,7 +1605,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleRotationUIConfig return nullptr; } -CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUIConfig() +CUIConfig *CFDStructDataSolverBoundaryConditionManager::genMassFlowOutletUIConfig() { return new CUIConfig({{"type", "Widget"}}, { new CUIConfig({ @@ -613,29 +1630,146 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"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 surface")}, + {"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({ @@ -645,6 +1779,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ @@ -660,6 +1795,24 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUICo {"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")}, + }), }); return nullptr; } @@ -686,29 +1839,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ @@ -718,6 +1885,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { @@ -733,13 +1901,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIC {"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({ - {"type", "LineEidt"}, // 壁面温度 - {"name", tr("Wall temperature")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_WallTemperature)}, + {"name", tr("Rotational Motion")} // 旋转运动 }), }), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("User-Defined")}, + }), }); return nullptr; } @@ -769,29 +1956,43 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { + new CUIConfig({ + {"type", "Item"}, // 壁面 + {"name", tr("Wall")}, + }), + new CUIConfig({ {"type", "Item"}, // 远场 - {"name", tr("far field")}, + {"name", tr("FarField")}, }), new CUIConfig({ {"type", "Item"}, // 压强入口 - {"name", tr("Pressure inlet")}, + {"name", tr("Total Pressure Inlet")}, }), new CUIConfig({ {"type", "Item"}, // 压强出口 - {"name", tr("Pressure outlet")}, + {"name", tr("Pressure Outlet")}, }), new CUIConfig({ {"type", "Item"}, // 对称 - {"name", tr("symmetric")}, + {"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("cycle")}, + {"name", tr("Periodic")}, }), new CUIConfig({ - {"type", "Item"}, // 壁面 - {"name", tr("Wall surface")}, + {"type", "Item"}, // 流量出口 + {"name", tr("mass flow outlet")}, }), }), new CUIConfig({ @@ -801,6 +2002,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf {"layout", "QHBoxLayout"}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_origin", QVA_GLOBAL(&m_WallType)}, + {"semaphore", (int)SolutionAnalysisModuleProperty::Boundary_Conditions}, }, { new CUIConfig({ @@ -815,13 +2017,32 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConf {"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({ - {"type", "LineEidt"}, // 壁面热流 - {"name", tr("Wall heat flux")}, - {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, - {"value_origin", QVA_GLOBAL(&m_WallHeatFlux)}, + {"name", tr("Rotational Motion")} // 旋转运动 }), }), + new CUIConfig({ + {"type", "CheckBox"}, + {"name", tr("User-Defined")}, + }), }); return nullptr; } diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h index 0d9f4b4..826642c 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverBoundaryConditionManager.h @@ -18,7 +18,6 @@ public: CUIConfig *getParamUIConfig(); private: - // 生成界面配置 壁面 绝热壁 CUIConfig *genWallAdiabaticWallUIConfig(); // 生成界面配置 壁面 绝热壁 @@ -29,8 +28,19 @@ private: // 生成界面配置 远场 CUIConfig *genFarFieldModeUIConfig(); - // 生成界面配置 压强入口 - CUIConfig *genPressureInletModeUIConfig(); + // 生成界面配置 压强入口 超声速 柱坐标系 + CUIConfig *genPressureInletModeSupersonicCylindricalUIConfig(); + // 生成界面配置 压强入口 超声速 笛卡尔坐标系 + CUIConfig *genPressureInletModeSupersonicCartesianUIConfig(); + // 生成界面配置 压强入口 超声速 面法相 + CUIConfig *genPressureInletModeSupersonicSurfaceUIConfig(); + // 生成界面配置 压强入口 亚声速 柱坐标系 + CUIConfig *genPressureInletModeSubsonicCylindricalUIConfig(); + // 生成界面配置 压强入口 亚声速 笛卡尔坐标系 + CUIConfig *genPressureInletModeSubsonicCartesianUIConfig(); + // 生成界面配置 压强入口 亚声速 面法相 + CUIConfig *genPressureInletModeSubsonicSurfaceUIConfig(); + // 生成界面配置 压强出口 CUIConfig *genPressureOutletUIConfig(); @@ -39,10 +49,10 @@ private: CUIConfig *genSymmetricUIConfig(); // 超音速出口/外推 - CUIConfig* genSupersonicOutlet_ExtrapolateUIConfig(); + CUIConfig *genSupersonicOutlet_ExtrapolateUIConfig(); // 网格交界面 - CUIConfig* genMeshInterfaceUIConfig(); + CUIConfig *genMeshInterfaceUIConfig(); // 生成界面配置 周期 平移 CUIConfig *genCycleTranslationUIConfig(); @@ -50,7 +60,7 @@ private: CUIConfig *genCycleRotationUIConfig(); // 流量出口 - CUIConfig* genMassFlowOutletUIConfig(); + CUIConfig *genMassFlowOutletUIConfig(); signals: private: @@ -122,6 +132,30 @@ private: // 壁面热流 double m_WallHeatFlux; // Wall Heat Flux + + // 配对名称 + QString m_PairedName = ""; + + // 对应面 + int m_MatchingSurface = 0; + + // 流量(单流道 + double m_FlowRate = 0; + + // 初始压强: + double m_InitialPressure = 0; + + // 压强松弛因子 + double m_PressureRelaxationFactor = 0; + + //速度方向类型 + int m_VelocityDirectionType = 0; + + //方向矢量 + QString m_DirectionVector = ""; + + //边界类型,选中总压入口时,出现的子选项,可选声速、亚声速 + int m_BoundaryType_sub = 0; }; #endif // CFDSTRUCTDATASOLVERBOUNDARYCONDITIONMANAGER_H