1、完成参考量配置

feature/struct-menu-20241023
mzh 2 weeks ago
parent 797b390c96
commit 6a455ae53c

@ -10,8 +10,7 @@ CFDStructDataSolverReferenceQuantityManager::CFDStructDataSolverReferenceQuantit
{ {
m_uiConfig = nullptr; m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{ { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
} }
CFDStructDataSolverReferenceQuantityManager::~CFDStructDataSolverReferenceQuantityManager() CFDStructDataSolverReferenceQuantityManager::~CFDStructDataSolverReferenceQuantityManager()
@ -38,8 +37,12 @@ CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig()
{"type", "Widget"}, {"type", "Widget"},
}, },
{ {
new CUIConfig({{"type", "ComboBox"}, // 参考值取自 new CUIConfig({
{"name", tr("The reference value is taken from")}}, {"type", "ComboBox"}, // 参考值取自
{"name", tr("The reference value is taken from")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_ReferenceValuesFrom)},
},
{ {
new CUIConfig({ new CUIConfig({
{"type", "Item"}, // 无 {"type", "Item"}, // 无
@ -50,28 +53,36 @@ CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig()
{"name", tr("thermodynamics")}}, {"name", tr("thermodynamics")}},
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"},//压强 {"type", "LineEdit"}, // 压强
{"name", tr("pressure")}, {"name", tr("pressure")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Pressure)},
}), }),
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"},//温度 {"type", "LineEdit"}, // 温度
{"name", tr("temperature")}, {"name", tr("temperature")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Temperature)},
}), }),
}), }),
new CUIConfig({{"type", "GroupBox"}, // Re数相关 new CUIConfig({{"type", "GroupBox"}, // Re数相关
{"name", tr("Re number related")}}, {"name", tr("Re number related")}},
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"},//长度 {"type", "LineEdit"}, // 长度
{"name", tr("length")}, {"name", tr("length")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Length)},
}), }),
}), }),
new CUIConfig({{"type", "GroupBox"}, // 力和力矩 new CUIConfig({{"type", "GroupBox"}, // 力和力矩
{"name", tr("Force and torque")}}, {"name", tr("Force and torque")}},
{ {
new CUIConfig({ new CUIConfig({
{"type", "LineEdit"},//面积 {"type", "LineEdit"}, // 面积
{"name", tr("the measure of area")}, {"name", tr("the measure of area")},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
{"value_origin", QVA_GLOBAL(&m_Area)},
}), }),
}), }),
}); });

@ -15,26 +15,28 @@ public:
explicit CFDStructDataSolverReferenceQuantityManager(QObject *parent = nullptr); explicit CFDStructDataSolverReferenceQuantityManager(QObject *parent = nullptr);
~CFDStructDataSolverReferenceQuantityManager(); ~CFDStructDataSolverReferenceQuantityManager();
CUIConfig* getParamUIConfig(); CUIConfig *getParamUIConfig();
private: private:
// 生成界面配置 // 生成界面配置
CUIConfig* genUIConfig(); CUIConfig *genUIConfig();
signals: signals:
private: private:
// 时间模式定常0非定常1 // 参考值取自
int m_runtype = 0; int m_ReferenceValuesFrom; // Reference Values From
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000; // 压强
// 步长模式 >=1 double m_Pressure; // Pressure
double m_alf0 = 1.0;
// 时间步长 >0 // 温度
double m_realdt = 1.0; double m_Temperature; // Temperature
// 时间步数 >=1
int m_nstep = 10; // 长度
// 时均统计量数据采样0 | 1 double m_Length; // Length
int m_timeaverage = 0;
// 面积
double m_Area; // Area
}; };
#endif // CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H #endif // CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H

Loading…
Cancel
Save