|
|
|
@ -78,7 +78,121 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::getParamUIConfig() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverBoundaryConditionManager::saveDataToDom(rapidjson::Document &dom) {
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
|
|
jsonAdd(dom, m_id, {"region", 0, "bc", m_id, "id"});
|
|
|
|
|
jsonAdd(dom, m_BoundaryName, {"region", 0, "bc", m_id, "name"});
|
|
|
|
|
|
|
|
|
|
if (m_WallType == 0) {
|
|
|
|
|
jsonAdd(dom, 1, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 1) {
|
|
|
|
|
jsonAdd(dom, 4, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 2) {
|
|
|
|
|
jsonAdd(dom, 5, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 3) {
|
|
|
|
|
jsonAdd(dom, 6, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 4) {
|
|
|
|
|
jsonAdd(dom, 7, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 5) {
|
|
|
|
|
jsonAdd(dom, 13, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 6) {
|
|
|
|
|
jsonAdd(dom, 13, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 7) {
|
|
|
|
|
jsonAdd(dom, 8, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
} else if (m_WallType == 8) {
|
|
|
|
|
jsonAdd(dom, 16, {"region", 0, "bc", m_id, "type"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jsonAdd(dom, m_WallType,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "type"});
|
|
|
|
|
jsonAdd(dom, m_WallTemperature,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "temp"});
|
|
|
|
|
jsonAdd(dom, m_WallHeatFlux,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "reliu"});
|
|
|
|
|
jsonAdd(dom, m_MachNumber,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "mach"});
|
|
|
|
|
jsonAdd(dom, m_Pressure,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "press"});
|
|
|
|
|
jsonAdd(dom, m_Temperature,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "temper"});
|
|
|
|
|
jsonAdd(dom, m_InflowDirectionX,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "temper", 0});
|
|
|
|
|
jsonAdd(dom, m_InflowDirectionY,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "temper", 1});
|
|
|
|
|
jsonAdd(dom, m_InflowDirectionZ,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "temper", 2});
|
|
|
|
|
jsonAdd(dom, m_TurbulentViscosityRatio,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "faro"});
|
|
|
|
|
jsonAdd(dom, m_TurbulentIntensity,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "fark"});
|
|
|
|
|
jsonAdd(dom, m_BoundaryType_sub,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "speedType"});
|
|
|
|
|
jsonAdd(dom, m_TotalPressure,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "totalP"});
|
|
|
|
|
jsonAdd(dom, m_StaticPressure,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "staticP"});
|
|
|
|
|
jsonAdd(dom, m_TotalTemperature,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "totalT"});
|
|
|
|
|
jsonAdd(dom, m_VelocityDirectionType,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "speedDir"});
|
|
|
|
|
jsonAdd(dom, m_DirectionVectorX,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "direction", 0});
|
|
|
|
|
jsonAdd(dom, m_DirectionVectorY,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "direction", 1});
|
|
|
|
|
jsonAdd(dom, m_DirectionVectorZ,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "direction", 2});
|
|
|
|
|
jsonAdd(dom, m_TurbulentViscosityRatio,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "faro"});
|
|
|
|
|
jsonAdd(dom, m_TurbulentIntensity,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "fark"});
|
|
|
|
|
jsonAdd(dom, m_staticPType,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "staticPType"});
|
|
|
|
|
jsonAdd(dom, m_StaticPressure,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "staticP"});
|
|
|
|
|
jsonAdd(dom, m_CorrespondingSurface,
|
|
|
|
|
{"region", 0, "bc", m_id, "boundaryId"});
|
|
|
|
|
jsonAdd(dom, m_PairingName,
|
|
|
|
|
{"region", 0, "bc", m_id, "interfaceName"});
|
|
|
|
|
jsonAdd(dom, m_CorrespondingSurface,
|
|
|
|
|
{"region", 0, "bc", m_id, "boundaryName"});
|
|
|
|
|
jsonAdd(dom, m_PairingName,
|
|
|
|
|
{"region", 0, "bc", m_id, "periodicName"});
|
|
|
|
|
jsonAdd(dom, m_PeriodicType,
|
|
|
|
|
{"region", 0, "bc", m_id, "matchType"});
|
|
|
|
|
jsonAdd(dom, 256,
|
|
|
|
|
{"region", 0, "bc", m_id, "translate", "unit"});
|
|
|
|
|
jsonAdd(dom, m_TranslationDistanceX,
|
|
|
|
|
{"region", 0, "bc", m_id, "translate", "value", 0});
|
|
|
|
|
jsonAdd(dom, m_TranslationDistanceY,
|
|
|
|
|
{"region", 0, "bc", m_id, "translate", "value", 1});
|
|
|
|
|
jsonAdd(dom, m_TranslationDistanceZ,
|
|
|
|
|
{"region", 0, "bc", m_id, "translate", "value", 2});
|
|
|
|
|
jsonAdd(dom, 256,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "center", "unit"});
|
|
|
|
|
jsonAdd(dom, m_RotationCenterX,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "center", "value", 0});
|
|
|
|
|
jsonAdd(dom, m_RotationCenterY,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "center", "value", 1});
|
|
|
|
|
jsonAdd(dom, m_RotationCenterZ,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "center", "value", 2});
|
|
|
|
|
jsonAdd(dom, m_per_rot_aixsX,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "axis", 0});
|
|
|
|
|
jsonAdd(dom, m_per_rot_aixsY,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "axis", 1});
|
|
|
|
|
jsonAdd(dom, m_per_rot_aixsZ,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "axis", 2});
|
|
|
|
|
jsonAdd(dom, m_RotationAngle,
|
|
|
|
|
{"region", 0, "bc", m_id, "rotate", "angle"});
|
|
|
|
|
jsonAdd(dom, m_InitialPressure,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "initPressure"});
|
|
|
|
|
jsonAdd(dom, m_FlowRate,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "massRate"});
|
|
|
|
|
jsonAdd(dom, m_PressureRelaxationFactor,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "pressureFactor"});
|
|
|
|
|
|
|
|
|
|
// 用户自定义部分
|
|
|
|
|
// jsonAdd(dom, m_UserDefined,{region[0] bc momentum pressureFactor});
|
|
|
|
|
jsonAdd(dom, 0,
|
|
|
|
|
{"region", 0, "bc", m_id, "momentum", "isUser"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CFDStructDataSolverBoundaryConditionManager::readDataFromDom(rapidjson::Document &dom) {
|
|
|
|
@ -423,7 +537,7 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeSupe
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "Item"},
|
|
|
|
|
{"name", tr(" Specified Direction (Cylindrical Coordinate System)")},
|
|
|
|
|
{"name", tr("Specified Direction (Cylindrical Coordinate System)")},
|
|
|
|
|
}),
|
|
|
|
|
new CUIConfig({
|
|
|
|
|
{"type", "Item"},
|
|
|
|
@ -1573,6 +1687,8 @@ CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfi
|
|
|
|
|
{"type", "RadioComponent"},
|
|
|
|
|
{"widget", "Component"},
|
|
|
|
|
{"layout", "QHBoxLayout"},
|
|
|
|
|
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
|
|
|
|
{"value_origin", QVA_GLOBAL(&m_staticPType)},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
new CUIConfig({
|
|
|
|
|