1、完成运动属性、边界条件、初始化、参考量、计算控制的部分ui配置文件

feature/struct-menu-20241023
mzh 2 weeks ago
parent eaa5195aad
commit c9c0d80631

@ -1,5 +1,10 @@
SOURCES += \
$$PWD/CFDStructDataManagerBase.cpp \
$$PWD/CFDStructDataSolverBoundaryConditionManager.cpp \
$$PWD/CFDStructDataSolverComputingControlManager.cpp \
$$PWD/CFDStructDataSolverInitializationManager.cpp \
$$PWD/CFDStructDataSolverReferenceQuantityManager.cpp \
$$PWD/CFDStructDataSolverSportsAttributesManager.cpp \
$$PWD/CFDStructDataSolverTimeModeManager.cpp \
$$PWD/CFDStructDataSolverBasicModelManager.cpp \
$$PWD/CFDStructDataSolverKvislManager.cpp \
@ -9,6 +14,11 @@ SOURCES += \
HEADERS += \
$$PWD/CFDStructDataManagerBase.h \
$$PWD/CFDStructDataSolverBoundaryConditionManager.h \
$$PWD/CFDStructDataSolverComputingControlManager.h \
$$PWD/CFDStructDataSolverInitializationManager.h \
$$PWD/CFDStructDataSolverReferenceQuantityManager.h \
$$PWD/CFDStructDataSolverSportsAttributesManager.h \
$$PWD/CFDStructDataSolverTimeModeManager.h \
$$PWD/CFDStructDataSolverBasicModelManager.h \
$$PWD/CFDStructDataSolverKvislManager.h \

@ -0,0 +1,577 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverBoundaryConditionManager.h"
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{
qDebug() << semaphore << " ========================";
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
}
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
// // 如果是定常
// if (m_runtype == 0) {
// m_uiConfig = this->genSteadyModeUIConfig();
// qDebug() << " steady ============";
// } else {
// // 如果是非定常
// m_uiConfig = this->genUnsteadyModeUIConfig();
// qDebug() << " unsteady ============";
// }
// m_uiConfig->printConfig();
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genFarFieldModeUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 马赫数
{"name", tr("mach number")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 密度
{"name", tr("density")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 温度
{"name", tr("temperature")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureInletModeUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 总压
{"name", tr("Total pressure")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 总温
{"name", tr("Total temperature")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 来流方向
{"name", tr("Flow direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流粘性比
{"name", tr("Turbulent viscosity ratio")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 湍流强度
{"name", tr("Turbulence intensity")},
},
{}),
// TODO 用户自定义
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genPressureOutletUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 静压
{"name", tr("static pressure")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genSymmetricUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genCycleUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "LineEdit"}, // 配对名称
{"name", tr("Pairing Name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 对应面
{"name", tr("Corresponding surface")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 周期类型
{"name", tr("Cycle type")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转中心
{"name", tr("Rotation center")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 转轴方向
{"name", tr("Axis direction")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 旋转角
{"name", tr("Rotation angle")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallAdiabaticWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "GroupBox"}, // 壁面类型
{"name", tr(("Wall type"))},
},
{
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")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallIsothermalWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "GroupBox"}, // 壁面类型
{"name", tr(("Wall type"))},
},
{
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","LineEidt"},//壁面温度
{"name",tr("Wall temperature")},
}),
}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverBoundaryConditionManager::genWallHotFlowWallUIConfig()
{
return new CUIConfig({{"type", "Widget"}}, {
new CUIConfig({
{"type", "LineEdit"}, // 边界名称
{"name", tr("Boundary name")},
},
{}),
new CUIConfig({
{"type", "LineEdit"}, // 所属计算域
{"name", tr("Belonging to the computing domain")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 边界类型
{"name", tr("Boundary type")},
},
{
new CUIConfig({
{"type", "Item"}, // 远场
{"name", tr("far field")},
}),
new CUIConfig({
{"type", "Item"}, // 压强入口
{"name", tr("Pressure inlet")},
}),
new CUIConfig({
{"type", "Item"}, // 压强出口
{"name", tr("Pressure outlet")},
}),
new CUIConfig({
{"type", "Item"}, // 对称
{"name", tr("symmetric")},
}),
new CUIConfig({
{"type", "Item"}, // 周期
{"name", tr("cycle")},
}),
new CUIConfig({
{"type", "Item"}, // 壁面
{"name", tr("Wall surface")},
}),
}),
new CUIConfig({
{"type", "GroupBox"}, // 壁面类型
{"name", tr(("Wall type"))},
},
{
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","LineEidt"},//壁面热流
{"name",tr("Wall heat flux")},
}),
}),
});
return nullptr;
}

@ -0,0 +1,51 @@
#ifndef CFDSTRUCTDATASOLVERBOUNDARYCONDITIONEMANAGER_H
#define CFDSTRUCTDATASOLVERBOUNDARYCONDITIONEMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBoundaryConditionManager : public CFDStructDataManagerBase
{
Q_OBJECT
public:
explicit CFDStructDataSolverBoundaryConditionManager(QObject *parent = nullptr);
~CFDStructDataSolverBoundaryConditionManager();
CUIConfig* getParamUIConfig();
private:
// 生成界面配置 远场
CUIConfig* genFarFieldModeUIConfig();
// 生成界面配置 压强入口
CUIConfig* genPressureInletModeUIConfig();
// 生成界面配置 压强出口
CUIConfig* genPressureOutletUIConfig();
// 生成界面配置 对称
CUIConfig* genSymmetricUIConfig();
// 生成界面配置 周期
CUIConfig* genCycleUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig* genWallAdiabaticWallUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig* genWallIsothermalWallUIConfig();
// 生成界面配置 壁面 绝热壁
CUIConfig* genWallHotFlowWallUIConfig();
signals:
private:
// 时间模式定常0非定常1
int m_runtype = 0;
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000;
// 步长模式 >=1
double m_alf0 = 1.0;
// 时间步长 >0
double m_realdt = 1.0;
// 时间步数 >=1
int m_nstep = 10;
// 时均统计量数据采样0 | 1
int m_timeaverage = 0;
};
#endif // CFDSTRUCTDATASOLVERBOUNDARYCONDITIONMANAGER_H

@ -0,0 +1,71 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverComputingControlManager.h"
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{
qDebug() << semaphore << " ========================";
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
}
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
// m_uiConfig->printConfig();
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverComputingControlManager::genUIConfig()
{
return new CUIConfig(
{
{"type", "Widget"},
},
{
new CUIConfig({
{"type", "GroupBox"}, // 自动保存
{"name", tr("Auto Save")},
},
{
new CUIConfig({
{"type", "LineEdit"}, // 数据保存频率
{"name", tr("Data retention frequency")},
}),
// TODO数据文件保存
}),
new CUIConfig({
{"type", "GroupBox"}, // 并行控制
{"name", tr("Parallel control")},
},
{
new CUIConfig({
{"type", "CheckButton"}, // 并行
{"name", tr("parallel")},
}),
new CUIConfig({
{"type", "CheckButton"}, // MPI库
{"name", tr("MPI library")},
}),
//TODO 数值计算核数
//TODO 网格组装核数
}),
});
return nullptr;
}

@ -0,0 +1,37 @@
#ifndef CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H
#define CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverComputingControlManager : public CFDStructDataManagerBase
{
Q_OBJECT
public:
explicit CFDStructDataSolverComputingControlManager(QObject *parent = nullptr);
~CFDStructDataSolverComputingControlManager();
CUIConfig* getParamUIConfig();
private:
// 生成界面配置
CUIConfig* genUIConfig();
signals:
private:
// 时间模式定常0非定常1
int m_runtype = 0;
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000;
// 步长模式 >=1
double m_alf0 = 1.0;
// 时间步长 >0
double m_realdt = 1.0;
// 时间步数 >=1
int m_nstep = 10;
// 时均统计量数据采样0 | 1
int m_timeaverage = 0;
};
#endif // CFDSTRUCTDATASOLVERCOMPUTINGCONTROLMANAGER_H

@ -0,0 +1,77 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverInitializationManager.h"
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) {
qDebug() << semaphore << " ========================";
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged();
});
}
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
{
if (m_uiConfig != nullptr) {
delete m_uiConfig;
m_uiConfig = nullptr;
}
// m_uiConfig->printConfig();
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverInitializationManager::genUIConfig()
{
new CUIConfig({
{"type","Widget"},
},{
new CUIConfig({
{"type","ComboBox"},//参考值取自
{"name",tr("The reference value is taken from")},
},{}),
new CUIConfig({
{"type","GroupBox"},//初始值定义
{"name",tr("Initial value definition")},
},{
new CUIConfig({
{"type","LineEdit"},//密度
{"name",tr("density")},
}),
new CUIConfig({
{"type","LineEdit"},//μ速度
{"name",tr("μ speed")},
}),
new CUIConfig({
{"type","LineEdit"},//ν速度
{"name",tr("v Speed")},
}),
new CUIConfig({
{"type","LineEdit"},//ω速度
{"name",tr("ω velocity")},
}),
new CUIConfig({
{"type","LineEdit"},//压强
{"name",tr("pressure")},
}),
new CUIConfig({
{"type","LineEdit"},//湍流粘性比
{"name",tr("Turbulent viscosity ratio")},
}),
new CUIConfig({
{"type","LineEdit"},//湍流强度
{"name",tr("Turbulence intensity")},
}),
}),
});
return nullptr;
}

@ -0,0 +1,37 @@
#ifndef CFDSTRUCTDATASOLVERINITIALIZATIONEMANAGER_H
#define CFDSTRUCTDATASOLVERINITIALIZATIONEMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverInitializationManager : public CFDStructDataManagerBase
{
Q_OBJECT
public:
explicit CFDStructDataSolverInitializationManager(QObject *parent = nullptr);
~CFDStructDataSolverInitializationManager();
CUIConfig* getParamUIConfig();
private:
// 生成界面配置
CUIConfig* genUIConfig();
signals:
private:
// 时间模式定常0非定常1
int m_runtype = 0;
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000;
// 步长模式 >=1
double m_alf0 = 1.0;
// 时间步长 >0
double m_realdt = 1.0;
// 时间步数 >=1
int m_nstep = 10;
// 时均统计量数据采样0 | 1
int m_timeaverage = 0;
};
#endif // CFDSTRUCTDATASOLVERINITIALIZATIONEMANAGER_H

@ -0,0 +1,79 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverReferenceQuantityManager.h"
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
{
qDebug() << semaphore << " ========================";
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); });
}
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
// m_uiConfig->printConfig();
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig()
{
return new CUIConfig({
{"type", "Widget"},
},
{
new CUIConfig({{"type", "ComboBox"}, // 参考值取自
{"name", tr("The reference value is taken from")}},
{
new CUIConfig({
{"type", "Item"}, // 无
{"name", tr("none")},
}),
}),
new CUIConfig({{"type", "GroupBox"}, // 热力学
{"name", tr("thermodynamics")}},
{
new CUIConfig({
{"type", "LineEdit"},//压强
{"name", tr("pressure")},
}),
new CUIConfig({
{"type", "LineEdit"},//温度
{"name", tr("temperature")},
}),
}),
new CUIConfig({{"type", "GroupBox"}, // Re数相关
{"name", tr("Re number related")}},
{
new CUIConfig({
{"type", "LineEdit"},//长度
{"name", tr("length")},
}),
}),
new CUIConfig({{"type", "GroupBox"}, // 力和力矩
{"name", tr("Force and torque")}},
{
new CUIConfig({
{"type", "LineEdit"},//面积
{"name", tr("the measure of area")},
}),
}),
});
return nullptr;
}

@ -0,0 +1,37 @@
#ifndef CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H
#define CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverReferenceQuantityManager : public CFDStructDataManagerBase
{
Q_OBJECT
public:
explicit CFDStructDataSolverReferenceQuantityManager(QObject *parent = nullptr);
~CFDStructDataSolverReferenceQuantityManager();
CUIConfig* getParamUIConfig();
private:
// 生成界面配置
CUIConfig* genUIConfig();
signals:
private:
// 时间模式定常0非定常1
int m_runtype = 0;
// 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
int m_mcyc = 1000;
// 步长模式 >=1
double m_alf0 = 1.0;
// 时间步长 >0
double m_realdt = 1.0;
// 时间步数 >=1
int m_nstep = 10;
// 时均统计量数据采样0 | 1
int m_timeaverage = 0;
};
#endif // CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H

@ -0,0 +1,138 @@
#include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h"
#include "CUIProperty/CUISigsCenter.h"
#include <QVariant>
#include "CFDStructDataSolverSportsAttributesManager.h"
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : CFDStructDataManagerBase(parent)
{
m_uiConfig = nullptr;
// connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) {
// qDebug() << semaphore << " ========================";
// emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged();
// });
}
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
{
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
}
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
return m_uiConfig;
}
CUIConfig *CFDStructDataSolverSportsAttributesManager::genMovingFrameModeUIConfig()
{
return new CUIConfig({
{"type", "Widget"},
},
{
new CUIConfig({
{"type", "LineEdit"}, // 运动名称
{"name", tr("Sports name")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 运动类型
{"name", tr("Sports type")},
},
{
new CUIConfig({
{"type", "Item"}, // 运动坐标系
{"name", tr("Moving Frame")},
}),
new CUIConfig({
{"type", "Item"}, // 刚体
{"name", tr("RigidBody")},
}),
}),
new CUIConfig({
{"type", "GroupBox"}, // 运动特征
{"name", tr("Sports characteristics")},
},
{
new CUIConfig({
{"type", "LineEdit"}, // 运动方式
{"name", tr("Sports Style")},
}),
new CUIConfig({
{"type", "LineEdit"}, // 转轴原点
{"name", tr("Axis origin")},
}),
new CUIConfig({
{"type", "LineEdit"}, // 转轴方向
{"name", tr("Axis direction")},
}),
new CUIConfig({
{"type", "LineEdit"}, // 转速
{"name", tr("speed")},
}),
}),
// TODO
new CUIConfig({
{"type", "List"}, // 域列表
{"name", tr("Domain List")},
},
{}),
});
return nullptr;
}
CUIConfig *CFDStructDataSolverSportsAttributesManager::genRigidBodyModeUIConfig()
{
return new CUIConfig({
{"type", "Widget"},
},
{
new CUIConfig({
{"type", "LineEdit"}, // 运动名称
{"name", tr("Sports name")},
},
{}),
new CUIConfig({
{"type", "ComboBox"}, // 运动类型
{"name", tr("Sports type")},
},
{
new CUIConfig({
{"type", "Item"}, // 运动坐标系
{"name", tr("Moving Frame")},
}),
new CUIConfig({
{"type", "Item"}, // 刚体
{"name", tr("RigidBody")},
}),
}),
new CUIConfig({
{"type", "GroupBox"}, // 用户自定义
{"name", tr("User defined")},
},
{
// TODO
new CUIConfig({
{"type", "LineEdit"}, // 打开文件
{"name", tr("Open file")},
}),
new CUIConfig({
{"type", "LineEdit"}, // 函数名称
{"name", tr("Function Name")},
}),
}),
// TODO
new CUIConfig({
{"type", "List"}, // 域列表
{"name", tr("Domain List")},
},
{}),
});
return nullptr;
}

@ -0,0 +1,39 @@
#ifndef CFDSTRUCTDATASOLVERSPORTSATTRIBUTESMANAGER_H
#define CFDSTRUCTDATASOLVERSPORTSATTRIBUTESMANAGER_H
#include <CFDStructDataManagerBase.h>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverSportsAttributesManager : public CFDStructDataManagerBase
{
Q_OBJECT
public:
explicit CFDStructDataSolverSportsAttributesManager(QObject *parent = nullptr);
~CFDStructDataSolverSportsAttributesManager();
CUIConfig* getParamUIConfig();
private:
// 生成运动坐标系的界面配置
CUIConfig* genMovingFrameModeUIConfig();
// 生成刚体的界面配置
CUIConfig* genRigidBodyModeUIConfig();
signals:
private:
// // 时间模式定常0非定常1
// int m_runtype = 0;
// // 时间模式定常0则是迭代步数时间模式非定常1则是内迭代步数
// int m_mcyc = 1000;
// // 步长模式 >=1
// double m_alf0 = 1.0;
// // 时间步长 >0
// double m_realdt = 1.0;
// // 时间步数 >=1
// int m_nstep = 10;
// // 时均统计量数据采样0 | 1
// int m_timeaverage = 0;
};
#endif // CFDSTRUCTDATASOLVERSPORTSATTRIBUTESMANAGER_H

@ -1,4 +1,4 @@
#include "CFDStructMainWindow.h"
#include "CFDStructMainWindow.h"
#include "CFDMainTreeWidget.h"
#include "GUIFrame/PropertyWidget.h"
@ -193,7 +193,7 @@ void CFDStructMainWindow::addSARibbonCategoryCalculation()
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>"
pannel = gategory->addPannel(tr("Import and Export"));
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
action = createAction(tr("Mesh Import"), "actionMeshImport", ":/icons/createbox.png", tr("Mesh Import"));
action = createAction(tr("Mesh Import"), "actionMeshImport", ":/img/createbox.png", tr("Mesh Import"));
//"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD>"<22><><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>"
pannelAddAction(pannel, action, SARibbonPannelItem::Large);
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>"<22><><EFBFBD><EFBFBD>"

@ -239,6 +239,7 @@
<file>./icons/BoolCommon.png</file>
<!-- APPFlowIcon -->
<file>./icons/icoR_license.svg</file>
<file>./img/createbox.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Loading…
Cancel
Save